From a415d405fc9136473e840aefb66354c0c6879f18 Mon Sep 17 00:00:00 2001 From: liux <963924687@qq.com> Date: Thu, 3 Jul 2025 13:53:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=B8=E5=85=B3bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/KitchenDeviceInfoController.java | 5 +++-- .../canteen/core/kitchen/dto/KitLongIdsDTO.java | 17 +++++++++++++++++ .../impl/KitchenDeviceInfoServiceImpl.java | 14 ++++++++++---- 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/dto/KitLongIdsDTO.java diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceInfoController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceInfoController.java index c2fb331..132bc68 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceInfoController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenDeviceInfoController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotNull; +import com.bonus.canteen.core.kitchen.dto.KitLongIdsDTO; import com.bonus.canteen.core.kitchen.dto.KitchenDeviceListDTO; import com.bonus.canteen.core.kitchen.vo.KitchenDeviceListVO; import com.bonus.common.log.enums.OperaType; @@ -138,7 +139,7 @@ public class KitchenDeviceInfoController extends BaseController { //@RequiresPermissions("kitchen:info:remove") @SysLog(title = "厨房设备基础信息", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除厨房设备基础信息") @PostMapping("/del") - public AjaxResult remove(@RequestBody List deviceIds) { - return toAjax(kitchenDeviceInfoService.deleteKitchenDeviceInfoByDeviceIds(deviceIds)); + public AjaxResult remove(@RequestBody KitLongIdsDTO kitLongIdsDTO) { + return toAjax(kitchenDeviceInfoService.deleteKitchenDeviceInfoByDeviceIds(kitLongIdsDTO.getDeviceIds())); } } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/dto/KitLongIdsDTO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/dto/KitLongIdsDTO.java new file mode 100644 index 0000000..d27b6cf --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/dto/KitLongIdsDTO.java @@ -0,0 +1,17 @@ +package com.bonus.canteen.core.kitchen.dto; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * @author xliu + * @date 2025/7/3 13:39 + */ +@Data +public class KitLongIdsDTO { + @NotNull(message = "设备ID列表不能为空") + private List deviceIds; + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenDeviceInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenDeviceInfoServiceImpl.java index 4ab99f6..29b4214 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenDeviceInfoServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenDeviceInfoServiceImpl.java @@ -85,13 +85,16 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpllambdaQuery() @@ -165,6 +168,9 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl