diff --git a/yunlan-backend/.gitignore b/yunlan-backend/.gitignore index 5fa37c2..8aa121a 100644 --- a/yunlan-backend/.gitignore +++ b/yunlan-backend/.gitignore @@ -1,8 +1,41 @@ -**/target/ -.idea -*.iml -*.class +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ *Test.java **/test/ -# JRebal热更插件文件 -rebel.xml \ No newline at end of file + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +.idea/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/controller/operation/ServeController.java b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/controller/operation/ServeController.java new file mode 100644 index 0000000..77cc5c2 --- /dev/null +++ b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/controller/operation/ServeController.java @@ -0,0 +1,31 @@ +package com.jzo2o.foundations.controller.operation; + +import com.jzo2o.common.model.PageResult; +import com.jzo2o.foundations.model.dto.request.ServePageQueryReqDTO; +import com.jzo2o.foundations.model.dto.response.ServeResDTO; +import com.jzo2o.foundations.service.IServeService; +import io.swagger.annotations.Api; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * 区域服务相关接口 + * @author JIAN + */ +@Validated +@RestController("operationServeController") +@RequestMapping("/operation/serve") +@Api(tags = "运营端 - 区域服务相关接口") +public class ServeController { + @Resource + private IServeService serveService; + + @GetMapping("/page") + public PageResult page(ServePageQueryReqDTO servePageQueryReqDTO) { + return serveService.page(servePageQueryReqDTO); + } +} \ No newline at end of file diff --git a/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/mapper/ServeMapper.java b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/mapper/ServeMapper.java index bd40db6..2712d1c 100644 --- a/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/mapper/ServeMapper.java +++ b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/mapper/ServeMapper.java @@ -1,11 +1,7 @@ package com.jzo2o.foundations.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO; import com.jzo2o.foundations.model.domain.Serve; -import com.jzo2o.foundations.model.dto.response.ServeAggregationSimpleResDTO; -import com.jzo2o.foundations.model.dto.response.ServeAggregationTypeSimpleResDTO; -import com.jzo2o.foundations.model.dto.response.ServeCategoryResDTO; import com.jzo2o.foundations.model.dto.response.ServeResDTO; import org.apache.ibatis.annotations.Param; @@ -15,9 +11,13 @@ import java.util.List; *

* Mapper 接口 *

- * * @author itcast * @since 2023-07-03 */ public interface ServeMapper extends BaseMapper { -} + /** + * 区域服务查询 + * @param regionId 区域id + */ + List queryServeListByRegionId(@Param("regionId") Long regionId); +} \ No newline at end of file diff --git a/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/service/IServeService.java b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/service/IServeService.java new file mode 100644 index 0000000..2f43ca2 --- /dev/null +++ b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/service/IServeService.java @@ -0,0 +1,19 @@ +package com.jzo2o.foundations.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.jzo2o.common.model.PageResult; +import com.jzo2o.foundations.model.domain.Serve; +import com.jzo2o.foundations.model.dto.request.ServePageQueryReqDTO; +import com.jzo2o.foundations.model.dto.response.ServeResDTO; + +/** + * 区域服务接口 + * @author JIAN + */ +public interface IServeService extends IService { + /** + * 区域服务分页查询 + * @param servePageQueryReqDTO 分页参数 + */ + PageResult page(ServePageQueryReqDTO servePageQueryReqDTO); +} \ No newline at end of file diff --git a/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/service/impl/ServeServiceImpl.java b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/service/impl/ServeServiceImpl.java new file mode 100644 index 0000000..b6e9218 --- /dev/null +++ b/yunlan-backend/jzo2o-foundations/src/main/java/com/jzo2o/foundations/service/impl/ServeServiceImpl.java @@ -0,0 +1,24 @@ +package com.jzo2o.foundations.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jzo2o.common.model.PageResult; +import com.jzo2o.foundations.mapper.ServeMapper; +import com.jzo2o.foundations.model.domain.Serve; +import com.jzo2o.foundations.model.dto.request.ServePageQueryReqDTO; +import com.jzo2o.foundations.model.dto.response.ServeResDTO; +import com.jzo2o.foundations.service.IServeService; +import com.jzo2o.mysql.utils.PageHelperUtils; +import org.springframework.stereotype.Service; + +/** + * 区域服务实现类 + * @author JIAN + */ +@Service +public class ServeServiceImpl extends ServiceImpl implements IServeService { + @Override + public PageResult page(ServePageQueryReqDTO servePageQueryReqDTO) { + return PageHelperUtils.selectPage(servePageQueryReqDTO, + () -> baseMapper.queryServeListByRegionId(servePageQueryReqDTO.getRegionId())); + } +} \ No newline at end of file diff --git a/yunlan-backend/jzo2o-foundations/src/main/resources/mapper/ServeMapper.xml b/yunlan-backend/jzo2o-foundations/src/main/resources/mapper/ServeMapper.xml index 845b413..a238e89 100644 --- a/yunlan-backend/jzo2o-foundations/src/main/resources/mapper/ServeMapper.xml +++ b/yunlan-backend/jzo2o-foundations/src/main/resources/mapper/ServeMapper.xml @@ -1,7 +1,23 @@ - - - - + + \ No newline at end of file