From 491e9f17ced0604c4a76049f356ddfc6d09b449f Mon Sep 17 00:00:00 2001 From: anthonyywj2 <353682448@qq.com> Date: Fri, 1 Jul 2022 18:09:46 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/admin/controller/inout/OrderController.java | 11 +++++++++++ .../com/glxp/api/admin/req/inout/DeleteRequest.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java index 247d1d2b..a239a58b 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/inout/OrderController.java @@ -160,6 +160,17 @@ public class OrderController { if (StrUtil.isBlank(deleteRequest.getId()) && CollUtil.isEmpty(deleteRequest.getIds())) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); } + + if (deleteRequest.getStatus() != null) { + OrderFilterRequest orderFilterRequest = new OrderFilterRequest(); + orderFilterRequest.setStatus(deleteRequest.getStatus()); + orderFilterRequest.setId(deleteRequest.getId()); + List orderEntityList = orderService.filterListOr(orderFilterRequest); + if (CollUtil.isEmpty(orderEntityList)) { + return ResultVOUtils.error(520, "单据不存在!"); + } + } + if (CollUtil.isNotEmpty(deleteRequest.getIds())) { orderService.deleteOrders(deleteRequest.getIds()); } else { diff --git a/api-admin/src/main/java/com/glxp/api/admin/req/inout/DeleteRequest.java b/api-admin/src/main/java/com/glxp/api/admin/req/inout/DeleteRequest.java index fb8be3b0..a56fe5a0 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/req/inout/DeleteRequest.java +++ b/api-admin/src/main/java/com/glxp/api/admin/req/inout/DeleteRequest.java @@ -6,7 +6,7 @@ import java.util.List; @Data public class DeleteRequest { - + private Integer status; String id; List ids; }