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; }