H5一周菜谱
This commit is contained in:
parent
deac8fc77b
commit
468d05804c
|
|
@ -7,6 +7,7 @@ import javax.validation.constraints.NotBlank;
|
|||
|
||||
@Data
|
||||
public class DeviceDTO {
|
||||
private Long id;
|
||||
@ApiModelProperty("主键id")
|
||||
private String deviceId;
|
||||
@ApiModelProperty("商家id")
|
||||
|
|
@ -47,4 +48,6 @@ public class DeviceDTO {
|
|||
private String updateBy;
|
||||
@ApiModelProperty("设备类型")
|
||||
private String deviceType;
|
||||
@ApiModelProperty("菜谱id")
|
||||
private String recipeId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import javax.validation.constraints.NotBlank;
|
|||
|
||||
/**
|
||||
* 设备绑定多档口子Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
|
|
@ -70,4 +70,8 @@ public interface DoubleScreenMachineMapper {
|
|||
* @return 结果
|
||||
*/
|
||||
int updateTimeBySn(String sn);
|
||||
|
||||
int insertDeviceRecipe(DeviceDTO dto);
|
||||
|
||||
int updateDeviceRecipe(DeviceDTO dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.bonus.canteen.core.device.dto.DeviceDTO;
|
|||
import com.bonus.canteen.core.device.dto.DeviceSearchDTO;
|
||||
import com.bonus.canteen.core.device.vo.DeviceFullInfoVO;
|
||||
import com.bonus.common.houqin.constant.GlobalConstants;
|
||||
import com.bonus.common.houqin.utils.id.Id;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -16,7 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
/**
|
||||
* 设备绑定多档口子Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
|
|
@ -75,6 +76,11 @@ public class DoubleScreenMachineServiceImpl implements IDoubleScreenMachineServi
|
|||
if (code == 0){
|
||||
throw new RuntimeException("设备绑定失败");
|
||||
}
|
||||
dto.setId(Id.next());
|
||||
code = mapper.insertDeviceRecipe(dto);
|
||||
if (code == 0){
|
||||
throw new RuntimeException("添加菜谱关联失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -106,6 +112,11 @@ public class DoubleScreenMachineServiceImpl implements IDoubleScreenMachineServi
|
|||
if (code == 0){
|
||||
throw new RuntimeException("设备绑定更新失败");
|
||||
}
|
||||
code = mapper.updateDeviceRecipe(dto);
|
||||
|
||||
if (code == 0){
|
||||
throw new RuntimeException("修改菜谱关联失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,18 +2,20 @@ package com.bonus.canteen.core.menu.controller;
|
|||
|
||||
import com.bonus.canteen.core.menu.dto.AppletDishesDetailDTO;
|
||||
import com.bonus.canteen.core.menu.dto.AppletWeekCanteenDTO;
|
||||
import com.bonus.canteen.core.menu.dto.AppletWeekRecipeDTO;
|
||||
import com.bonus.canteen.core.menu.service.AppletRecipeH5Service;
|
||||
import com.bonus.canteen.core.menu.vo.AppletDishesDetailVO;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import static com.bonus.common.core.web.domain.AjaxResult.success;
|
||||
|
||||
|
|
@ -21,8 +23,8 @@ import static com.bonus.common.core.web.domain.AjaxResult.success;
|
|||
* @author xliu
|
||||
* @date 2025/4/15 16:31
|
||||
*/
|
||||
//@RestController
|
||||
@RequestMapping("/api/applet/menurecipe")
|
||||
@RestController
|
||||
@RequestMapping("/h5/menurecipe")
|
||||
public class AppletRecipeH5Controller extends BaseController {
|
||||
|
||||
|
||||
|
|
@ -44,6 +46,19 @@ public class AppletRecipeH5Controller extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@ApiOperation("获取一周菜谱详情")
|
||||
@GetMapping({"/week/recipe/detail"})
|
||||
public TableDataInfo getWeekRecipeDetailList(@Valid AppletWeekRecipeDTO content) {
|
||||
try {
|
||||
startPage();
|
||||
return getDataTable(this.appletRecipeH5Service.getWeekRecipeDetailList(content));
|
||||
} catch (Exception e) {
|
||||
return getDataTable(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@PostMapping({"/detail"})
|
||||
@ApiOperation("根据菜品id获取菜品详情")
|
||||
public AjaxResult getRecipeDetail(@RequestBody AppletDishesDetailDTO dto) {
|
||||
|
|
@ -52,4 +67,10 @@ public class AppletRecipeH5Controller extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
///下面是与订餐
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ public class MenuDishesController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询菜品信息列表")
|
||||
//@RequiresPermissions("menu:dishes:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MenuDishes menuDishes) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody MenuDishes menuDishes) {
|
||||
startPage();
|
||||
List<MenuDishes> list = menuDishesService.selectMenuDishesList(menuDishes);
|
||||
return getDataTable(list);
|
||||
|
|
@ -68,10 +68,9 @@ public class MenuDishesController extends BaseController {
|
|||
* 获取菜品信息详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取菜品信息详细信息")
|
||||
//@RequiresPermissions("menu:dishes:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(menuDishesService.selectMenuDishesById(id));
|
||||
@PostMapping(value = "/getInfo")
|
||||
public AjaxResult getInfo(MenuDishes menuDishes) {
|
||||
return success(menuDishesService.selectMenuDishesById(menuDishes.getId()));
|
||||
}
|
||||
@ApiOperation(value = "获取菜品信息详细信息")
|
||||
//@RequiresPermissions("menu:dishes:query")
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ public class MenuDishes extends Model<MenuDishes> {
|
|||
private String intro;
|
||||
@ApiModelProperty("菜品类型ID")
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty("菜品类型名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty("菜品灶类ID")
|
||||
private Long cookId;
|
||||
@ApiModelProperty("菜品分类id(自定义)")
|
||||
|
|
@ -168,6 +172,39 @@ public class MenuDishes extends Model<MenuDishes> {
|
|||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty("条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("优先级")
|
||||
private String sort;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
|
@ -752,4 +789,12 @@ public class MenuDishes extends Model<MenuDishes> {
|
|||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,11 +66,18 @@ public class MenuMaterial extends BaseEntity {
|
|||
@ApiModelProperty(value = "营养信息")
|
||||
private Long nutritionId;
|
||||
|
||||
@ApiModelProperty(value = "营养信息名称")
|
||||
private String nutritionName;
|
||||
|
||||
/** 类别id */
|
||||
@Excel(name = "类别id")
|
||||
@ApiModelProperty(value = "类别id")
|
||||
private Long categoryId;
|
||||
|
||||
@Excel(name = "类别名称")
|
||||
@ApiModelProperty(value = "类别名称")
|
||||
private String categoryName;
|
||||
|
||||
/** 原料类型(1原料2商品) */
|
||||
@Excel(name = "原料类型(1原料2商品)")
|
||||
@ApiModelProperty(value = "原料类型(1原料2商品)")
|
||||
|
|
@ -165,5 +172,8 @@ public class MenuMaterial extends BaseEntity {
|
|||
@ApiModelProperty(value = "转换数量 单位g")
|
||||
private Long convertGrams;
|
||||
|
||||
@ApiModelProperty(value = "营养信息类别")
|
||||
private String nutritionType;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.menu.domain;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
|
@ -38,7 +39,9 @@ public class MenuRecipe {
|
|||
private String recipeName;
|
||||
@ApiModelProperty("食堂id")
|
||||
private Long canteenId;
|
||||
|
||||
@ApiModelProperty("档口id")
|
||||
@TableField(exist = false)
|
||||
private List<String> canteenIds;
|
||||
|
||||
/** 档口id */
|
||||
|
|
@ -69,21 +72,25 @@ public class MenuRecipe {
|
|||
private Integer enableFlag;
|
||||
@ApiModelProperty("remark")
|
||||
private Integer remark;
|
||||
private List<String> stallIds;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> stallIds;
|
||||
@TableField(exist = false)
|
||||
private List<String> areaIds;
|
||||
|
||||
/** 乐观锁 */
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "选择日期")
|
||||
private String applyDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private String key;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("设备类型")
|
||||
private List<Integer> deviceTypeList;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("菜谱绑定类型")
|
||||
private Integer bindType;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.bonus.canteen.core.menu.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
public class AppletWeekRecipeDTO {
|
||||
@ApiModelProperty("菜谱日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") // Matc
|
||||
private LocalDate applyDate;
|
||||
@ApiModelProperty("人员id")
|
||||
private Long custId;
|
||||
@ApiModelProperty("菜谱id")
|
||||
private Long recipeId;
|
||||
private String date;
|
||||
|
||||
}
|
||||
|
|
@ -6,8 +6,14 @@ import com.bonus.canteen.core.menu.domain.MenuDishesType;
|
|||
import com.bonus.canteen.core.menu.dto.AppletDishesDetailDTO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletDishesDetailVO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletWeekCanteenVO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletWeekRecipeVO;
|
||||
import com.bonus.canteen.core.menu.vo.MenuMaterialBasVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 商家食材原料信息Mapper接口
|
||||
|
|
@ -23,4 +29,13 @@ public interface AppletRecipeH5Mapper {
|
|||
List<AppletWeekCanteenVO> selectWeekCanteenList();
|
||||
|
||||
AppletDishesDetailVO selectDishesDetailByDishesId(AppletDishesDetailDTO dishesDetailDTO);
|
||||
|
||||
List<Long> selectWeekRecipeId(@Param("recipeId") Long recipeId, @Param("effIdSet") Set<Long> effIdSet);
|
||||
|
||||
List<AppletWeekRecipeVO> selectWeekRecipe(@Param("applyDate") LocalDate applyDate, @Param("recipeId") Long recipeId, @Param("recipeIdList") List<Long> recipeIdList);
|
||||
|
||||
List<MenuMaterialBasVO> getMenuMaterialById(Long dishesId);
|
||||
|
||||
@Select({"select md.dishes_name from menu_package_dishes mpd left join menu_dishes md on mpd.dishes_id = md.dishes_id where mpd.del_flag = 2 and mpd.package_id = #{dishesId}"})
|
||||
List<String> selectDishesName(@Param("dishesId") Long dishesId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,18 +2,19 @@ package com.bonus.canteen.core.menu.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDetail;
|
||||
|
||||
/**
|
||||
* 菜品计划详情信息Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
public interface MenuRecipeDetailMapper {
|
||||
public interface MenuRecipeDetailMapper extends BaseMapper<MenuRecipeDetail> {
|
||||
/**
|
||||
* 查询菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划详情信息主键
|
||||
* @return 菜品计划详情信息
|
||||
*/
|
||||
|
|
@ -21,7 +22,7 @@ public interface MenuRecipeDetailMapper {
|
|||
|
||||
/**
|
||||
* 查询菜品计划详情信息列表
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 菜品计划详情信息集合
|
||||
*/
|
||||
|
|
@ -29,7 +30,7 @@ public interface MenuRecipeDetailMapper {
|
|||
|
||||
/**
|
||||
* 新增菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -37,7 +38,7 @@ public interface MenuRecipeDetailMapper {
|
|||
|
||||
/**
|
||||
* 修改菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -45,7 +46,7 @@ public interface MenuRecipeDetailMapper {
|
|||
|
||||
/**
|
||||
* 删除菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划详情信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -53,7 +54,7 @@ public interface MenuRecipeDetailMapper {
|
|||
|
||||
/**
|
||||
* 批量删除菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,28 +1,33 @@
|
|||
package com.bonus.canteen.core.menu.mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDetail;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDishes;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 菜品计划菜品关联Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
public interface MenuRecipeDishesMapper {
|
||||
public interface MenuRecipeDishesMapper extends BaseMapper<MenuRecipeDishes> {
|
||||
/**
|
||||
* 查询菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划菜品关联主键
|
||||
* @return 菜品计划菜品关联
|
||||
*/
|
||||
public MenuRecipeDishes selectMenuRecipeDishesById(Long id);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询菜品计划菜品关联列表
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 菜品计划菜品关联集合
|
||||
*/
|
||||
|
|
@ -30,7 +35,7 @@ public interface MenuRecipeDishesMapper {
|
|||
|
||||
/**
|
||||
* 新增菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -38,7 +43,7 @@ public interface MenuRecipeDishesMapper {
|
|||
|
||||
/**
|
||||
* 修改菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -50,7 +55,7 @@ public interface MenuRecipeDishesMapper {
|
|||
|
||||
/**
|
||||
* 删除菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划菜品关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -58,9 +63,11 @@ public interface MenuRecipeDishesMapper {
|
|||
|
||||
/**
|
||||
* 批量删除菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMenuRecipeDishesByIds(Long[] ids);
|
||||
|
||||
Integer insertValues(Collection<MenuRecipeDishes> list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,4 +198,6 @@ public interface MenuRecipeMapper extends BaseMapper<MenuRecipe> {
|
|||
List<MenuRecipeDishes> selectMenuRecipeDishList(@Param("ew") Wrapper<MenuRecipeDishes> wrapper);
|
||||
|
||||
List<String> getSnByCanteenId(Long canteenId);
|
||||
|
||||
int deleteRecipeByrecipeId(Long recipeId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
package com.bonus.canteen.core.menu.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipe;
|
||||
import com.bonus.canteen.core.menu.dto.AppletDishesDetailDTO;
|
||||
import com.bonus.canteen.core.menu.dto.AppletWeekCanteenDTO;
|
||||
import com.bonus.canteen.core.menu.dto.AppletWeekRecipeDTO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletDishesDetailVO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletWeekCanteenVO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletWeekRecipeVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -12,10 +16,12 @@ import java.util.Set;
|
|||
* @author xliu
|
||||
* @date 2025/4/15 16:37
|
||||
*/
|
||||
public interface AppletRecipeH5Service {
|
||||
public interface AppletRecipeH5Service extends IService<MenuRecipe> {
|
||||
|
||||
List<AppletWeekCanteenVO> getWeekMealList(AppletWeekCanteenDTO appletWeekCanteenDTO);
|
||||
Set<Long> getShopstallIdListByCustId(Long custId, boolean checkCustInfo);
|
||||
|
||||
AppletDishesDetailVO getDishesDetailByDishesId(AppletDishesDetailDTO dto);
|
||||
|
||||
List<AppletWeekRecipeVO> getWeekRecipeDetailList(AppletWeekRecipeDTO content);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
package com.bonus.canteen.core.menu.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDetail;
|
||||
|
||||
/**
|
||||
* 菜品计划详情信息Service接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
public interface IMenuRecipeDetailService {
|
||||
public interface IMenuRecipeDetailService extends IService<MenuRecipeDetail> {
|
||||
/**
|
||||
* 查询菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划详情信息主键
|
||||
* @return 菜品计划详情信息
|
||||
*/
|
||||
|
|
@ -20,7 +22,7 @@ public interface IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 查询菜品计划详情信息列表
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 菜品计划详情信息集合
|
||||
*/
|
||||
|
|
@ -28,7 +30,7 @@ public interface IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 新增菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -36,7 +38,7 @@ public interface IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 修改菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +46,7 @@ public interface IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 批量删除菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的菜品计划详情信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,7 +54,7 @@ public interface IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 删除菜品计划详情信息信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划详情信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,26 +1,34 @@
|
|||
package com.bonus.canteen.core.menu.service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipe;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDishes;
|
||||
|
||||
/**
|
||||
* 菜品计划菜品关联Service接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
public interface IMenuRecipeDishesService {
|
||||
public interface IMenuRecipeDishesService extends IService<MenuRecipeDishes> {
|
||||
/**
|
||||
* 查询菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划菜品关联主键
|
||||
* @return 菜品计划菜品关联
|
||||
*/
|
||||
public MenuRecipeDishes selectMenuRecipeDishesById(Long id);
|
||||
|
||||
@Override
|
||||
boolean saveBatch(Collection<MenuRecipeDishes> entityList);
|
||||
|
||||
|
||||
/**
|
||||
* 查询菜品计划菜品关联列表
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 菜品计划菜品关联集合
|
||||
*/
|
||||
|
|
@ -28,7 +36,7 @@ public interface IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 新增菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -36,7 +44,7 @@ public interface IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 修改菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -55,7 +63,7 @@ public interface IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 批量删除菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的菜品计划菜品关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -63,7 +71,7 @@ public interface IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 删除菜品计划菜品关联信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划菜品关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,28 +1,42 @@
|
|||
package com.bonus.canteen.core.menu.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.canteen.core.android.vo.UserInfoVo;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipe;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDetail;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDishes;
|
||||
import com.bonus.canteen.core.menu.dto.AppletDishesDetailDTO;
|
||||
import com.bonus.canteen.core.menu.dto.AppletWeekCanteenDTO;
|
||||
import com.bonus.canteen.core.menu.dto.AppletWeekRecipeDTO;
|
||||
import com.bonus.canteen.core.menu.enums.MktEffTypeEnum;
|
||||
import com.bonus.canteen.core.menu.enums.MktUserTypeEnum;
|
||||
import com.bonus.canteen.core.menu.mapper.AppletRecipeH5Mapper;
|
||||
import com.bonus.canteen.core.menu.mapper.MenuDishesMapper;
|
||||
import com.bonus.canteen.core.menu.mapper.MenuRecipeMapper;
|
||||
import com.bonus.canteen.core.menu.service.AppletRecipeH5Service;
|
||||
import com.bonus.canteen.core.menu.vo.AppletDishesDetailVO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletDishesSizeV2VO;
|
||||
import com.bonus.canteen.core.menu.vo.AppletWeekCanteenVO;
|
||||
import com.bonus.canteen.core.menu.vo.MktEffectiveUserVO;
|
||||
import com.bonus.canteen.core.menu.service.IMenuRecipeDetailService;
|
||||
import com.bonus.canteen.core.menu.service.IMenuRecipeDishesService;
|
||||
import com.bonus.canteen.core.menu.vo.*;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.houqin.constant.DelFlagEnum;
|
||||
import com.bonus.common.houqin.i18n.I18n;
|
||||
import com.bonus.common.houqin.utils.id.Id;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -30,11 +44,20 @@ import java.util.stream.Collectors;
|
|||
* @date 2025/4/15 16:38
|
||||
*/
|
||||
@Service
|
||||
public class AppletRecipeH5ServiceImpl implements AppletRecipeH5Service {
|
||||
public class AppletRecipeH5ServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRecipe> implements AppletRecipeH5Service {
|
||||
|
||||
@Resource
|
||||
private AppletRecipeH5Mapper appletRecipeH5Mapper;
|
||||
|
||||
@Resource
|
||||
private IMenuRecipeDetailService menuRecipeDetailService;
|
||||
|
||||
@Resource
|
||||
private IMenuRecipeDishesService menuRecipeDishesService;
|
||||
|
||||
@Resource
|
||||
private MenuRecipeMapper menuRecipeMapper;
|
||||
|
||||
@Override
|
||||
public List<AppletWeekCanteenVO> getWeekMealList(AppletWeekCanteenDTO content) {
|
||||
//人员范围 暂时不用
|
||||
|
|
@ -44,8 +67,7 @@ public class AppletRecipeH5ServiceImpl implements AppletRecipeH5Service {
|
|||
// effIdSet.add(-1L);
|
||||
// }
|
||||
|
||||
// return this.menuAppRecipeMapper.selectWeekCanteenList();
|
||||
return null;
|
||||
return this.appletRecipeH5Mapper.selectWeekCanteenList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -89,29 +111,145 @@ public class AppletRecipeH5ServiceImpl implements AppletRecipeH5Service {
|
|||
dishesDetailDTO.setDelFlag(DelFlagEnum.DEL_FALSE.key());
|
||||
Long baseDishesId = dishesDetailDTO.getBaseDishesId();
|
||||
Long custId = dishesDetailDTO.getCustId();
|
||||
//人员收藏信息暂时不管
|
||||
// if (!ObjectUtil.isNull(custId) && custId != -1L) {
|
||||
// AppletDishesDetailVO appletDishesDetailVO = menuAppRecipeMapper.selectDishesDetailByDishesId(dishesDetailDTO);
|
||||
// Long countDishes = this.menuCollectionDishesMapper.selectCount(Wrappers.lambdaQuery(MenuCollectionDishes.class)
|
||||
AppletDishesDetailVO appletDishesDetailVO = appletRecipeH5Mapper.selectDishesDetailByDishesId(dishesDetailDTO);
|
||||
// Long countDishes = this.appletRecipeH5Mapper.selectCount(Wrappers.lambdaQuery(MenuCollectionDishes.class)
|
||||
// .eq(MenuCollectionDishes::getCustId, custId).eq(MenuCollectionDishes::getDishesId, baseDishesId));
|
||||
// if (ObjectUtil.isNotNull(countDishes) && countDishes > 0L) {
|
||||
// appletDishesDetailVO.setIsFavorites(1);
|
||||
// } else {
|
||||
// appletDishesDetailVO.setIsFavorites(2);
|
||||
// }
|
||||
//
|
||||
// Long dishesId = ((AppletDishesSizeV2VO) appletDishesDetailVO.getDishesDetailList().get(0)).getDishesId();
|
||||
// List materialList;
|
||||
// if (appletDishesDetailVO.getMealType() == 1) {
|
||||
// materialList = this.menuMaterialDishesMapper.getMenuMaterialById(dishesId);
|
||||
// appletDishesDetailVO.setMaterialList(materialList);
|
||||
// } else {
|
||||
// materialList = this.menuPackageDishesMapper.selectDishesName(dishesId);
|
||||
|
||||
Long dishesId = ((AppletDishesSizeV2VO) appletDishesDetailVO.getDishesDetailList().get(0)).getDishesId();
|
||||
List materialList;
|
||||
if (appletDishesDetailVO.getMealType() == 1) {
|
||||
materialList = this.appletRecipeH5Mapper.getMenuMaterialById(dishesId);
|
||||
appletDishesDetailVO.setMaterialList(materialList);
|
||||
} else {
|
||||
//套餐信息 暂时删除不要
|
||||
// materialList = this.appletRecipeH5Mapper.selectDishesName(dishesId);
|
||||
// appletDishesDetailVO.setPackageDishesList(materialList);
|
||||
// }
|
||||
// return appletDishesDetailVO;
|
||||
}
|
||||
return appletDishesDetailVO;
|
||||
// } else {
|
||||
// throw new ServiceException(I18n.getMessage("menu_no_cust_info", new Object[0]));
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppletWeekRecipeVO> getWeekRecipeDetailList(AppletWeekRecipeDTO content) {
|
||||
List<Long> recipeIdList = Lists.newArrayList();
|
||||
if (ObjectUtil.isNull(content.getRecipeId())) {
|
||||
Set<Long> effIdSet = this.getShopstallIdListByCustId(content.getCustId(), false);
|
||||
if (ObjectUtil.isEmpty(effIdSet)) {
|
||||
effIdSet = Sets.newTreeSet();
|
||||
effIdSet.add(-1L);
|
||||
}
|
||||
|
||||
recipeIdList = this.appletRecipeH5Mapper.selectWeekRecipeId(content.getRecipeId(), (Set) effIdSet);
|
||||
if (ObjectUtil.isEmpty(recipeIdList)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
} else {
|
||||
recipeIdList.add(content.getRecipeId());
|
||||
}
|
||||
|
||||
this.generateRecipe(recipeIdList, content.getApplyDate());
|
||||
List<AppletWeekRecipeVO> resultList = appletRecipeH5Mapper.selectWeekRecipe(content.getApplyDate(), content.getRecipeId(), (List) recipeIdList);
|
||||
resultList.sort(Collections.reverseOrder((s1, s2) -> {
|
||||
return s2.getMealtimeType() - s1.getMealtimeType();
|
||||
}));
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public synchronized void generateRecipe(List<Long> recipeIdList, LocalDate applyDate) {
|
||||
if (!ObjectUtil.isEmpty(recipeIdList) && !ObjectUtil.isEmpty(applyDate)) {
|
||||
recipeIdList = new ArrayList(recipeIdList);
|
||||
Map<Long, Long> recipeDetailContMap = (Map) this.menuRecipeDetailService.list((Wrapper<MenuRecipeDetail>) ((LambdaQueryWrapper<MenuRecipeDetail>) Wrappers.lambdaQuery(MenuRecipeDetail.class).select(MenuRecipeDetail::getRecipeId).eq(MenuRecipeDetail::getApplyDate, applyDate)).in(MenuRecipeDetail::getRecipeId, recipeIdList)).stream().collect(Collectors.groupingBy(MenuRecipeDetail::getRecipeId, Collectors.counting()));
|
||||
recipeIdList.removeAll(recipeDetailContMap.keySet());
|
||||
if (!ObjectUtil.isEmpty(recipeIdList)) {
|
||||
List<MenuRecipe> menuRecipes = this.list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery(MenuRecipe.class).in(MenuRecipe::getRecipeType, new Object[]{2, 3})).apply(CollUtil.isNotEmpty(recipeIdList), "recipe_id IN (" + recipeIdList.stream().map(String::valueOf).collect(Collectors.joining(", ")) + ")"));
|
||||
if (!ObjectUtil.isEmpty(menuRecipes)) {
|
||||
Map<Long, MenuRecipe> recipeMap = (Map) menuRecipes.stream().collect(Collectors.toMap(MenuRecipe::getRecipeId, Function.identity()));
|
||||
List<MenuRecipeDetail> menuRecipeDetails = this.menuRecipeDetailService.list((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery(MenuRecipeDetail.class).eq(MenuRecipeDetail::getDetailType, 1)).apply(CollUtil.isNotEmpty(recipeIdList), "recipe_id IN (" + recipeIdList.stream().map(String::valueOf).collect(Collectors.joining(", ")) + ")"));
|
||||
Map<Long, Integer> recipeTypeMap = (Map) menuRecipes.stream().collect(Collectors.toMap(MenuRecipe::getRecipeId, MenuRecipe::getRecipeType));
|
||||
menuRecipeDetails = this.filterMenuRecipeDetails(recipeTypeMap, menuRecipeDetails, applyDate);
|
||||
if (!ObjectUtil.isEmpty(menuRecipeDetails)) {
|
||||
Map<Long, List<MenuRecipeDetail>> detailMap = (Map) menuRecipeDetails.stream().collect(Collectors.groupingBy(MenuRecipeDetail::getRecipeId));
|
||||
List<Long> detailIds = (List) menuRecipeDetails.stream().map(MenuRecipeDetail::getDetailId).collect(Collectors.toList());
|
||||
Map<Long, List<MenuRecipeDishes>> recipeDishes = (Map) this.menuRecipeDishesService.list((Wrapper) Wrappers.lambdaQuery(MenuRecipeDishes.class).in(MenuRecipeDishes::getDetailId, detailIds)).stream().collect(Collectors.groupingBy(MenuRecipeDishes::getDetailId));
|
||||
List<MenuRecipeDetail> recipeDetailV2List = Lists.newArrayList();
|
||||
List<MenuRecipeDishes> recipeDishesV2List = Lists.newArrayList();
|
||||
Iterator var13 = recipeMap.keySet().iterator();
|
||||
|
||||
label59:
|
||||
while (true) {
|
||||
Long recipeId;
|
||||
Integer type;
|
||||
List menuRecipeDetail;
|
||||
do {
|
||||
if (!var13.hasNext()) {
|
||||
this.menuRecipeDetailService.saveBatch(recipeDetailV2List);
|
||||
if (ObjectUtil.isNotEmpty(recipeDishesV2List)) {
|
||||
this.menuRecipeDishesService.saveBatch(recipeDishesV2List);
|
||||
}
|
||||
return;
|
||||
}
|
||||
recipeId = (Long) var13.next();
|
||||
type = (Integer) recipeTypeMap.get(recipeId);
|
||||
menuRecipeDetail = (List) detailMap.get(recipeId);
|
||||
} while (!ObjectUtil.isNotEmpty(menuRecipeDetail));
|
||||
Iterator var17 = menuRecipeDetail.iterator();
|
||||
while (true) {
|
||||
Long detailId;
|
||||
List dishes;
|
||||
do {
|
||||
if (!var17.hasNext()) {
|
||||
continue label59;
|
||||
}
|
||||
MenuRecipeDetail recipeDetail = (MenuRecipeDetail) var17.next();
|
||||
MenuRecipeDetail detailItem = new MenuRecipeDetail();
|
||||
detailId = Id.next();
|
||||
detailItem.setDetailId(detailId);
|
||||
detailItem.setRecipeId(recipeId);
|
||||
if (ObjectUtil.equal(type, 3)) {
|
||||
detailItem.setApplyWeek(applyDate.getDayOfWeek().getValue());
|
||||
}
|
||||
detailItem.setApplyDate(applyDate);
|
||||
detailItem.setMealtimeType(recipeDetail.getMealtimeType());
|
||||
detailItem.setDetailType(2);
|
||||
recipeDetailV2List.add(detailItem);
|
||||
dishes = (List) recipeDishes.get(recipeDetail.getDetailId());
|
||||
} while (!ObjectUtil.isNotEmpty(dishes));
|
||||
Iterator var22 = dishes.iterator();
|
||||
while (var22.hasNext()) {
|
||||
MenuRecipeDishes dish = (MenuRecipeDishes) var22.next();
|
||||
MenuRecipeDishes dishesItem = (MenuRecipeDishes) BeanUtil.copyProperties(dish, MenuRecipeDishes.class, new String[0]);
|
||||
dishesItem.setDetailId(detailId);
|
||||
dishesItem.setId((Long) null);
|
||||
recipeDishesV2List.add(dishesItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<MenuRecipeDetail> filterMenuRecipeDetails(Map<Long, Integer> recipeTypeMap, List<MenuRecipeDetail> menuRecipeDetails, LocalDate applyDate) {
|
||||
return menuRecipeDetails.stream().filter((item) -> {
|
||||
Long recipeId = item.getRecipeId();
|
||||
Integer type = (Integer) recipeTypeMap.get(recipeId);
|
||||
if (type == 3) {
|
||||
return ObjectUtil.equal(item.getApplyWeek(), applyDate.getDayOfWeek().getValue());
|
||||
} else {
|
||||
return type == 2;
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,17 +196,23 @@ public class MenuDishesServiceImpl implements IMenuDishesService {
|
|||
System.err.println("长度:"+materialList.size());
|
||||
for (MenuDishesAddMaterialDTO i: materialList) {
|
||||
NutritionEntity nutritionEntity = menuDishesMapper.getNutritionEntity(i);
|
||||
System.err.println(i.getMaterialId()+",开始值:"+nutritionEntity.getCalcium());
|
||||
nutritionEntity.setWeight(i.getWeight());
|
||||
nutritionEntity.setBaseWeight(100.0);
|
||||
nutritionEntityList.add(nutritionEntity);
|
||||
if(nutritionEntity !=null){
|
||||
System.err.println(i.getMaterialId()+",开始值:"+nutritionEntity.getCalcium());
|
||||
nutritionEntity.setWeight(i.getWeight());
|
||||
nutritionEntity.setBaseWeight(100.0);
|
||||
nutritionEntityList.add(nutritionEntity);
|
||||
}
|
||||
}
|
||||
NutritionEntityUtil nutritionEntityUtil = new NutritionEntityUtil();
|
||||
NutritionEntity nutritionEntity = nutritionEntityUtil.countNutrition(nutritionEntityList);
|
||||
|
||||
|
||||
System.err.println("最终值:"+nutritionEntity.getCalcium());
|
||||
return menuDishesMapper.addFinalNutrition(nutritionEntity);
|
||||
if(nutritionEntityList !=null && nutritionEntityList.size() >0){
|
||||
System.err.println("总和:"+nutritionEntity.getCalcium());
|
||||
//计算营养成分
|
||||
nutritionEntity = countNum(nutritionEntity,menuDishesDTO.getWeight());
|
||||
System.err.println("计算后:"+nutritionEntity.getCalcium());
|
||||
return menuDishesMapper.addFinalNutrition(nutritionEntity);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class MenuMaterialServiceImpl implements IMenuMaterialService {
|
|||
public int updateMenuMaterial(MenuMaterial menuMaterial) {
|
||||
try {
|
||||
MenuMaterial one = menuMaterialMapper.getOne(menuMaterial);
|
||||
if(one !=null){
|
||||
if(one !=null && !menuMaterial.getMaterialName().equals(one.getMaterialName())){
|
||||
throw new ServiceException("食材原料名称已存在");
|
||||
}
|
||||
return menuMaterialMapper.updateMenuMaterial(menuMaterial);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.bonus.canteen.core.menu.service.impl;
|
|||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -13,18 +15,18 @@ import com.bonus.canteen.core.menu.service.IMenuRecipeDetailService;
|
|||
|
||||
/**
|
||||
* 菜品计划详情信息Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
@Service
|
||||
public class MenuRecipeDetailServiceImpl implements IMenuRecipeDetailService {
|
||||
public class MenuRecipeDetailServiceImpl extends ServiceImpl<MenuRecipeDetailMapper, MenuRecipeDetail> implements IMenuRecipeDetailService {
|
||||
@Autowired
|
||||
private MenuRecipeDetailMapper menuRecipeDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划详情信息主键
|
||||
* @return 菜品计划详情信息
|
||||
*/
|
||||
|
|
@ -35,7 +37,7 @@ public class MenuRecipeDetailServiceImpl implements IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 查询菜品计划详情信息列表
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 菜品计划详情信息
|
||||
*/
|
||||
|
|
@ -46,7 +48,7 @@ public class MenuRecipeDetailServiceImpl implements IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 新增菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -62,7 +64,7 @@ public class MenuRecipeDetailServiceImpl implements IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 修改菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDetail 菜品计划详情信息
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -78,7 +80,7 @@ public class MenuRecipeDetailServiceImpl implements IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 批量删除菜品计划详情信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的菜品计划详情信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -89,7 +91,7 @@ public class MenuRecipeDetailServiceImpl implements IMenuRecipeDetailService {
|
|||
|
||||
/**
|
||||
* 删除菜品计划详情信息信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划详情信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,17 @@
|
|||
package com.bonus.canteen.core.menu.service.impl;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.account.service.impl.AccSubServiceImpl;
|
||||
import com.bonus.canteen.core.common.utils.RedisUtil;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipeDetail;
|
||||
import com.bonus.canteen.core.menu.mapper.MenuRecipeDetailMapper;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.houqin.constant.GlobalConstants;
|
||||
|
|
@ -18,20 +25,22 @@ import com.bonus.canteen.core.menu.service.IMenuRecipeDishesService;
|
|||
|
||||
/**
|
||||
* 菜品计划菜品关联Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-03
|
||||
*/
|
||||
@Service
|
||||
public class MenuRecipeDishesServiceImpl implements IMenuRecipeDishesService {
|
||||
private static final Logger log = LoggerFactory.getLogger(MenuRecipeDishesServiceImpl.class);
|
||||
|
||||
|
||||
public class MenuRecipeDishesServiceImpl extends ServiceImpl<MenuRecipeDishesMapper, MenuRecipeDishes> implements IMenuRecipeDishesService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MenuRecipeDishesServiceImpl.class);
|
||||
@Autowired
|
||||
private MenuRecipeDishesMapper menuRecipeDishesMapper;
|
||||
|
||||
/**
|
||||
* 查询菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划菜品关联主键
|
||||
* @return 菜品计划菜品关联
|
||||
*/
|
||||
|
|
@ -40,9 +49,21 @@ public class MenuRecipeDishesServiceImpl implements IMenuRecipeDishesService {
|
|||
return menuRecipeDishesMapper.selectMenuRecipeDishesById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveBatch(Collection<MenuRecipeDishes> entityList) {
|
||||
Iterator var2 = CollUtil.split(entityList, 500).iterator();
|
||||
|
||||
while(var2.hasNext()) {
|
||||
List<MenuRecipeDishes> menuRecipeDishes = (List)var2.next();
|
||||
menuRecipeDishesMapper.insertValues(menuRecipeDishes);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜品计划菜品关联列表
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 菜品计划菜品关联
|
||||
*/
|
||||
|
|
@ -53,7 +74,7 @@ public class MenuRecipeDishesServiceImpl implements IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 新增菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -69,7 +90,7 @@ public class MenuRecipeDishesServiceImpl implements IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 修改菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param menuRecipeDishes 菜品计划菜品关联
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -141,7 +162,7 @@ public class MenuRecipeDishesServiceImpl implements IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 批量删除菜品计划菜品关联
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的菜品计划菜品关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -152,7 +173,7 @@ public class MenuRecipeDishesServiceImpl implements IMenuRecipeDishesService {
|
|||
|
||||
/**
|
||||
* 删除菜品计划菜品关联信息
|
||||
*
|
||||
*
|
||||
* @param id 菜品计划菜品关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -390,8 +390,10 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
} else if (appCount > 0) {
|
||||
throw new ServiceException(I18n.getMessage("menu_recipe_applet_bind_del", new Object[0]));
|
||||
} else {
|
||||
this.baseMapper.delete( Wrappers.lambdaUpdate(MenuRecipe.class)
|
||||
.in(MenuRecipe::getRecipeId, recipeId));
|
||||
// this.baseMapper.delete( Wrappers.lambdaUpdate(MenuRecipe.class)
|
||||
// .in(MenuRecipe::getRecipeId, recipeId));
|
||||
|
||||
menuRecipeMapper.deleteRecipeByrecipeId(recipeId);
|
||||
|
||||
List<Long> detailIdList = this.menuRecipeMapper.getDetailIdList(recipeId);
|
||||
if (ObjectUtil.isNotEmpty(detailIdList)) {
|
||||
|
|
@ -753,6 +755,9 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
MenuBaseDishesModel tempDishes;
|
||||
if (sizeType == 2L) {
|
||||
baseDishesList = baseMap.get(dishes.getDishesId());
|
||||
if (ObjectUtil.isEmpty(baseDishesList)) {
|
||||
return;
|
||||
}
|
||||
tempDishes = (MenuBaseDishesModel) baseDishesList.get(0);
|
||||
if (CharSequenceUtil.contains(tempDishes.getSizeJson(), "大份")) {
|
||||
dishes.setDishesId(tempDishes.getDishesId());
|
||||
|
|
@ -761,6 +766,9 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
}
|
||||
} else if (sizeType == 3L) {
|
||||
baseDishesList = baseMap.get(dishes.getDishesId());
|
||||
if (ObjectUtil.isEmpty(baseDishesList)) {
|
||||
return;
|
||||
}
|
||||
tempDishes = (MenuBaseDishesModel) baseDishesList.get(0);
|
||||
if (CharSequenceUtil.contains(tempDishes.getSizeJson(), "小份")) {
|
||||
dishes.setDishesId(tempDishes.getDishesId());
|
||||
|
|
@ -769,6 +777,9 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
}
|
||||
} else {
|
||||
baseDishesList = baseMap.get(dishes.getDishesId());
|
||||
if (ObjectUtil.isEmpty(baseDishesList)) {
|
||||
return;
|
||||
}
|
||||
tempDishes = (MenuBaseDishesModel) baseDishesList.get(0);
|
||||
dishes.setDishesId(tempDishes.getDishesId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,111 @@
|
|||
package com.bonus.canteen.core.menu.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Optional;
|
||||
|
||||
@ApiModel("菜品详情(大小份)")
|
||||
public class AppletCurrentDishesDetailVO {
|
||||
@ApiModelProperty("菜品id")
|
||||
private Long dishesId;
|
||||
@ApiModelProperty("菜品名称")
|
||||
private String dishesName;
|
||||
@ApiModelProperty("库存数量")
|
||||
private Integer surplusNum;
|
||||
@ApiModelProperty("限购数量")
|
||||
private Integer restrictNum;
|
||||
@ApiModelProperty("菜品价格")
|
||||
private Integer dishesPrice;
|
||||
@ApiModelProperty("优惠价")
|
||||
private Integer prefPrice;
|
||||
@ApiModelProperty("规格类型(1-标准,2-大份,3-小份,4-50g,5-100g)")
|
||||
private Long sizeType;
|
||||
@ApiModelProperty("菜品规格")
|
||||
private String sizeJson;
|
||||
@ApiModelProperty("月销量")
|
||||
private Integer monthlySales;
|
||||
@ApiModelProperty("好评率")
|
||||
private BigDecimal goodProbability;
|
||||
|
||||
public Integer getMonthlySales() {
|
||||
return (Integer)Optional.ofNullable(this.monthlySales).orElse(0);
|
||||
}
|
||||
|
||||
public BigDecimal getGoodProbability() {
|
||||
return (BigDecimal)Optional.ofNullable(this.goodProbability).orElse(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
public Long getSizeType() {
|
||||
return (Long)Optional.ofNullable(this.sizeType).orElse(1L);
|
||||
}
|
||||
|
||||
public Long getDishesId() {
|
||||
return this.dishesId;
|
||||
}
|
||||
|
||||
public String getDishesName() {
|
||||
return this.dishesName;
|
||||
}
|
||||
|
||||
public Integer getSurplusNum() {
|
||||
return this.surplusNum;
|
||||
}
|
||||
|
||||
public Integer getRestrictNum() {
|
||||
return this.restrictNum;
|
||||
}
|
||||
|
||||
public Integer getDishesPrice() {
|
||||
return this.dishesPrice;
|
||||
}
|
||||
|
||||
public Integer getPrefPrice() {
|
||||
return this.prefPrice;
|
||||
}
|
||||
|
||||
public String getSizeJson() {
|
||||
return this.sizeJson;
|
||||
}
|
||||
|
||||
public void setDishesId(final Long dishesId) {
|
||||
this.dishesId = dishesId;
|
||||
}
|
||||
|
||||
public void setDishesName(final String dishesName) {
|
||||
this.dishesName = dishesName;
|
||||
}
|
||||
|
||||
public void setSurplusNum(final Integer surplusNum) {
|
||||
this.surplusNum = surplusNum;
|
||||
}
|
||||
|
||||
public void setRestrictNum(final Integer restrictNum) {
|
||||
this.restrictNum = restrictNum;
|
||||
}
|
||||
|
||||
public void setDishesPrice(final Integer dishesPrice) {
|
||||
this.dishesPrice = dishesPrice;
|
||||
}
|
||||
|
||||
public void setPrefPrice(final Integer prefPrice) {
|
||||
this.prefPrice = prefPrice;
|
||||
}
|
||||
|
||||
public void setSizeType(final Long sizeType) {
|
||||
this.sizeType = sizeType;
|
||||
}
|
||||
|
||||
public void setSizeJson(final String sizeJson) {
|
||||
this.sizeJson = sizeJson;
|
||||
}
|
||||
|
||||
public void setMonthlySales(final Integer monthlySales) {
|
||||
this.monthlySales = monthlySales;
|
||||
}
|
||||
|
||||
public void setGoodProbability(final BigDecimal goodProbability) {
|
||||
this.goodProbability = goodProbability;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.bonus.canteen.core.menu.vo;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.canteen.core.utils.SysUtil;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("菜品详情")
|
||||
public class AppletWeekRecipeDishesVO {
|
||||
@ApiModelProperty("菜品id")
|
||||
private Long baseDishesId;
|
||||
@ApiModelProperty("菜品名称")
|
||||
private String dishesName;
|
||||
@ApiModelProperty("菜品图片")
|
||||
private String dishesImgUrl;
|
||||
@ApiModelProperty("菜谱详情id")
|
||||
private Long detailId;
|
||||
@ApiModelProperty("食堂id")
|
||||
private Long canteenId;
|
||||
@ApiModelProperty("食堂名称")
|
||||
private String canteenName;
|
||||
@ApiModelProperty("档口id")
|
||||
private Long stallId;
|
||||
@ApiModelProperty("档口名称")
|
||||
private String stallName;
|
||||
@ApiModelProperty("大小份详情")
|
||||
private List<AppletCurrentDishesDetailVO> dishesDetailList;
|
||||
|
||||
public String getDishesImgUrl() {
|
||||
return ObjectUtil.isNotEmpty(this.dishesImgUrl) ? SysUtil.getCutFileUrl(this.dishesImgUrl.split(",")[0]) : this.dishesImgUrl;
|
||||
}
|
||||
|
||||
public Long getBaseDishesId() {
|
||||
return this.baseDishesId;
|
||||
}
|
||||
|
||||
public String getDishesName() {
|
||||
return this.dishesName;
|
||||
}
|
||||
|
||||
public Long getDetailId() {
|
||||
return this.detailId;
|
||||
}
|
||||
|
||||
public Long getCanteenId() {
|
||||
return this.canteenId;
|
||||
}
|
||||
|
||||
public String getCanteenName() {
|
||||
return this.canteenName;
|
||||
}
|
||||
|
||||
public Long getStallId() {
|
||||
return this.stallId;
|
||||
}
|
||||
|
||||
public String getStallName() {
|
||||
return this.stallName;
|
||||
}
|
||||
|
||||
public List<AppletCurrentDishesDetailVO> getDishesDetailList() {
|
||||
return this.dishesDetailList;
|
||||
}
|
||||
|
||||
public void setBaseDishesId(final Long baseDishesId) {
|
||||
this.baseDishesId = baseDishesId;
|
||||
}
|
||||
|
||||
public void setDishesName(final String dishesName) {
|
||||
this.dishesName = dishesName;
|
||||
}
|
||||
|
||||
public void setDishesImgUrl(final String dishesImgUrl) {
|
||||
this.dishesImgUrl = dishesImgUrl;
|
||||
}
|
||||
|
||||
public void setDetailId(final Long detailId) {
|
||||
this.detailId = detailId;
|
||||
}
|
||||
|
||||
public void setCanteenId(final Long canteenId) {
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public void setCanteenName(final String canteenName) {
|
||||
this.canteenName = canteenName;
|
||||
}
|
||||
|
||||
public void setStallId(final Long stallId) {
|
||||
this.stallId = stallId;
|
||||
}
|
||||
|
||||
public void setStallName(final String stallName) {
|
||||
this.stallName = stallName;
|
||||
}
|
||||
|
||||
public void setDishesDetailList(final List<AppletCurrentDishesDetailVO> dishesDetailList) {
|
||||
this.dishesDetailList = dishesDetailList;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.bonus.canteen.core.menu.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("分类详情")
|
||||
public class AppletWeekRecipeTypeVO {
|
||||
@ApiModelProperty("菜品类别id")
|
||||
private Long typeId;
|
||||
@ApiModelProperty("菜品类别名称")
|
||||
private String typeName;
|
||||
@ApiModelProperty("菜品详情")
|
||||
private List<AppletWeekRecipeDishesVO> dishesList;
|
||||
|
||||
public Long getTypeId() {
|
||||
return this.typeId;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return this.typeName;
|
||||
}
|
||||
|
||||
public List<AppletWeekRecipeDishesVO> getDishesList() {
|
||||
return this.dishesList;
|
||||
}
|
||||
|
||||
public void setTypeId(final Long typeId) {
|
||||
this.typeId = typeId;
|
||||
}
|
||||
|
||||
public void setTypeName(final String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public void setDishesList(final List<AppletWeekRecipeDishesVO> dishesList) {
|
||||
this.dishesList = dishesList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.bonus.canteen.core.menu.vo;
|
||||
|
||||
import com.bonus.canteen.core.menu.enums.AllocMealtimeTypeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("获取一周菜谱详情")
|
||||
public class AppletWeekRecipeVO {
|
||||
@ApiModelProperty("餐次类型")
|
||||
private Integer mealtimeType;
|
||||
@ApiModelProperty("餐次名称")
|
||||
private String mealtimeName;
|
||||
@ApiModelProperty("分类详情")
|
||||
private List<AppletWeekRecipeTypeVO> typeList;
|
||||
|
||||
public String getMealtimeName() {
|
||||
return AllocMealtimeTypeEnum.getDescByKey(this.mealtimeType);
|
||||
}
|
||||
|
||||
public Integer getMealtimeType() {
|
||||
return this.mealtimeType;
|
||||
}
|
||||
|
||||
public List<AppletWeekRecipeTypeVO> getTypeList() {
|
||||
return this.typeList;
|
||||
}
|
||||
|
||||
public void setMealtimeType(final Integer mealtimeType) {
|
||||
this.mealtimeType = mealtimeType;
|
||||
}
|
||||
|
||||
public void setMealtimeName(final String mealtimeName) {
|
||||
this.mealtimeName = mealtimeName;
|
||||
}
|
||||
|
||||
public void setTypeList(final List<AppletWeekRecipeTypeVO> typeList) {
|
||||
this.typeList = typeList;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||
import com.bonus.canteen.core.menu.enums.MenuSalesTypeEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
@ -12,6 +13,12 @@ public class MenuRecipeDetailDishesVO implements Serializable {
|
|||
private Long id;
|
||||
@ApiModelProperty("菜品id")
|
||||
private Long dishesId;
|
||||
|
||||
@Getter
|
||||
@ApiModelProperty("菜品基础id")
|
||||
private long baseDishesId;
|
||||
|
||||
|
||||
@ApiModelProperty("菜品名称")
|
||||
private String dishesName;
|
||||
@ApiModelProperty("菜品编号")
|
||||
|
|
@ -49,6 +56,11 @@ public class MenuRecipeDetailDishesVO implements Serializable {
|
|||
@ApiModelProperty("称重单位多少克(默认1kg)")
|
||||
private Integer unitPrice;
|
||||
|
||||
|
||||
public void setBaseDishesId(long baseDishesId) {
|
||||
this.baseDishesId = baseDishesId;
|
||||
}
|
||||
|
||||
public Long getSizeType() {
|
||||
if (ObjectUtil.isNull(this.sizeType)) {
|
||||
if (MenuSalesTypeEnum.PORTION_ON.key().equals(this.salesMode)) {
|
||||
|
|
|
|||
|
|
@ -156,4 +156,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
<insert id="insertDeviceRecipe">
|
||||
insert into device_recipe(id,device_id, canteen_id,stall_id,
|
||||
revision)
|
||||
values (#{id},#{deviceId}, #{canteenId}, #{stallId},'0')
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceRecipe" >
|
||||
update device_recipe
|
||||
<set>
|
||||
<if test="canteenId != null and canteenId != ''">
|
||||
canteen_id = #{canteenId},
|
||||
</if>
|
||||
<if test="stallId != null and stallId != ''">
|
||||
stall_id = #{stallId},
|
||||
</if>
|
||||
<if test="recipeId != null and recipeId != ''">
|
||||
recipe_id = #{recipeId},
|
||||
</if>
|
||||
</set>
|
||||
where device_id = #{deviceId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -101,7 +101,118 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where
|
||||
mdb.base_dishes_id = #{baseDishesId}
|
||||
and mrd.detail_id = #{detailId}
|
||||
and md.del_flag = #{delFlag}
|
||||
<!-- and md.del_flag = #{delFlag}-->
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<!-- 获取菜谱id -->
|
||||
<select id="selectWeekRecipeId" resultType="java.lang.Long">
|
||||
select
|
||||
mar.recipe_id
|
||||
from
|
||||
menu_app_recipe mar
|
||||
left join menu_recipe mr on mar.recipe_id = mr.recipe_id
|
||||
where
|
||||
bind_type = 3
|
||||
and mr.eff_id in
|
||||
<foreach collection="effIdSet" item="effId" separator="," open="(" close=")">
|
||||
#{effId}
|
||||
</foreach>
|
||||
<if test="recipeId != null">
|
||||
and mar.recipe_id = #{recipeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="appletWeekRecipeVO" type="com.bonus.canteen.core.menu.vo.AppletWeekRecipeVO">
|
||||
<result property="mealtimeType" column="mealtime_type"/>
|
||||
<collection property="typeList" ofType="com.bonus.canteen.core.menu.vo.AppletWeekRecipeTypeVO">
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="typeName" column="type_name"/>
|
||||
<collection property="dishesList" ofType="com.bonus.canteen.core.menu.vo.AppletWeekRecipeDishesVO">
|
||||
<result property="baseDishesId" column="base_dishes_id"/>
|
||||
<result property="dishesName" column="dishes_name"/>
|
||||
<result property="dishesImgUrl" column="dishes_img_url"/>
|
||||
<result property="detailId" column="detail_id"/>
|
||||
<result property="canteenId" column="canteen_id"/>
|
||||
<result property="canteenName" column="canteen_name"/>
|
||||
<result property="stallId" column="stall_id"/>
|
||||
<result property="stallName" column="stall_name"/>
|
||||
<collection property="dishesDetailList" ofType="com.bonus.canteen.core.menu.vo.AppletCurrentDishesDetailVO">
|
||||
<result property="dishesId" column="dishes_id"/>
|
||||
<result property="dishesName" column="real_dishes_name"/>
|
||||
<result property="surplusNum" column="surplus_num"/>
|
||||
<result property="restrictNum" column="restrict_num"/>
|
||||
<result property="dishesPrice" column="dishes_price"/>
|
||||
<result property="prefPrice" column="pref_price"/>
|
||||
<result property="sizeType" column="size_type"/>
|
||||
<result property="sizeJson" column="size_json"/>
|
||||
</collection>
|
||||
</collection>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<select id="selectWeekRecipe" resultMap="appletWeekRecipeVO">
|
||||
select
|
||||
mrd.mealtime_type,
|
||||
if(md.meal_type = 2, 2, mdt.type_id) as type_id,
|
||||
if(md.meal_type = 2, '套餐', mdt.type_name) as type_name,
|
||||
mdb.base_dishes_id,
|
||||
md.dishes_id,
|
||||
mdb.dishes_name,
|
||||
md.dishes_name as real_dishes_name,
|
||||
md.image_url as dishes_img_url,
|
||||
mrd.detail_id,
|
||||
m.surplus_num,
|
||||
m.restrict_num,
|
||||
m.price as dishes_price,
|
||||
m.sale_price as pref_price,
|
||||
ac.canteen_id,
|
||||
ac.canteen_name,
|
||||
ass.stall_id,
|
||||
ass.stall_name,
|
||||
m.size_type,
|
||||
md.size_json
|
||||
from
|
||||
menu_recipe_detail mrd
|
||||
inner join menu_recipe_dishes m on mrd.detail_id = m.detail_id
|
||||
inner join menu_dishes md on m.dishes_id = md.dishes_id
|
||||
inner join menu_dishes_type mdt on md.type_id = mdt.type_id
|
||||
inner join menu_recipe mr on mrd.recipe_id = mr.recipe_id
|
||||
left join menu_dishes_sale_record mdsr on md.dishes_id = mdsr.dishes_id
|
||||
and mr.stall_id = mdsr.stall_id
|
||||
and mdsr.sale_month = month(curdate())
|
||||
left join alloc_canteen ac on mr.canteen_id = ac.canteen_id
|
||||
left join alloc_stall ass on mr.stall_id = ass.stall_id
|
||||
left join menu_dishes_base mdb on md.base_dishes_id = mdb.base_dishes_id
|
||||
where
|
||||
mrd.apply_date = #{applyDate}
|
||||
<if test="recipeId != null">
|
||||
and mrd.recipe_id = #{recipeId}
|
||||
</if>
|
||||
<if test="recipeIdList != null and recipeIdList.size() > 0">
|
||||
and mrd.recipe_id in
|
||||
<foreach collection="recipeIdList" item="recipeId" open="(" separator="," close=")">
|
||||
#{recipeId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by
|
||||
m.sort_num asc
|
||||
</select>
|
||||
|
||||
<select id="getMenuMaterialById" resultType="com.bonus.canteen.core.menu.vo.MenuMaterialBasVO">
|
||||
SELECT mm.material_id,
|
||||
mm.material_name,
|
||||
mm.material_code,
|
||||
mm.image_url,
|
||||
mmd.weight,
|
||||
mmd.material_type,
|
||||
mn.big_type,
|
||||
mn.little_type
|
||||
FROM menu_material mm
|
||||
LEFT JOIN menu_material_dishes mmd ON mm.material_id = mmd.material_id
|
||||
LEFT JOIN menu_nutrition mn ON mn.nutrition_id = mm.nutrition_id
|
||||
WHERE mmd.dishes_id = #{dishesId}
|
||||
and mmd.del_flag = 2
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -79,90 +79,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="typeName" column="type_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMenuDishesVo">
|
||||
select id, dishes_id, base_dishes_id, meal_type, dishes_num, custom_id, inventory_id, dishes_name, alias_name, pinyin_initials, pinyin_full, bar_code, intro, cook_id, type_id, classify_id, effect_id, style_id, if_local_feature, dishes_depart, sequence, pungency_degree, sales_mode, size_type, size_json, weight, large_weight, little_weight, weight_deviation, price, unit_price, large_price, little_price, image_url, particulars, recommend, index_recommend, like_survey, like_batch, like_num, initial_score, calories, protein, fat, carbohydrate, dietary_fiber, cholesterol, calcium, sodium, purine, iron, iodine, kalium, vitamin_a, vitamin_c, vitamin_e, magnesium, zinc, glycemic_index, sort, canteen_id, shopstall_id, hide_flag, convert_flag, material_cost, gross_profit, gross_profit_rate, public_dishes, area_id, revision, create_by, create_time, update_by, update_time, remark from menu_dishes
|
||||
select b.*,a.type_name
|
||||
from menu_dishes b
|
||||
LEFT JOIN menu_dishes_type a on a.type_id = b.type_id
|
||||
</sql>
|
||||
|
||||
<select id="selectMenuDishesList" parameterType="com.bonus.canteen.core.menu.domain.MenuDishes" resultMap="MenuDishesResult">
|
||||
<include refid="selectMenuDishesVo"/>
|
||||
<where>
|
||||
<if test="dishesId != null "> and dishes_id = #{dishesId}</if>
|
||||
<if test="baseDishesId != null "> and base_dishes_id = #{baseDishesId}</if>
|
||||
<if test="mealType != null "> and meal_type = #{mealType}</if>
|
||||
<if test="dishesNum != null and dishesNum != ''"> and dishes_num = #{dishesNum}</if>
|
||||
<if test="customId != null "> and custom_id = #{customId}</if>
|
||||
<if test="inventoryId != null and inventoryId != ''"> and inventory_id = #{inventoryId}</if>
|
||||
<if test="dishesName != null and dishesName != ''"> and dishes_name like concat('%', #{dishesName}, '%')</if>
|
||||
<if test="aliasName != null and aliasName != ''"> and alias_name like concat('%', #{aliasName}, '%')</if>
|
||||
<if test="pinyinInitials != null and pinyinInitials != ''"> and pinyin_initials = #{pinyinInitials}</if>
|
||||
<if test="pinyinFull != null and pinyinFull != ''"> and pinyin_full = #{pinyinFull}</if>
|
||||
<if test="barCode != null and barCode != ''"> and bar_code = #{barCode}</if>
|
||||
<if test="intro != null and intro != ''"> and intro = #{intro}</if>
|
||||
<if test="cookId != null "> and cook_id = #{cookId}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="classifyId != null "> and classify_id = #{classifyId}</if>
|
||||
<if test="effectId != null "> and effect_id = #{effectId}</if>
|
||||
<if test="styleId != null "> and style_id = #{styleId}</if>
|
||||
<if test="ifLocalFeature != null "> and if_local_feature = #{ifLocalFeature}</if>
|
||||
<if test="dishesDepart != null "> and dishes_depart = #{dishesDepart}</if>
|
||||
<if test="sequence != null "> and sequence = #{sequence}</if>
|
||||
<if test="pungencyDegree != null "> and pungency_degree = #{pungencyDegree}</if>
|
||||
<if test="salesMode != null "> and sales_mode = #{salesMode}</if>
|
||||
<if test="sizeType != null "> and size_type = #{sizeType}</if>
|
||||
<if test="sizeJson != null and sizeJson != ''"> and size_json = #{sizeJson}</if>
|
||||
<if test="weight != null "> and weight = #{weight}</if>
|
||||
<if test="largeWeight != null "> and large_weight = #{largeWeight}</if>
|
||||
<if test="littleWeight != null "> and little_weight = #{littleWeight}</if>
|
||||
<if test="weightDeviation != null "> and weight_deviation = #{weightDeviation}</if>
|
||||
<if test="price != null "> and price = #{price}</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="largePrice != null "> and large_price = #{largePrice}</if>
|
||||
<if test="littlePrice != null "> and little_price = #{littlePrice}</if>
|
||||
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
||||
<if test="particulars != null and particulars != ''"> and particulars = #{particulars}</if>
|
||||
<if test="recommend != null and recommend != ''"> and recommend = #{recommend}</if>
|
||||
<if test="indexRecommend != null "> and index_recommend = #{indexRecommend}</if>
|
||||
<if test="likeSurvey != null "> and like_survey = #{likeSurvey}</if>
|
||||
<if test="likeBatch != null "> and like_batch = #{likeBatch}</if>
|
||||
<if test="likeNum != null "> and like_num = #{likeNum}</if>
|
||||
<if test="initialScore != null "> and initial_score = #{initialScore}</if>
|
||||
<if test="calories != null "> and calories = #{calories}</if>
|
||||
<if test="protein != null "> and protein = #{protein}</if>
|
||||
<if test="fat != null "> and fat = #{fat}</if>
|
||||
<if test="carbohydrate != null "> and carbohydrate = #{carbohydrate}</if>
|
||||
<if test="dietaryFiber != null "> and dietary_fiber = #{dietaryFiber}</if>
|
||||
<if test="cholesterol != null "> and cholesterol = #{cholesterol}</if>
|
||||
<if test="calcium != null "> and calcium = #{calcium}</if>
|
||||
<if test="sodium != null "> and sodium = #{sodium}</if>
|
||||
<if test="purine != null "> and purine = #{purine}</if>
|
||||
<if test="iron != null "> and iron = #{iron}</if>
|
||||
<if test="iodine != null "> and iodine = #{iodine}</if>
|
||||
<if test="kalium != null "> and kalium = #{kalium}</if>
|
||||
<if test="vitaminA != null "> and vitamin_a = #{vitaminA}</if>
|
||||
<if test="vitaminC != null "> and vitamin_c = #{vitaminC}</if>
|
||||
<if test="vitaminE != null "> and vitamin_e = #{vitaminE}</if>
|
||||
<if test="magnesium != null "> and magnesium = #{magnesium}</if>
|
||||
<if test="zinc != null "> and zinc = #{zinc}</if>
|
||||
<if test="glycemicIndex != null "> and glycemic_index = #{glycemicIndex}</if>
|
||||
<if test="sort != null "> and sort = #{sort}</if>
|
||||
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
|
||||
<if test="shopstallId != null "> and shopstall_id = #{shopstallId}</if>
|
||||
<if test="hideFlag != null "> and hide_flag = #{hideFlag}</if>
|
||||
<if test="convertFlag != null "> and convert_flag = #{convertFlag}</if>
|
||||
<if test="materialCost != null "> and material_cost = #{materialCost}</if>
|
||||
<if test="grossProfit != null "> and gross_profit = #{grossProfit}</if>
|
||||
<if test="grossProfitRate != null "> and gross_profit_rate = #{grossProfitRate}</if>
|
||||
<if test="publicDishes != null "> and public_dishes = #{publicDishes}</if>
|
||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||
<if test="revision != null "> and revision = #{revision}</if>
|
||||
<if test="dishesId != null "> and b.dishes_id = #{dishesId}</if>
|
||||
<if test="baseDishesId != null "> and b.base_dishes_id = #{baseDishesId}</if>
|
||||
<if test="canteenId != null "> and b.canteen_id = #{canteenId}</if>
|
||||
<if test="shopstallId != null "> and b.shopstall_id = #{shopstallId}</if>
|
||||
<if test="areaId != null "> and b.area_id = #{areaId}</if>
|
||||
<if test="typeId != null "> and b.type_id = #{typeId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMenuDishesById" parameterType="Long" resultMap="MenuDishesResult">
|
||||
<include refid="selectMenuDishesVo"/>
|
||||
where id = #{id}
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMenuDishes" parameterType="com.bonus.canteen.core.menu.domain.MenuDishes" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
@ -479,7 +420,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="weight != null">#{weight},</if>
|
||||
<if test="weightDeviation != null">#{weightDeviation},</if>
|
||||
<if test="imageUrl != null">#{imageUrl},</if>
|
||||
<if test="effectId != null">#{effectId}},</if>
|
||||
<if test="effectId != null">#{effectId},</if>
|
||||
<if test="styleId != null">#{styleId},</if>
|
||||
<if test="cookId != null">#{cookId},</if>
|
||||
<if test="classifyId != null">#{classifyId},</if>
|
||||
|
|
@ -568,5 +509,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from menu_nutrition where nutrition_id = #{materialId}
|
||||
</select>
|
||||
|
||||
<select id="addFinalNutrition" resultType="int"></select>
|
||||
<select id="addFinalNutrition" resultType="int">
|
||||
|
||||
update menu_nutrition set
|
||||
dible = #{dible}, water =#{water},calories =#{calories}, protein =#{protein}, fat =#{fat},
|
||||
carbohydrate =#{carbohydrate}, dietary_fiber =#{dietaryFiber}, cholesterol =#{cholesterol}, ash =#{ash}, vitamin_a =#{vitaminA},
|
||||
carotene =#{carotene}, thiamine =#{thiamine}, riboflavin =#{riboflavin}, niacin =#{niacin}, vitamin_c =#{vitaminC},
|
||||
vitamin_d =#{vitaminD}, vitamin_e =#{vitaminE}, choline =#{choline}, biotin =#{biotin},
|
||||
pantothenic_acid =#{pantothenicAcid}, guanine =#{guanine}, adenine =#{adenine}, hypoxanthine =#{hypoxanthine},
|
||||
xanthine =#{xanthine}, purine =#{purine}, glycemic_index =#{glycemicIndex}
|
||||
where nutrition_id = #{nutritionId}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="pinyinFull" column="pinyin_full" />
|
||||
<result property="imageUrl" column="image_url" />
|
||||
<result property="nutritionId" column="nutrition_id" />
|
||||
<result property="nutritionType" column="nutrition_type" />
|
||||
<result property="nutritionName" column="nutrition_name" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="materialType" column="material_type" />
|
||||
<result property="barCode" column="bar_code" />
|
||||
<result property="unitId" column="unit_id" />
|
||||
|
|
@ -49,6 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mm.pinyin_full,
|
||||
mm.image_url,
|
||||
mm.nutrition_id,
|
||||
mm.nutrition_type,
|
||||
muu.nutrition_name,
|
||||
mm.category_id,
|
||||
mmc.category_name,
|
||||
mm.material_type,
|
||||
|
|
@ -75,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN alloc_area aa on aa.area_id = mm.area_id
|
||||
LEFT JOIN menu_material_category mmc on mmc.category_id = mm.category_id
|
||||
LEFT JOIN drp_unit du on du.unit_id = mm.unit_id
|
||||
|
||||
LEFT JOIN menu_nutrition muu on muu.nutrition_id = mm.nutrition_id
|
||||
</sql>
|
||||
|
||||
<select id="selectMenuMaterialList" parameterType="com.bonus.canteen.core.menu.domain.MenuMaterial" resultMap="MenuMaterialResult">
|
||||
|
|
@ -104,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="pinyinFull != null and pinyinFull != ''">pinyin_full,</if>
|
||||
<if test="imageUrl != null and imageUrl != ''">image_url,</if>
|
||||
<if test="nutritionId != null">nutrition_id,</if>
|
||||
<if test="nutritionType != null">nutrition_type,</if>
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
<if test="materialType != null">material_type,</if>
|
||||
<if test="barCode != null">bar_code,</if>
|
||||
|
|
@ -133,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="pinyinFull != null and pinyinFull != ''">#{pinyinFull},</if>
|
||||
<if test="imageUrl != null and imageUrl != ''">#{imageUrl},</if>
|
||||
<if test="nutritionId != null">#{nutritionId},</if>
|
||||
<if test="nutritionType != null">#{nutritionType},</if>
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
<if test="materialType != null">#{materialType},</if>
|
||||
<if test="barCode != null">#{barCode},</if>
|
||||
|
|
@ -166,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="pinyinFull != null and pinyinFull != ''">pinyin_full = #{pinyinFull},</if>
|
||||
<if test="imageUrl != null and imageUrl != ''">image_url = #{imageUrl},</if>
|
||||
<if test="nutritionId != null">nutrition_id = #{nutritionId},</if>
|
||||
<if test="nutritionType != null">nutrition_type = #{nutritionType},</if>
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="materialType != null">material_type = #{materialType},</if>
|
||||
<if test="barCode != null">bar_code = #{barCode},</if>
|
||||
|
|
@ -201,7 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<select id="getLastId" resultType="int">
|
||||
select max(id) from menu_material
|
||||
select ifnull(max(id) ,0) from menu_material
|
||||
</select>
|
||||
|
||||
<select id="getOne" resultMap="MenuMaterialResult" parameterType="com.bonus.canteen.core.menu.domain.MenuMaterial">
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectMenuRecipeDishesList" parameterType="com.bonus.canteen.core.menu.domain.MenuRecipeDishes" resultMap="MenuRecipeDishesResult">
|
||||
<include refid="selectMenuRecipeDishesVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="detailId != null "> and detail_id = #{detailId}</if>
|
||||
<if test="dishesId != null "> and dishes_id = #{dishesId}</if>
|
||||
<if test="price != null "> and price = #{price}</if>
|
||||
|
|
@ -51,12 +51,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="revision != null "> and revision = #{revision}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectMenuRecipeDishesById" parameterType="Long" resultMap="MenuRecipeDishesResult">
|
||||
<include refid="selectMenuRecipeDishesVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertMenuRecipeDishes" parameterType="com.bonus.canteen.core.menu.domain.MenuRecipeDishes" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into menu_recipe_dishes
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -151,9 +151,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteMenuRecipeDishesByIds" parameterType="String">
|
||||
delete from menu_recipe_dishes where id in
|
||||
delete from menu_recipe_dishes where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
<insert id="insertValues">
|
||||
INSERT INTO menu_recipe_dishes
|
||||
(detail_id, dishes_id, price, size_type, supply_num, sale_num, surplus_num,
|
||||
restrict_num, sale_price, recommend_flag, crby, crtime, upby, uptime, sort_num)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator="," open="" close="">
|
||||
( #{item.detailId}, #{item.dishesId},#{item.price},#{item.sizeType},#{item.supplyNum},#{item.saleNum},#{item.surplusNum},
|
||||
#{item.restrictNum},#{item.salePrice},#{item.recommendFlag}
|
||||
,#{item.crby},#{item.crtime},#{item.upby},#{item.uptime},#{item.sortNum})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -517,7 +517,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select DISTINCT
|
||||
mrd.mealtime_type,
|
||||
mrd.detail_id,
|
||||
mdb.base_dishes_id as dishes_id,
|
||||
mdb.base_dishes_id ,
|
||||
md.dishes_id,
|
||||
mdb.dishes_name,
|
||||
mrdd.id,
|
||||
mrdd.price,
|
||||
|
|
@ -642,6 +643,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<collection property="dishesList" ofType="com.bonus.canteen.core.menu.vo.MenuRecipeDetailDishesVO">
|
||||
<result property="id" column="id"/>
|
||||
<result property="dishesId" column="dishes_id"/>
|
||||
<result property="baseDishesId" column="base_dishes_id"/>
|
||||
<result property="dishesName" column="dishes_name"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="sizeType" column="size_type"/>
|
||||
|
|
@ -666,7 +668,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectDateDetailList" resultMap="menuRecipeDetailDateVO">
|
||||
select mrd.mealtime_type,
|
||||
mrd.detail_id,
|
||||
mdb.base_dishes_id as dishes_id,
|
||||
md.dishes_id,
|
||||
mdb.base_dishes_id,
|
||||
mdb.dishes_name,
|
||||
mrdd.id,
|
||||
mrdd.price,
|
||||
|
|
@ -956,5 +959,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where canteen_id = #{canteenId}
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="deleteRecipeByrecipeId">
|
||||
delete from menu_recipe where recipe_id = #{recipeId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue