diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuCollectionDishesController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuCollectionDishesController.java new file mode 100644 index 0000000..81e9cd5 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuCollectionDishesController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.menu.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.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.menu.domain.MenuCollectionDishes; +import com.bonus.canteen.core.menu.service.IMenuCollectionDishesService; +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-04-20 + */ +@Api(tags = "菜品收藏接口") +@RestController +@RequestMapping("/menu_collection_dishes") +public class MenuCollectionDishesController extends BaseController { + @Autowired + private IMenuCollectionDishesService menuCollectionDishesService; + + /** + * 查询菜品收藏列表 + */ + @ApiOperation(value = "查询菜品收藏列表") + //@RequiresPermissions("menu:dishes:list") + @GetMapping("/list") + public TableDataInfo list(MenuCollectionDishes menuCollectionDishes) { + startPage(); + List list = menuCollectionDishesService.selectMenuCollectionDishesList(menuCollectionDishes); + return getDataTable(list); + } + + /** + * 导出菜品收藏列表 + */ + @ApiOperation(value = "导出菜品收藏列表") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:dishes:export") + @SysLog(title = "菜品收藏", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出菜品收藏") + @PostMapping("/export") + public void export(HttpServletResponse response, MenuCollectionDishes menuCollectionDishes) { + List list = menuCollectionDishesService.selectMenuCollectionDishesList(menuCollectionDishes); + ExcelUtil util = new ExcelUtil(MenuCollectionDishes.class); + util.exportExcel(response, list, "菜品收藏数据"); + } + + /** + * 获取菜品收藏详细信息 + */ + @ApiOperation(value = "获取菜品收藏详细信息") + //@RequiresPermissions("menu:dishes:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(menuCollectionDishesService.selectMenuCollectionDishesById(id)); + } + + /** + * 新增菜品收藏 + */ + @ApiOperation(value = "新增菜品收藏") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:dishes:add") + @SysLog(title = "菜品收藏", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增菜品收藏") + @PostMapping + public AjaxResult add(@RequestBody MenuCollectionDishes menuCollectionDishes) { + try { + return toAjax(menuCollectionDishesService.insertMenuCollectionDishes(menuCollectionDishes)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改菜品收藏 + */ + @ApiOperation(value = "修改菜品收藏") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:dishes:edit") + @SysLog(title = "菜品收藏", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改菜品收藏") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody MenuCollectionDishes menuCollectionDishes) { + try { + return toAjax(menuCollectionDishesService.updateMenuCollectionDishes(menuCollectionDishes)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除菜品收藏 + */ + @ApiOperation(value = "删除菜品收藏") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:dishes:remove") + @SysLog(title = "菜品收藏", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除菜品收藏") + @PostMapping("/del/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(menuCollectionDishesService.deleteMenuCollectionDishesByIds(ids)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaDetailController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaDetailController.java new file mode 100644 index 0000000..29e7f13 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaDetailController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.menu.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.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.menu.domain.MenuEvaluaDetail; +import com.bonus.canteen.core.menu.service.IMenuEvaluaDetailService; +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-04-20 + */ +@Api(tags = "订单评价菜品接口") +@RestController +@RequestMapping("/menu_evalua_detail") +public class MenuEvaluaDetailController extends BaseController { + @Autowired + private IMenuEvaluaDetailService menuEvaluaDetailService; + + /** + * 查询订单评价菜品列表 + */ + @ApiOperation(value = "查询订单评价菜品列表") + //@RequiresPermissions("menu:detail:list") + @GetMapping("/list") + public TableDataInfo list(MenuEvaluaDetail menuEvaluaDetail) { + startPage(); + List list = menuEvaluaDetailService.selectMenuEvaluaDetailList(menuEvaluaDetail); + return getDataTable(list); + } + + /** + * 导出订单评价菜品列表 + */ + @ApiOperation(value = "导出订单评价菜品列表") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:detail:export") + @SysLog(title = "订单评价菜品", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出订单评价菜品") + @PostMapping("/export") + public void export(HttpServletResponse response, MenuEvaluaDetail menuEvaluaDetail) { + List list = menuEvaluaDetailService.selectMenuEvaluaDetailList(menuEvaluaDetail); + ExcelUtil util = new ExcelUtil(MenuEvaluaDetail.class); + util.exportExcel(response, list, "订单评价菜品数据"); + } + + /** + * 获取订单评价菜品详细信息 + */ + @ApiOperation(value = "获取订单评价菜品详细信息") + //@RequiresPermissions("menu:detail:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(menuEvaluaDetailService.selectMenuEvaluaDetailById(id)); + } + + /** + * 新增订单评价菜品 + */ + @ApiOperation(value = "新增订单评价菜品") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:detail:add") + @SysLog(title = "订单评价菜品", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增订单评价菜品") + @PostMapping + public AjaxResult add(@RequestBody MenuEvaluaDetail menuEvaluaDetail) { + try { + return toAjax(menuEvaluaDetailService.insertMenuEvaluaDetail(menuEvaluaDetail)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改订单评价菜品 + */ + @ApiOperation(value = "修改订单评价菜品") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:detail:edit") + @SysLog(title = "订单评价菜品", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改订单评价菜品") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody MenuEvaluaDetail menuEvaluaDetail) { + try { + return toAjax(menuEvaluaDetailService.updateMenuEvaluaDetail(menuEvaluaDetail)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除订单评价菜品 + */ + @ApiOperation(value = "删除订单评价菜品") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:detail:remove") + @SysLog(title = "订单评价菜品", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除订单评价菜品") + @PostMapping("/del/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(menuEvaluaDetailService.deleteMenuEvaluaDetailByIds(ids)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaOrderController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaOrderController.java new file mode 100644 index 0000000..4eaca52 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaOrderController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.menu.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.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.menu.domain.MenuEvaluaOrder; +import com.bonus.canteen.core.menu.service.IMenuEvaluaOrderService; +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-04-20 + */ +@Api(tags = "订单评价接口") +@RestController +@RequestMapping("/menu_evalua_order") +public class MenuEvaluaOrderController extends BaseController { + @Autowired + private IMenuEvaluaOrderService menuEvaluaOrderService; + + /** + * 查询订单评价列表 + */ + @ApiOperation(value = "查询订单评价列表") + //@RequiresPermissions("menu:order:list") + @GetMapping("/list") + public TableDataInfo list(MenuEvaluaOrder menuEvaluaOrder) { + startPage(); + List list = menuEvaluaOrderService.selectMenuEvaluaOrderList(menuEvaluaOrder); + return getDataTable(list); + } + + /** + * 导出订单评价列表 + */ + @ApiOperation(value = "导出订单评价列表") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:order:export") + @SysLog(title = "订单评价", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出订单评价") + @PostMapping("/export") + public void export(HttpServletResponse response, MenuEvaluaOrder menuEvaluaOrder) { + List list = menuEvaluaOrderService.selectMenuEvaluaOrderList(menuEvaluaOrder); + ExcelUtil util = new ExcelUtil(MenuEvaluaOrder.class); + util.exportExcel(response, list, "订单评价数据"); + } + + /** + * 获取订单评价详细信息 + */ + @ApiOperation(value = "获取订单评价详细信息") + //@RequiresPermissions("menu:order:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(menuEvaluaOrderService.selectMenuEvaluaOrderById(id)); + } + + /** + * 新增订单评价 + */ + @ApiOperation(value = "新增订单评价") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:order:add") + @SysLog(title = "订单评价", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增订单评价") + @PostMapping + public AjaxResult add(@RequestBody MenuEvaluaOrder menuEvaluaOrder) { + try { + return toAjax(menuEvaluaOrderService.insertMenuEvaluaOrder(menuEvaluaOrder)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改订单评价 + */ + @ApiOperation(value = "修改订单评价") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:order:edit") + @SysLog(title = "订单评价", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改订单评价") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody MenuEvaluaOrder menuEvaluaOrder) { + try { + return toAjax(menuEvaluaOrderService.updateMenuEvaluaOrder(menuEvaluaOrder)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除订单评价 + */ + @ApiOperation(value = "删除订单评价") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:order:remove") + @SysLog(title = "订单评价", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除订单评价") + @PostMapping("/del/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(menuEvaluaOrderService.deleteMenuEvaluaOrderByIds(ids)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaPictureController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaPictureController.java new file mode 100644 index 0000000..9181d68 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/controller/MenuEvaluaPictureController.java @@ -0,0 +1,119 @@ +package com.bonus.canteen.core.menu.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import com.bonus.common.log.enums.OperaType; +import com.bonus.canteen.core.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.menu.domain.MenuEvaluaPicture; +import com.bonus.canteen.core.menu.service.IMenuEvaluaPictureService; +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-04-20 + */ +@Api(tags = "订单评价菜品接口") +@RestController +@RequestMapping("/menu_evalua_picture") +public class MenuEvaluaPictureController extends BaseController { + @Autowired + private IMenuEvaluaPictureService menuEvaluaPictureService; + + /** + * 查询订单评价菜品列表 + */ + @ApiOperation(value = "查询订单评价菜品列表") + //@RequiresPermissions("menu:picture:list") + @GetMapping("/list") + public TableDataInfo list(MenuEvaluaPicture menuEvaluaPicture) { + startPage(); + List list = menuEvaluaPictureService.selectMenuEvaluaPictureList(menuEvaluaPicture); + return getDataTable(list); + } + + /** + * 导出订单评价菜品列表 + */ + @ApiOperation(value = "导出订单评价菜品列表") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:picture:export") + @SysLog(title = "订单评价菜品", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出订单评价菜品") + @PostMapping("/export") + public void export(HttpServletResponse response, MenuEvaluaPicture menuEvaluaPicture) { + List list = menuEvaluaPictureService.selectMenuEvaluaPictureList(menuEvaluaPicture); + ExcelUtil util = new ExcelUtil(MenuEvaluaPicture.class); + util.exportExcel(response, list, "订单评价菜品数据"); + } + + /** + * 获取订单评价菜品详细信息 + */ + @ApiOperation(value = "获取订单评价菜品详细信息") + //@RequiresPermissions("menu:picture:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(menuEvaluaPictureService.selectMenuEvaluaPictureById(id)); + } + + /** + * 新增订单评价菜品 + */ + @ApiOperation(value = "新增订单评价菜品") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:picture:add") + @SysLog(title = "订单评价菜品", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增订单评价菜品") + @PostMapping + public AjaxResult add(@RequestBody MenuEvaluaPicture menuEvaluaPicture) { + try { + return toAjax(menuEvaluaPictureService.insertMenuEvaluaPicture(menuEvaluaPicture)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 修改订单评价菜品 + */ + @ApiOperation(value = "修改订单评价菜品") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:picture:edit") + @SysLog(title = "订单评价菜品", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改订单评价菜品") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody MenuEvaluaPicture menuEvaluaPicture) { + try { + return toAjax(menuEvaluaPictureService.updateMenuEvaluaPicture(menuEvaluaPicture)); + } catch (Exception e) { + return error("系统错误, " + e.getMessage()); + } + } + + /** + * 删除订单评价菜品 + */ + @ApiOperation(value = "删除订单评价菜品") + //@PreventRepeatSubmit + //@RequiresPermissions("menu:picture:remove") + @SysLog(title = "订单评价菜品", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除订单评价菜品") + @PostMapping("/del/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(menuEvaluaPictureService.deleteMenuEvaluaPictureByIds(ids)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuCollectionDishes.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuCollectionDishes.java new file mode 100644 index 0000000..f9fe7f7 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuCollectionDishes.java @@ -0,0 +1,49 @@ +package com.bonus.canteen.core.menu.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; + +/** + * 菜品收藏对象 menu_collection_dishes + * + * @author xsheng + * @date 2025-04-20 + */ + + +@Data +@ToString +public class MenuCollectionDishes extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键自增 */ + private Long id; + + /** 人员id */ + @Excel(name = "人员id") + @ApiModelProperty(value = "人员id") + private Long userId; + + /** 店铺档口id */ + @Excel(name = "店铺档口id") + @ApiModelProperty(value = "店铺档口id") + private Long shopstallId; + + /** 菜品id */ + @Excel(name = "菜品id") + @ApiModelProperty(value = "菜品id") + private Long dishesId; + + /** 乐观锁 */ + @Excel(name = "乐观锁") + @ApiModelProperty(value = "乐观锁") + private Long revision; + + /** 删除标识(0:正常 2:删除) */ + private Long delFlag; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaDetail.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaDetail.java new file mode 100644 index 0000000..c4a1506 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaDetail.java @@ -0,0 +1,61 @@ +package com.bonus.canteen.core.menu.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; + +/** + * 订单评价菜品对象 menu_evalua_detail + * + * @author xsheng + * @date 2025-04-20 + */ + + +@Data +@ToString +public class MenuEvaluaDetail extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 详情id */ + @Excel(name = "详情id") + @ApiModelProperty(value = "详情id") + private Long detailId; + + /** 评价id */ + @Excel(name = "评价id") + @ApiModelProperty(value = "评价id") + private Long evaluaId; + + /** 餐品类型(1-菜品,2-套餐,3-商品) */ + @Excel(name = "餐品类型(1-菜品,2-套餐,3-商品)") + @ApiModelProperty(value = "餐品类型(1-菜品,2-套餐,3-商品)") + private Long mealType; + + /** 餐品id */ + @Excel(name = "餐品id") + @ApiModelProperty(value = "餐品id") + private Long mealId; + + /** 星级 */ + @Excel(name = "星级") + @ApiModelProperty(value = "星级") + private Long starLevel; + + /** 描述 */ + @Excel(name = "描述") + @ApiModelProperty(value = "描述") + private String description; + + /** 乐观锁 */ + @Excel(name = "乐观锁") + @ApiModelProperty(value = "乐观锁") + private Long revision; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaOrder.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaOrder.java new file mode 100644 index 0000000..bd692bc --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaOrder.java @@ -0,0 +1,82 @@ +package com.bonus.canteen.core.menu.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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; + +/** + * 订单评价对象 menu_evalua_order + * + * @author xsheng + * @date 2025-04-20 + */ + + +@Data +@ToString +public class MenuEvaluaOrder extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 评价id */ + @Excel(name = "评价id") + @ApiModelProperty(value = "评价id") + private Long evaluaId; + + /** 订单编号 */ + @Excel(name = "订单编号") + @ApiModelProperty(value = "订单编号") + private Long ordId; + + /** 星级 */ + @Excel(name = "星级") + @ApiModelProperty(value = "星级") + private Long starLevel; + + /** 描述 */ + @Excel(name = "描述") + @ApiModelProperty(value = "描述") + private String description; + + /** 描述回复 */ + @Excel(name = "描述回复") + @ApiModelProperty(value = "描述回复") + private String reply; + + /** 描述回复时间 */ + @ApiModelProperty(value = "描述回复时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "描述回复时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date replyTime; + + /** 档口或店铺id */ + @Excel(name = "档口或店铺id") + @ApiModelProperty(value = "档口或店铺id") + private Long shopstallId; + + /** 展示状态(1-展示,2-不展示) */ + @Excel(name = "展示状态(1-展示,2-不展示)") + @ApiModelProperty(value = "展示状态(1-展示,2-不展示)") + private Long showFlag; + + /** 删除标识(0-正常,2-删除) */ + private Long delFlag; + + /** 乐观锁 */ + @Excel(name = "乐观锁") + @ApiModelProperty(value = "乐观锁") + private Long revision; + + /** 订单评价类型1食堂2商超 */ + @Excel(name = "订单评价类型1食堂2商超") + @ApiModelProperty(value = "订单评价类型1食堂2商超") + private Long orderEvaluaType; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaPicture.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaPicture.java new file mode 100644 index 0000000..a2f6d82 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/domain/MenuEvaluaPicture.java @@ -0,0 +1,41 @@ +package com.bonus.canteen.core.menu.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; + +/** + * 订单评价菜品对象 menu_evalua_picture + * + * @author xsheng + * @date 2025-04-20 + */ + + +@Data +@ToString +public class MenuEvaluaPicture extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 评价id */ + @Excel(name = "评价id") + @ApiModelProperty(value = "评价id") + private Long evaluaId; + + /** 图片路径 */ + @Excel(name = "图片路径") + @ApiModelProperty(value = "图片路径") + private String pictureUrl; + + /** 乐观锁 */ + @Excel(name = "乐观锁") + @ApiModelProperty(value = "乐观锁") + private Long revision; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuCollectionDishesMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuCollectionDishesMapper.java new file mode 100644 index 0000000..a8079a5 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuCollectionDishesMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.mapper; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuCollectionDishes; + +/** + * 菜品收藏Mapper接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface MenuCollectionDishesMapper { + /** + * 查询菜品收藏 + * + * @param id 菜品收藏主键 + * @return 菜品收藏 + */ + public MenuCollectionDishes selectMenuCollectionDishesById(Long id); + + /** + * 查询菜品收藏列表 + * + * @param menuCollectionDishes 菜品收藏 + * @return 菜品收藏集合 + */ + public List selectMenuCollectionDishesList(MenuCollectionDishes menuCollectionDishes); + + /** + * 新增菜品收藏 + * + * @param menuCollectionDishes 菜品收藏 + * @return 结果 + */ + public int insertMenuCollectionDishes(MenuCollectionDishes menuCollectionDishes); + + /** + * 修改菜品收藏 + * + * @param menuCollectionDishes 菜品收藏 + * @return 结果 + */ + public int updateMenuCollectionDishes(MenuCollectionDishes menuCollectionDishes); + + /** + * 删除菜品收藏 + * + * @param id 菜品收藏主键 + * @return 结果 + */ + public int deleteMenuCollectionDishesById(Long id); + + /** + * 批量删除菜品收藏 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMenuCollectionDishesByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaDetailMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaDetailMapper.java new file mode 100644 index 0000000..95bc06b --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaDetailMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.mapper; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuEvaluaDetail; + +/** + * 订单评价菜品Mapper接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface MenuEvaluaDetailMapper { + /** + * 查询订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 订单评价菜品 + */ + public MenuEvaluaDetail selectMenuEvaluaDetailById(Long id); + + /** + * 查询订单评价菜品列表 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 订单评价菜品集合 + */ + public List selectMenuEvaluaDetailList(MenuEvaluaDetail menuEvaluaDetail); + + /** + * 新增订单评价菜品 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 结果 + */ + public int insertMenuEvaluaDetail(MenuEvaluaDetail menuEvaluaDetail); + + /** + * 修改订单评价菜品 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 结果 + */ + public int updateMenuEvaluaDetail(MenuEvaluaDetail menuEvaluaDetail); + + /** + * 删除订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 结果 + */ + public int deleteMenuEvaluaDetailById(Long id); + + /** + * 批量删除订单评价菜品 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMenuEvaluaDetailByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaOrderMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaOrderMapper.java new file mode 100644 index 0000000..bd1018f --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaOrderMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.mapper; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuEvaluaOrder; + +/** + * 订单评价Mapper接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface MenuEvaluaOrderMapper { + /** + * 查询订单评价 + * + * @param id 订单评价主键 + * @return 订单评价 + */ + public MenuEvaluaOrder selectMenuEvaluaOrderById(Long id); + + /** + * 查询订单评价列表 + * + * @param menuEvaluaOrder 订单评价 + * @return 订单评价集合 + */ + public List selectMenuEvaluaOrderList(MenuEvaluaOrder menuEvaluaOrder); + + /** + * 新增订单评价 + * + * @param menuEvaluaOrder 订单评价 + * @return 结果 + */ + public int insertMenuEvaluaOrder(MenuEvaluaOrder menuEvaluaOrder); + + /** + * 修改订单评价 + * + * @param menuEvaluaOrder 订单评价 + * @return 结果 + */ + public int updateMenuEvaluaOrder(MenuEvaluaOrder menuEvaluaOrder); + + /** + * 删除订单评价 + * + * @param id 订单评价主键 + * @return 结果 + */ + public int deleteMenuEvaluaOrderById(Long id); + + /** + * 批量删除订单评价 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMenuEvaluaOrderByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaPictureMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaPictureMapper.java new file mode 100644 index 0000000..d9b8d06 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/mapper/MenuEvaluaPictureMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.mapper; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuEvaluaPicture; + +/** + * 订单评价菜品Mapper接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface MenuEvaluaPictureMapper { + /** + * 查询订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 订单评价菜品 + */ + public MenuEvaluaPicture selectMenuEvaluaPictureById(Long id); + + /** + * 查询订单评价菜品列表 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 订单评价菜品集合 + */ + public List selectMenuEvaluaPictureList(MenuEvaluaPicture menuEvaluaPicture); + + /** + * 新增订单评价菜品 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 结果 + */ + public int insertMenuEvaluaPicture(MenuEvaluaPicture menuEvaluaPicture); + + /** + * 修改订单评价菜品 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 结果 + */ + public int updateMenuEvaluaPicture(MenuEvaluaPicture menuEvaluaPicture); + + /** + * 删除订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 结果 + */ + public int deleteMenuEvaluaPictureById(Long id); + + /** + * 批量删除订单评价菜品 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMenuEvaluaPictureByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuCollectionDishesService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuCollectionDishesService.java new file mode 100644 index 0000000..633c5e3 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuCollectionDishesService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.service; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuCollectionDishes; + +/** + * 菜品收藏Service接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface IMenuCollectionDishesService { + /** + * 查询菜品收藏 + * + * @param id 菜品收藏主键 + * @return 菜品收藏 + */ + public MenuCollectionDishes selectMenuCollectionDishesById(Long id); + + /** + * 查询菜品收藏列表 + * + * @param menuCollectionDishes 菜品收藏 + * @return 菜品收藏集合 + */ + public List selectMenuCollectionDishesList(MenuCollectionDishes menuCollectionDishes); + + /** + * 新增菜品收藏 + * + * @param menuCollectionDishes 菜品收藏 + * @return 结果 + */ + public int insertMenuCollectionDishes(MenuCollectionDishes menuCollectionDishes); + + /** + * 修改菜品收藏 + * + * @param menuCollectionDishes 菜品收藏 + * @return 结果 + */ + public int updateMenuCollectionDishes(MenuCollectionDishes menuCollectionDishes); + + /** + * 批量删除菜品收藏 + * + * @param ids 需要删除的菜品收藏主键集合 + * @return 结果 + */ + public int deleteMenuCollectionDishesByIds(Long[] ids); + + /** + * 删除菜品收藏信息 + * + * @param id 菜品收藏主键 + * @return 结果 + */ + public int deleteMenuCollectionDishesById(Long id); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaDetailService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaDetailService.java new file mode 100644 index 0000000..5b231c0 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaDetailService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.service; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuEvaluaDetail; + +/** + * 订单评价菜品Service接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface IMenuEvaluaDetailService { + /** + * 查询订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 订单评价菜品 + */ + public MenuEvaluaDetail selectMenuEvaluaDetailById(Long id); + + /** + * 查询订单评价菜品列表 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 订单评价菜品集合 + */ + public List selectMenuEvaluaDetailList(MenuEvaluaDetail menuEvaluaDetail); + + /** + * 新增订单评价菜品 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 结果 + */ + public int insertMenuEvaluaDetail(MenuEvaluaDetail menuEvaluaDetail); + + /** + * 修改订单评价菜品 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 结果 + */ + public int updateMenuEvaluaDetail(MenuEvaluaDetail menuEvaluaDetail); + + /** + * 批量删除订单评价菜品 + * + * @param ids 需要删除的订单评价菜品主键集合 + * @return 结果 + */ + public int deleteMenuEvaluaDetailByIds(Long[] ids); + + /** + * 删除订单评价菜品信息 + * + * @param id 订单评价菜品主键 + * @return 结果 + */ + public int deleteMenuEvaluaDetailById(Long id); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaOrderService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaOrderService.java new file mode 100644 index 0000000..f807fa8 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaOrderService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.service; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuEvaluaOrder; + +/** + * 订单评价Service接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface IMenuEvaluaOrderService { + /** + * 查询订单评价 + * + * @param id 订单评价主键 + * @return 订单评价 + */ + public MenuEvaluaOrder selectMenuEvaluaOrderById(Long id); + + /** + * 查询订单评价列表 + * + * @param menuEvaluaOrder 订单评价 + * @return 订单评价集合 + */ + public List selectMenuEvaluaOrderList(MenuEvaluaOrder menuEvaluaOrder); + + /** + * 新增订单评价 + * + * @param menuEvaluaOrder 订单评价 + * @return 结果 + */ + public int insertMenuEvaluaOrder(MenuEvaluaOrder menuEvaluaOrder); + + /** + * 修改订单评价 + * + * @param menuEvaluaOrder 订单评价 + * @return 结果 + */ + public int updateMenuEvaluaOrder(MenuEvaluaOrder menuEvaluaOrder); + + /** + * 批量删除订单评价 + * + * @param ids 需要删除的订单评价主键集合 + * @return 结果 + */ + public int deleteMenuEvaluaOrderByIds(Long[] ids); + + /** + * 删除订单评价信息 + * + * @param id 订单评价主键 + * @return 结果 + */ + public int deleteMenuEvaluaOrderById(Long id); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaPictureService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaPictureService.java new file mode 100644 index 0000000..8f75192 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/IMenuEvaluaPictureService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.menu.service; + +import java.util.List; +import com.bonus.canteen.core.menu.domain.MenuEvaluaPicture; + +/** + * 订单评价菜品Service接口 + * + * @author xsheng + * @date 2025-04-20 + */ +public interface IMenuEvaluaPictureService { + /** + * 查询订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 订单评价菜品 + */ + public MenuEvaluaPicture selectMenuEvaluaPictureById(Long id); + + /** + * 查询订单评价菜品列表 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 订单评价菜品集合 + */ + public List selectMenuEvaluaPictureList(MenuEvaluaPicture menuEvaluaPicture); + + /** + * 新增订单评价菜品 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 结果 + */ + public int insertMenuEvaluaPicture(MenuEvaluaPicture menuEvaluaPicture); + + /** + * 修改订单评价菜品 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 结果 + */ + public int updateMenuEvaluaPicture(MenuEvaluaPicture menuEvaluaPicture); + + /** + * 批量删除订单评价菜品 + * + * @param ids 需要删除的订单评价菜品主键集合 + * @return 结果 + */ + public int deleteMenuEvaluaPictureByIds(Long[] ids); + + /** + * 删除订单评价菜品信息 + * + * @param id 订单评价菜品主键 + * @return 结果 + */ + public int deleteMenuEvaluaPictureById(Long id); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuCollectionDishesServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuCollectionDishesServiceImpl.java new file mode 100644 index 0000000..0545ab0 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuCollectionDishesServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.menu.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.menu.mapper.MenuCollectionDishesMapper; +import com.bonus.canteen.core.menu.domain.MenuCollectionDishes; +import com.bonus.canteen.core.menu.service.IMenuCollectionDishesService; + +/** + * 菜品收藏Service业务层处理 + * + * @author xsheng + * @date 2025-04-20 + */ +@Service +public class MenuCollectionDishesServiceImpl implements IMenuCollectionDishesService { + @Autowired + private MenuCollectionDishesMapper menuCollectionDishesMapper; + + /** + * 查询菜品收藏 + * + * @param id 菜品收藏主键 + * @return 菜品收藏 + */ + @Override + public MenuCollectionDishes selectMenuCollectionDishesById(Long id) { + return menuCollectionDishesMapper.selectMenuCollectionDishesById(id); + } + + /** + * 查询菜品收藏列表 + * + * @param menuCollectionDishes 菜品收藏 + * @return 菜品收藏 + */ + @Override + public List selectMenuCollectionDishesList(MenuCollectionDishes menuCollectionDishes) { + return menuCollectionDishesMapper.selectMenuCollectionDishesList(menuCollectionDishes); + } + + /** + * 新增菜品收藏 + * + * @param menuCollectionDishes 菜品收藏 + * @return 结果 + */ + @Override + public int insertMenuCollectionDishes(MenuCollectionDishes menuCollectionDishes) { + menuCollectionDishes.setCreateTime(DateUtils.getNowDate()); + try { + return menuCollectionDishesMapper.insertMenuCollectionDishes(menuCollectionDishes); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 修改菜品收藏 + * + * @param menuCollectionDishes 菜品收藏 + * @return 结果 + */ + @Override + public int updateMenuCollectionDishes(MenuCollectionDishes menuCollectionDishes) { + menuCollectionDishes.setUpdateTime(DateUtils.getNowDate()); + try { + return menuCollectionDishesMapper.updateMenuCollectionDishes(menuCollectionDishes); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 批量删除菜品收藏 + * + * @param ids 需要删除的菜品收藏主键 + * @return 结果 + */ + @Override + public int deleteMenuCollectionDishesByIds(Long[] ids) { + return menuCollectionDishesMapper.deleteMenuCollectionDishesByIds(ids); + } + + /** + * 删除菜品收藏信息 + * + * @param id 菜品收藏主键 + * @return 结果 + */ + @Override + public int deleteMenuCollectionDishesById(Long id) { + return menuCollectionDishesMapper.deleteMenuCollectionDishesById(id); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaDetailServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaDetailServiceImpl.java new file mode 100644 index 0000000..76c2d43 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaDetailServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.menu.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.menu.mapper.MenuEvaluaDetailMapper; +import com.bonus.canteen.core.menu.domain.MenuEvaluaDetail; +import com.bonus.canteen.core.menu.service.IMenuEvaluaDetailService; + +/** + * 订单评价菜品Service业务层处理 + * + * @author xsheng + * @date 2025-04-20 + */ +@Service +public class MenuEvaluaDetailServiceImpl implements IMenuEvaluaDetailService { + @Autowired + private MenuEvaluaDetailMapper menuEvaluaDetailMapper; + + /** + * 查询订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 订单评价菜品 + */ + @Override + public MenuEvaluaDetail selectMenuEvaluaDetailById(Long id) { + return menuEvaluaDetailMapper.selectMenuEvaluaDetailById(id); + } + + /** + * 查询订单评价菜品列表 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 订单评价菜品 + */ + @Override + public List selectMenuEvaluaDetailList(MenuEvaluaDetail menuEvaluaDetail) { + return menuEvaluaDetailMapper.selectMenuEvaluaDetailList(menuEvaluaDetail); + } + + /** + * 新增订单评价菜品 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 结果 + */ + @Override + public int insertMenuEvaluaDetail(MenuEvaluaDetail menuEvaluaDetail) { + menuEvaluaDetail.setCreateTime(DateUtils.getNowDate()); + try { + return menuEvaluaDetailMapper.insertMenuEvaluaDetail(menuEvaluaDetail); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 修改订单评价菜品 + * + * @param menuEvaluaDetail 订单评价菜品 + * @return 结果 + */ + @Override + public int updateMenuEvaluaDetail(MenuEvaluaDetail menuEvaluaDetail) { + menuEvaluaDetail.setUpdateTime(DateUtils.getNowDate()); + try { + return menuEvaluaDetailMapper.updateMenuEvaluaDetail(menuEvaluaDetail); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 批量删除订单评价菜品 + * + * @param ids 需要删除的订单评价菜品主键 + * @return 结果 + */ + @Override + public int deleteMenuEvaluaDetailByIds(Long[] ids) { + return menuEvaluaDetailMapper.deleteMenuEvaluaDetailByIds(ids); + } + + /** + * 删除订单评价菜品信息 + * + * @param id 订单评价菜品主键 + * @return 结果 + */ + @Override + public int deleteMenuEvaluaDetailById(Long id) { + return menuEvaluaDetailMapper.deleteMenuEvaluaDetailById(id); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaOrderServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaOrderServiceImpl.java new file mode 100644 index 0000000..0f5f797 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaOrderServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.menu.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.menu.mapper.MenuEvaluaOrderMapper; +import com.bonus.canteen.core.menu.domain.MenuEvaluaOrder; +import com.bonus.canteen.core.menu.service.IMenuEvaluaOrderService; + +/** + * 订单评价Service业务层处理 + * + * @author xsheng + * @date 2025-04-20 + */ +@Service +public class MenuEvaluaOrderServiceImpl implements IMenuEvaluaOrderService { + @Autowired + private MenuEvaluaOrderMapper menuEvaluaOrderMapper; + + /** + * 查询订单评价 + * + * @param id 订单评价主键 + * @return 订单评价 + */ + @Override + public MenuEvaluaOrder selectMenuEvaluaOrderById(Long id) { + return menuEvaluaOrderMapper.selectMenuEvaluaOrderById(id); + } + + /** + * 查询订单评价列表 + * + * @param menuEvaluaOrder 订单评价 + * @return 订单评价 + */ + @Override + public List selectMenuEvaluaOrderList(MenuEvaluaOrder menuEvaluaOrder) { + return menuEvaluaOrderMapper.selectMenuEvaluaOrderList(menuEvaluaOrder); + } + + /** + * 新增订单评价 + * + * @param menuEvaluaOrder 订单评价 + * @return 结果 + */ + @Override + public int insertMenuEvaluaOrder(MenuEvaluaOrder menuEvaluaOrder) { + menuEvaluaOrder.setCreateTime(DateUtils.getNowDate()); + try { + return menuEvaluaOrderMapper.insertMenuEvaluaOrder(menuEvaluaOrder); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 修改订单评价 + * + * @param menuEvaluaOrder 订单评价 + * @return 结果 + */ + @Override + public int updateMenuEvaluaOrder(MenuEvaluaOrder menuEvaluaOrder) { + menuEvaluaOrder.setUpdateTime(DateUtils.getNowDate()); + try { + return menuEvaluaOrderMapper.updateMenuEvaluaOrder(menuEvaluaOrder); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 批量删除订单评价 + * + * @param ids 需要删除的订单评价主键 + * @return 结果 + */ + @Override + public int deleteMenuEvaluaOrderByIds(Long[] ids) { + return menuEvaluaOrderMapper.deleteMenuEvaluaOrderByIds(ids); + } + + /** + * 删除订单评价信息 + * + * @param id 订单评价主键 + * @return 结果 + */ + @Override + public int deleteMenuEvaluaOrderById(Long id) { + return menuEvaluaOrderMapper.deleteMenuEvaluaOrderById(id); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaPictureServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaPictureServiceImpl.java new file mode 100644 index 0000000..24dbbee --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/menu/service/impl/MenuEvaluaPictureServiceImpl.java @@ -0,0 +1,98 @@ +package com.bonus.canteen.core.menu.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.menu.mapper.MenuEvaluaPictureMapper; +import com.bonus.canteen.core.menu.domain.MenuEvaluaPicture; +import com.bonus.canteen.core.menu.service.IMenuEvaluaPictureService; + +/** + * 订单评价菜品Service业务层处理 + * + * @author xsheng + * @date 2025-04-20 + */ +@Service +public class MenuEvaluaPictureServiceImpl implements IMenuEvaluaPictureService { + @Autowired + private MenuEvaluaPictureMapper menuEvaluaPictureMapper; + + /** + * 查询订单评价菜品 + * + * @param id 订单评价菜品主键 + * @return 订单评价菜品 + */ + @Override + public MenuEvaluaPicture selectMenuEvaluaPictureById(Long id) { + return menuEvaluaPictureMapper.selectMenuEvaluaPictureById(id); + } + + /** + * 查询订单评价菜品列表 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 订单评价菜品 + */ + @Override + public List selectMenuEvaluaPictureList(MenuEvaluaPicture menuEvaluaPicture) { + return menuEvaluaPictureMapper.selectMenuEvaluaPictureList(menuEvaluaPicture); + } + + /** + * 新增订单评价菜品 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 结果 + */ + @Override + public int insertMenuEvaluaPicture(MenuEvaluaPicture menuEvaluaPicture) { + menuEvaluaPicture.setCreateTime(DateUtils.getNowDate()); + try { + return menuEvaluaPictureMapper.insertMenuEvaluaPicture(menuEvaluaPicture); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 修改订单评价菜品 + * + * @param menuEvaluaPicture 订单评价菜品 + * @return 结果 + */ + @Override + public int updateMenuEvaluaPicture(MenuEvaluaPicture menuEvaluaPicture) { + menuEvaluaPicture.setUpdateTime(DateUtils.getNowDate()); + try { + return menuEvaluaPictureMapper.updateMenuEvaluaPicture(menuEvaluaPicture); + } catch (Exception e) { + throw new ServiceException("错误信息描述, " + e.getMessage()); + } + } + + /** + * 批量删除订单评价菜品 + * + * @param ids 需要删除的订单评价菜品主键 + * @return 结果 + */ + @Override + public int deleteMenuEvaluaPictureByIds(Long[] ids) { + return menuEvaluaPictureMapper.deleteMenuEvaluaPictureByIds(ids); + } + + /** + * 删除订单评价菜品信息 + * + * @param id 订单评价菜品主键 + * @return 结果 + */ + @Override + public int deleteMenuEvaluaPictureById(Long id) { + return menuEvaluaPictureMapper.deleteMenuEvaluaPictureById(id); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuCollectionDishesMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuCollectionDishesMapper.xml new file mode 100644 index 0000000..c51a490 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuCollectionDishesMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + select id, user_id, shopstall_id, dishes_id, revision, del_flag, create_by, create_time, update_by, update_time from menu_collection_dishes + + + + + + + + insert into menu_collection_dishes + + user_id, + shopstall_id, + dishes_id, + revision, + del_flag, + create_by, + create_time, + update_by, + update_time, + + + #{userId}, + #{shopstallId}, + #{dishesId}, + #{revision}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update menu_collection_dishes + + user_id = #{userId}, + shopstall_id = #{shopstallId}, + dishes_id = #{dishesId}, + revision = #{revision}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from menu_collection_dishes where id = #{id} + + + + delete from menu_collection_dishes where id in + + #{id} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaDetailMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaDetailMapper.xml new file mode 100644 index 0000000..638f35c --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaDetailMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + select id, detail_id, evalua_id, meal_type, meal_id, star_level, description, revision, create_by, create_time, update_by, update_time from menu_evalua_detail + + + + + + + + insert into menu_evalua_detail + + detail_id, + evalua_id, + meal_type, + meal_id, + star_level, + description, + revision, + create_by, + create_time, + update_by, + update_time, + + + #{detailId}, + #{evaluaId}, + #{mealType}, + #{mealId}, + #{starLevel}, + #{description}, + #{revision}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update menu_evalua_detail + + detail_id = #{detailId}, + evalua_id = #{evaluaId}, + meal_type = #{mealType}, + meal_id = #{mealId}, + star_level = #{starLevel}, + description = #{description}, + revision = #{revision}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from menu_evalua_detail where id = #{id} + + + + delete from menu_evalua_detail where id in + + #{id} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaOrderMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaOrderMapper.xml new file mode 100644 index 0000000..f48709c --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaOrderMapper.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, evalua_id, ord_id, star_level, description, reply, reply_time, shopstall_id, show_flag, del_flag, revision, order_evalua_type, create_by, create_time, update_by, update_time from menu_evalua_order + + + + + + + + insert into menu_evalua_order + + evalua_id, + ord_id, + star_level, + description, + reply, + reply_time, + shopstall_id, + show_flag, + del_flag, + revision, + order_evalua_type, + create_by, + create_time, + update_by, + update_time, + + + #{evaluaId}, + #{ordId}, + #{starLevel}, + #{description}, + #{reply}, + #{replyTime}, + #{shopstallId}, + #{showFlag}, + #{delFlag}, + #{revision}, + #{orderEvaluaType}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update menu_evalua_order + + evalua_id = #{evaluaId}, + ord_id = #{ordId}, + star_level = #{starLevel}, + description = #{description}, + reply = #{reply}, + reply_time = #{replyTime}, + shopstall_id = #{shopstallId}, + show_flag = #{showFlag}, + del_flag = #{delFlag}, + revision = #{revision}, + order_evalua_type = #{orderEvaluaType}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from menu_evalua_order where id = #{id} + + + + delete from menu_evalua_order where id in + + #{id} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaPictureMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaPictureMapper.xml new file mode 100644 index 0000000..fca4d76 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/menu/MenuEvaluaPictureMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + select id, evalua_id, picture_url, revision, create_by, create_time, update_by, update_time from menu_evalua_picture + + + + + + + + insert into menu_evalua_picture + + evalua_id, + picture_url, + revision, + create_by, + create_time, + update_by, + update_time, + + + #{evaluaId}, + #{pictureUrl}, + #{revision}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update menu_evalua_picture + + evalua_id = #{evaluaId}, + picture_url = #{pictureUrl}, + revision = #{revision}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from menu_evalua_picture where id = #{id} + + + + delete from menu_evalua_picture where id in + + #{id} + + + \ No newline at end of file