From a8ff3575a071a3ba6349469808b46c3c0a0c661e Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 13 Oct 2022 21:30:53 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../udi/admin/controller/basic/StackRulesController.java | 4 ++-- .../udi/admin/controller/product/StackOrderController.java | 4 ++-- .../glxp/udi/admin/req/basic/FilterStackRulesRequest.java | 5 +++++ .../glxp/udi/admin/service/basic/StackRulesService.java | 7 ++++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/glxp/udi/admin/controller/basic/StackRulesController.java b/src/main/java/com/glxp/udi/admin/controller/basic/StackRulesController.java index 99428b3..dd454f2 100644 --- a/src/main/java/com/glxp/udi/admin/controller/basic/StackRulesController.java +++ b/src/main/java/com/glxp/udi/admin/controller/basic/StackRulesController.java @@ -93,7 +93,7 @@ public class StackRulesController { } } stackRulesService.updateStackRules(stackRulesEntity); - return ResultVOUtils.success("更新成功"); + return ResultVOUtils.success(); } /** @@ -108,7 +108,7 @@ public class StackRulesController { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); } stackRulesService.delete(deleteRequest.getId()); - return ResultVOUtils.success("删除成功"); + return ResultVOUtils.success(); } } diff --git a/src/main/java/com/glxp/udi/admin/controller/product/StackOrderController.java b/src/main/java/com/glxp/udi/admin/controller/product/StackOrderController.java index 4c03e34..2c89575 100644 --- a/src/main/java/com/glxp/udi/admin/controller/product/StackOrderController.java +++ b/src/main/java/com/glxp/udi/admin/controller/product/StackOrderController.java @@ -75,7 +75,7 @@ public class StackOrderController { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } stackOrderService.updateOrder(stackUploadRequest); - return ResultVOUtils.success("更新成功"); + return ResultVOUtils.success(); } @@ -86,7 +86,7 @@ public class StackOrderController { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } stackOrderService.deleteById(Integer.parseInt(deleteRequest.getId())); - return ResultVOUtils.success("更新成功"); + return ResultVOUtils.success(); } diff --git a/src/main/java/com/glxp/udi/admin/req/basic/FilterStackRulesRequest.java b/src/main/java/com/glxp/udi/admin/req/basic/FilterStackRulesRequest.java index 9c5085e..73033b2 100644 --- a/src/main/java/com/glxp/udi/admin/req/basic/FilterStackRulesRequest.java +++ b/src/main/java/com/glxp/udi/admin/req/basic/FilterStackRulesRequest.java @@ -9,6 +9,11 @@ import lombok.Data; @Data public class FilterStackRulesRequest extends ListPageRequest { + /** + * 搜索关键字 + */ + private String key; + /** * 建垛规则名称 */ diff --git a/src/main/java/com/glxp/udi/admin/service/basic/StackRulesService.java b/src/main/java/com/glxp/udi/admin/service/basic/StackRulesService.java index 0c26b52..44adede 100644 --- a/src/main/java/com/glxp/udi/admin/service/basic/StackRulesService.java +++ b/src/main/java/com/glxp/udi/admin/service/basic/StackRulesService.java @@ -49,7 +49,12 @@ public class StackRulesService { */ private QueryWrapper buildWrapper(FilterStackRulesRequest filterStockRulesRequest) { QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.like(StrUtil.isNotBlank(filterStockRulesRequest.getName()), "name", filterStockRulesRequest.getName()) + wrapper.like(StrUtil.isNotBlank(filterStockRulesRequest.getKey()), "name", filterStockRulesRequest.getKey()) + .or() + .like(StrUtil.isNotBlank(filterStockRulesRequest.getKey()), "prefix", filterStockRulesRequest.getKey()) + .or() + .like(StrUtil.isNotBlank(filterStockRulesRequest.getKey()), "remark", filterStockRulesRequest.getKey()) + .like(StrUtil.isNotBlank(filterStockRulesRequest.getName()), "name", filterStockRulesRequest.getName()) .eq(null != filterStockRulesRequest.getStatus(), "status", filterStockRulesRequest.getStatus()) .eq(StrUtil.isNotBlank(filterStockRulesRequest.getCustomerId()), "customerId", filterStockRulesRequest.getCustomerId()); return wrapper;