Commit c3a103c90356c241950532700b24f8b16fef0cf1
1 parent
8ebf8957
修改代码,提供模糊查询项目号或者内部编号接口
Showing
2 changed files
with
3 additions
and
3 deletions
src/main/java/com/order/erp/controller/OrderController.java
@@ -137,7 +137,7 @@ public class OrderController { | @@ -137,7 +137,7 @@ public class OrderController { | ||
137 | */ | 137 | */ |
138 | @ApiOperation("查询项目号或者内部编号") | 138 | @ApiOperation("查询项目号或者内部编号") |
139 | @PostMapping("/queryProjectNoAndInnerNo") | 139 | @PostMapping("/queryProjectNoAndInnerNo") |
140 | - public ServerResult queryProjectNoAndInnerNo(QueryProjectNoAndInnerNoDto dto) { | 140 | + public ServerResult queryProjectNoAndInnerNo(@RequestBody QueryProjectNoAndInnerNoDto dto) { |
141 | if (Objects.isNull(dto.getProjectNo()) && Objects.isNull(dto.getInnerNo())) { | 141 | if (Objects.isNull(dto.getProjectNo()) && Objects.isNull(dto.getInnerNo())) { |
142 | throw new BusinessException("请传入项目号或内部编号"); | 142 | throw new BusinessException("请传入项目号或内部编号"); |
143 | } | 143 | } |
src/main/resources/mapper/OrderBaseInfoMapper.xml
@@ -7,10 +7,10 @@ | @@ -7,10 +7,10 @@ | ||
7 | FROM order_base_info | 7 | FROM order_base_info |
8 | WHERE enable_flag = 10 | 8 | WHERE enable_flag = 10 |
9 | <if test="flag == true"> | 9 | <if test="flag == true"> |
10 | - project_no like concat(#{dto.projectNo},'%') | 10 | + AND project_no like concat(#{dto.projectNo},'%') |
11 | </if> | 11 | </if> |
12 | <if test="flag == false"> | 12 | <if test="flag == false"> |
13 | - inner_no like concat(#{dto.innerNo},'%') | 13 | + AND inner_no like concat(#{dto.innerNo},'%') |
14 | </if> | 14 | </if> |
15 | </select> | 15 | </select> |
16 | </mapper> | 16 | </mapper> |