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