From 183989d1ac16a87afc385e478df65a059552fae6 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Sun, 25 May 2025 20:00:31 +0800 Subject: [PATCH] init --- .../CookRecipeBindDeviceController.java | 119 ------------------ .../device/domain/CookRecipeBindDevice.java | 46 ------- .../mapper/CookRecipeBindDeviceMapper.java | 60 --------- .../service/ICookRecipeBindDeviceService.java | 60 --------- .../impl/CookRecipeBindDeviceServiceImpl.java | 98 --------------- .../device/CookRecipeBindDeviceMapper.xml | 86 ------------- 6 files changed, 469 deletions(-) delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/CookRecipeBindDeviceController.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/CookRecipeBindDevice.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/CookRecipeBindDeviceMapper.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/ICookRecipeBindDeviceService.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/impl/CookRecipeBindDeviceServiceImpl.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/resources/mapper/device/CookRecipeBindDeviceMapper.xml diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/CookRecipeBindDeviceController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/CookRecipeBindDeviceController.java deleted file mode 100644 index 686ad43..0000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/controller/CookRecipeBindDeviceController.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.bonus.canteen.core.device.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import com.bonus.common.log.enums.OperaType; -//import com.bonus.canteen.core.device.common.annotation.PreventRepeatSubmit; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.bonus.common.log.annotation.SysLog; -import com.bonus.common.security.annotation.RequiresPermissions; -import com.bonus.canteen.core.device.domain.CookRecipeBindDevice; -import com.bonus.canteen.core.device.service.ICookRecipeBindDeviceService; -import com.bonus.common.core.web.controller.BaseController; -import com.bonus.common.core.web.domain.AjaxResult; -import com.bonus.common.core.utils.poi.ExcelUtil; -import com.bonus.common.core.web.page.TableDataInfo; - -/** - * 设备绑定多档口子Controller - * - * @author xsheng - * @date 2025-05-25 - */ -@Api(tags = "设备绑定多档口子接口") -@RestController -@RequestMapping("/cook_recipe_bind_device") -public class CookRecipeBindDeviceController extends BaseController { - @Autowired - private ICookRecipeBindDeviceService cookRecipeBindDeviceService; - - /** - * 查询设备绑定多档口子列表 - */ - @ApiOperation(value = "查询设备绑定多档口子列表") - //@RequiresPermissions("device:device:list") - @GetMapping("/list") - public TableDataInfo list(CookRecipeBindDevice cookRecipeBindDevice) { - startPage(); - List list = cookRecipeBindDeviceService.selectCookRecipeBindDeviceList(cookRecipeBindDevice); - return getDataTable(list); - } - - /** - * 导出设备绑定多档口子列表 - */ - @ApiOperation(value = "导出设备绑定多档口子列表") - //@PreventRepeatSubmit - //@RequiresPermissions("device:device:export") - @SysLog(title = "设备绑定多档口子", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出设备绑定多档口子") - @PostMapping("/export") - public void export(HttpServletResponse response, CookRecipeBindDevice cookRecipeBindDevice) { - List list = cookRecipeBindDeviceService.selectCookRecipeBindDeviceList(cookRecipeBindDevice); - ExcelUtil util = new ExcelUtil(CookRecipeBindDevice.class); - util.exportExcel(response, list, "设备绑定多档口子数据"); - } - - /** - * 获取设备绑定多档口子详细信息 - */ - @ApiOperation(value = "获取设备绑定多档口子详细信息") - //@RequiresPermissions("device:device:query") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return success(cookRecipeBindDeviceService.selectCookRecipeBindDeviceById(id)); - } - - /** - * 新增设备绑定多档口子 - */ - @ApiOperation(value = "新增设备绑定多档口子") - //@PreventRepeatSubmit - //@RequiresPermissions("device:device:add") - @SysLog(title = "设备绑定多档口子", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增设备绑定多档口子") - @PostMapping - public AjaxResult add(@RequestBody CookRecipeBindDevice cookRecipeBindDevice) { - try { - return toAjax(cookRecipeBindDeviceService.insertCookRecipeBindDevice(cookRecipeBindDevice)); - } catch (Exception e) { - return error(e.getMessage()); - } - } - - /** - * 修改设备绑定多档口子 - */ - @ApiOperation(value = "修改设备绑定多档口子") - //@PreventRepeatSubmit - //@RequiresPermissions("device:device:edit") - @SysLog(title = "设备绑定多档口子", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改设备绑定多档口子") - @PostMapping("/edit") - public AjaxResult edit(@RequestBody CookRecipeBindDevice cookRecipeBindDevice) { - try { - return toAjax(cookRecipeBindDeviceService.updateCookRecipeBindDevice(cookRecipeBindDevice)); - } catch (Exception e) { - return error(e.getMessage()); - } - } - - /** - * 删除设备绑定多档口子 - */ - @ApiOperation(value = "删除设备绑定多档口子") - //@PreventRepeatSubmit - //@RequiresPermissions("device:device:remove") - @SysLog(title = "设备绑定多档口子", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除设备绑定多档口子") - @PostMapping("/del/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(cookRecipeBindDeviceService.deleteCookRecipeBindDeviceByIds(ids)); - } -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/CookRecipeBindDevice.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/CookRecipeBindDevice.java deleted file mode 100644 index 0971f47..0000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/domain/CookRecipeBindDevice.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.bonus.canteen.core.device.domain; - -import com.bonus.common.core.annotation.Excel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.ToString; -import com.bonus.common.core.web.domain.BaseEntity; - -/** - * 设备绑定多档口子对象 cook_recipe_bind_device - * - * @author xsheng - * @date 2025-05-25 - */ - - -@Data -@ToString -public class CookRecipeBindDevice extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** 主键id */ - private Long id; - - /** 设备id */ - @Excel(name = "设备id ") - @ApiModelProperty(value = "设备id ") - private Long deviceId; - - /** 食堂ID */ - @Excel(name = "食堂ID") - @ApiModelProperty(value = "食堂ID") - private Long canteenId; - - /** 店铺档口id */ - @Excel(name = "店铺档口id") - @ApiModelProperty(value = "店铺档口id") - private Long stallId; - - /** 菜谱id */ - @Excel(name = "菜谱id") - @ApiModelProperty(value = "菜谱id") - private Long recipeId; - - -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/CookRecipeBindDeviceMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/CookRecipeBindDeviceMapper.java deleted file mode 100644 index 5ea06b7..0000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/mapper/CookRecipeBindDeviceMapper.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.bonus.canteen.core.device.mapper; - -import java.util.List; -import com.bonus.canteen.core.device.domain.CookRecipeBindDevice; - -/** - * 设备绑定多档口子Mapper接口 - * - * @author xsheng - * @date 2025-05-25 - */ -public interface CookRecipeBindDeviceMapper { - /** - * 查询设备绑定多档口子 - * - * @param id 设备绑定多档口子主键 - * @return 设备绑定多档口子 - */ - public CookRecipeBindDevice selectCookRecipeBindDeviceById(Long id); - - /** - * 查询设备绑定多档口子列表 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 设备绑定多档口子集合 - */ - public List selectCookRecipeBindDeviceList(CookRecipeBindDevice cookRecipeBindDevice); - - /** - * 新增设备绑定多档口子 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 结果 - */ - public int insertCookRecipeBindDevice(CookRecipeBindDevice cookRecipeBindDevice); - - /** - * 修改设备绑定多档口子 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 结果 - */ - public int updateCookRecipeBindDevice(CookRecipeBindDevice cookRecipeBindDevice); - - /** - * 删除设备绑定多档口子 - * - * @param id 设备绑定多档口子主键 - * @return 结果 - */ - public int deleteCookRecipeBindDeviceById(Long id); - - /** - * 批量删除设备绑定多档口子 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteCookRecipeBindDeviceByIds(Long[] ids); -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/ICookRecipeBindDeviceService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/ICookRecipeBindDeviceService.java deleted file mode 100644 index e417318..0000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/ICookRecipeBindDeviceService.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.bonus.canteen.core.device.service; - -import java.util.List; -import com.bonus.canteen.core.device.domain.CookRecipeBindDevice; - -/** - * 设备绑定多档口子Service接口 - * - * @author xsheng - * @date 2025-05-25 - */ -public interface ICookRecipeBindDeviceService { - /** - * 查询设备绑定多档口子 - * - * @param id 设备绑定多档口子主键 - * @return 设备绑定多档口子 - */ - public CookRecipeBindDevice selectCookRecipeBindDeviceById(Long id); - - /** - * 查询设备绑定多档口子列表 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 设备绑定多档口子集合 - */ - public List selectCookRecipeBindDeviceList(CookRecipeBindDevice cookRecipeBindDevice); - - /** - * 新增设备绑定多档口子 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 结果 - */ - public int insertCookRecipeBindDevice(CookRecipeBindDevice cookRecipeBindDevice); - - /** - * 修改设备绑定多档口子 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 结果 - */ - public int updateCookRecipeBindDevice(CookRecipeBindDevice cookRecipeBindDevice); - - /** - * 批量删除设备绑定多档口子 - * - * @param ids 需要删除的设备绑定多档口子主键集合 - * @return 结果 - */ - public int deleteCookRecipeBindDeviceByIds(Long[] ids); - - /** - * 删除设备绑定多档口子信息 - * - * @param id 设备绑定多档口子主键 - * @return 结果 - */ - public int deleteCookRecipeBindDeviceById(Long id); -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/impl/CookRecipeBindDeviceServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/impl/CookRecipeBindDeviceServiceImpl.java deleted file mode 100644 index 5b232d9..0000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/device/service/impl/CookRecipeBindDeviceServiceImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.bonus.canteen.core.device.service.impl; - -import java.util.List; -import com.bonus.common.core.exception.ServiceException; -import com.bonus.common.core.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.bonus.canteen.core.device.mapper.CookRecipeBindDeviceMapper; -import com.bonus.canteen.core.device.domain.CookRecipeBindDevice; -import com.bonus.canteen.core.device.service.ICookRecipeBindDeviceService; - -/** - * 设备绑定多档口子Service业务层处理 - * - * @author xsheng - * @date 2025-05-25 - */ -@Service -public class CookRecipeBindDeviceServiceImpl implements ICookRecipeBindDeviceService { - @Autowired - private CookRecipeBindDeviceMapper cookRecipeBindDeviceMapper; - - /** - * 查询设备绑定多档口子 - * - * @param id 设备绑定多档口子主键 - * @return 设备绑定多档口子 - */ - @Override - public CookRecipeBindDevice selectCookRecipeBindDeviceById(Long id) { - return cookRecipeBindDeviceMapper.selectCookRecipeBindDeviceById(id); - } - - /** - * 查询设备绑定多档口子列表 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 设备绑定多档口子 - */ - @Override - public List selectCookRecipeBindDeviceList(CookRecipeBindDevice cookRecipeBindDevice) { - return cookRecipeBindDeviceMapper.selectCookRecipeBindDeviceList(cookRecipeBindDevice); - } - - /** - * 新增设备绑定多档口子 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 结果 - */ - @Override - public int insertCookRecipeBindDevice(CookRecipeBindDevice cookRecipeBindDevice) { - cookRecipeBindDevice.setCreateTime(DateUtils.getNowDate()); - try { - return cookRecipeBindDeviceMapper.insertCookRecipeBindDevice(cookRecipeBindDevice); - } catch (Exception e) { - throw new ServiceException(e.getMessage()); - } - } - - /** - * 修改设备绑定多档口子 - * - * @param cookRecipeBindDevice 设备绑定多档口子 - * @return 结果 - */ - @Override - public int updateCookRecipeBindDevice(CookRecipeBindDevice cookRecipeBindDevice) { - cookRecipeBindDevice.setUpdateTime(DateUtils.getNowDate()); - try { - return cookRecipeBindDeviceMapper.updateCookRecipeBindDevice(cookRecipeBindDevice); - } catch (Exception e) { - throw new ServiceException(e.getMessage()); - } - } - - /** - * 批量删除设备绑定多档口子 - * - * @param ids 需要删除的设备绑定多档口子主键 - * @return 结果 - */ - @Override - public int deleteCookRecipeBindDeviceByIds(Long[] ids) { - return cookRecipeBindDeviceMapper.deleteCookRecipeBindDeviceByIds(ids); - } - - /** - * 删除设备绑定多档口子信息 - * - * @param id 设备绑定多档口子主键 - * @return 结果 - */ - @Override - public int deleteCookRecipeBindDeviceById(Long id) { - return cookRecipeBindDeviceMapper.deleteCookRecipeBindDeviceById(id); - } -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/device/CookRecipeBindDeviceMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/device/CookRecipeBindDeviceMapper.xml deleted file mode 100644 index 6b3d2ef..0000000 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/device/CookRecipeBindDeviceMapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - select id, device_id, canteen_id, stall_id, recipe_id, create_by, create_time, update_by, update_time from cook_recipe_bind_device - - - - - - - - insert into cook_recipe_bind_device - - device_id, - canteen_id, - stall_id, - recipe_id, - create_by, - create_time, - update_by, - update_time, - - - #{deviceId}, - #{canteenId}, - #{stallId}, - #{recipeId}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - - - - - update cook_recipe_bind_device - - device_id = #{deviceId}, - canteen_id = #{canteenId}, - stall_id = #{stallId}, - recipe_id = #{recipeId}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - - where id = #{id} - - - - delete from cook_recipe_bind_device where id = #{id} - - - - delete from cook_recipe_bind_device where id in - - #{id} - - - \ No newline at end of file