菜谱列表-新增
This commit is contained in:
parent
5257be7a39
commit
88d7b21933
|
|
@ -2,10 +2,19 @@ package com.bonus.canteen.core.menu.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.RedisUtil;
|
||||
import com.bonus.canteen.core.common.utils.TenantContextHolder;
|
||||
import com.bonus.canteen.core.menu.dto.MenuRecipeAddDTO;
|
||||
import com.bonus.canteen.core.menu.dto.MenuRecipeParamDTO;
|
||||
import com.bonus.canteen.core.menu.service.IMenuRecipeService;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.houqin.constant.GlobalConstants;
|
||||
import com.bonus.common.houqin.i18n.I18n;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.Logical;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -35,86 +44,6 @@ public class MenuRecipeController extends BaseController {
|
|||
@Autowired
|
||||
private IMenuRecipeService menuRecipeService;
|
||||
|
||||
/**
|
||||
* 查询菜品计划信息列表
|
||||
*/
|
||||
@ApiOperation(value = "查询菜品计划信息列表")
|
||||
//@RequiresPermissions("menu:recipe:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MenuRecipe menuRecipe) {
|
||||
startPage();
|
||||
List<MenuRecipe> list = menuRecipeService.selectMenuRecipeList(menuRecipe);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出菜品计划信息列表
|
||||
*/
|
||||
@ApiOperation(value = "导出菜品计划信息列表")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("menu:recipe:export")
|
||||
@SysLog(title = "菜品计划信息", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出菜品计划信息")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MenuRecipe menuRecipe) {
|
||||
List<MenuRecipe> list = menuRecipeService.selectMenuRecipeList(menuRecipe);
|
||||
ExcelUtil<MenuRecipe> util = new ExcelUtil<MenuRecipe>(MenuRecipe.class);
|
||||
util.exportExcel(response, list, "菜品计划信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜品计划信息详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取菜品计划信息详细信息")
|
||||
//@RequiresPermissions("menu:recipe:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(menuRecipeService.selectMenuRecipeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜品计划信息
|
||||
*/
|
||||
@ApiOperation(value = "新增菜品计划信息")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("menu:recipe:add")
|
||||
@SysLog(title = "菜品计划信息", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增菜品计划信息")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MenuRecipe menuRecipe) {
|
||||
try {
|
||||
return toAjax(menuRecipeService.insertMenuRecipe(menuRecipe));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜品计划信息
|
||||
*/
|
||||
@ApiOperation(value = "修改菜品计划信息")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("menu:recipe:edit")
|
||||
@SysLog(title = "菜品计划信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改菜品计划信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody MenuRecipe menuRecipe) {
|
||||
try {
|
||||
return toAjax(menuRecipeService.updateMenuRecipe(menuRecipe));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜品计划信息
|
||||
*/
|
||||
@ApiOperation(value = "删除菜品计划信息")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("menu:recipe:remove")
|
||||
@SysLog(title = "菜品计划信息", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除菜品计划信息")
|
||||
@PostMapping("/del/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(menuRecipeService.deleteMenuRecipeByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping({"/getDishesList"})
|
||||
@ApiOperation("菜谱列表-获取菜品列表")
|
||||
|
|
@ -122,4 +51,24 @@ public class MenuRecipeController extends BaseController {
|
|||
return this.menuRecipeService.getDishesList(dto);
|
||||
}
|
||||
|
||||
@PostMapping({"/add"})
|
||||
@ApiOperation("菜谱计划发布v2")
|
||||
public Long addMenuRecipeV2(@RequestBody @Valid MenuRecipeAddDTO dto) {
|
||||
Long recipeId = null;
|
||||
String var10000 = "yst:merchant-id:menu:recipe:edit:".replace("merchant-id", String.valueOf(GlobalConstants.TENANT_ID));
|
||||
String lockKey = var10000 + dto.getRecipeId();
|
||||
boolean succ = RedisUtil.tryLock(lockKey, 0, 300);
|
||||
if (!succ) {
|
||||
throw new ServiceException("获取锁失败,停止新增!");
|
||||
} else {
|
||||
try {
|
||||
recipeId = this.menuRecipeService.add(dto);
|
||||
} finally {
|
||||
RedisUtil.safeUnLock(lockKey);
|
||||
}
|
||||
|
||||
return recipeId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.bonus.canteen.core.menu.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class MenuRecipeAddDTO {
|
||||
@ApiModelProperty("菜谱id")
|
||||
private Long recipeId;
|
||||
@ApiModelProperty("菜谱名称")
|
||||
private String recipeName;
|
||||
@ApiModelProperty("菜谱类型 1 默认 2按天 3按周")
|
||||
private Integer recipeType;
|
||||
@ApiModelProperty("食堂id")
|
||||
private Long canteenId;
|
||||
@ApiModelProperty("档口id")
|
||||
private Long stallId;
|
||||
@ApiModelProperty("适用人员范围")
|
||||
private Long effId;
|
||||
@ApiModelProperty("发布日期列表")
|
||||
private @Valid List<MenuRecipeDateAddDTO> recipeDateList;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.bonus.canteen.core.menu.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class MenuRecipeDateAddDTO {
|
||||
@ApiModelProperty("发布日期")
|
||||
private LocalDate applyDate;
|
||||
@ApiModelProperty("启用时间(周)")
|
||||
private Integer applyWeek;
|
||||
@ApiModelProperty("菜谱详情")
|
||||
private @Valid List<MenuRecipeDetailAddDTO> detailList;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.bonus.canteen.core.menu.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MenuRecipeDetailAddDTO{
|
||||
@ApiModelProperty("餐次类型")
|
||||
private @NotNull(
|
||||
message = "{menu_mealtime_type_null}"
|
||||
) Integer mealtimeType;
|
||||
@ApiModelProperty("发布菜品")
|
||||
private @Valid List<MenuRecipeDishesAddDTO> dishesList;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.bonus.canteen.core.menu.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
@Data
|
||||
public class MenuRecipeDishesAddDTO implements Serializable {
|
||||
private Long id;
|
||||
@ApiModelProperty("菜品id")
|
||||
private @NotNull(
|
||||
message = "{menu_dishes_id_null}"
|
||||
) Long dishesId;
|
||||
@ApiModelProperty("菜品单价")
|
||||
private @NotNull(
|
||||
message = "{menu_price_null}"
|
||||
) Integer price;
|
||||
@ApiModelProperty("规格类型(1-标准,2-大份,3-小份,4-50g,5-100g)")
|
||||
private Long sizeType;
|
||||
@ApiModelProperty("供应数量")
|
||||
private @NotNull(
|
||||
message = "{menu_supply_num_null}"
|
||||
) Integer supplyNum;
|
||||
@ApiModelProperty("销售数量")
|
||||
private Integer saleNum;
|
||||
@ApiModelProperty("个人限购数量")
|
||||
private @NotNull(
|
||||
message = "{menu_restrict_num_null}"
|
||||
) Integer restrictNum;
|
||||
@ApiModelProperty("菜品价格(优惠价)")
|
||||
private Integer salePrice;
|
||||
@ApiModelProperty("是否推荐")
|
||||
private Integer recommendFlag;
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer sortNum;
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ import java.util.TreeSet;
|
|||
import com.bonus.canteen.core.menu.domain.MenuRecipe;
|
||||
import com.bonus.canteen.core.menu.dto.MenuRecipeParamDTO;
|
||||
import com.bonus.canteen.core.menu.dto.RecipeDishesCountDTO;
|
||||
import com.bonus.canteen.core.menu.model.MenuBaseModel;
|
||||
import com.bonus.canteen.core.menu.vo.MenuRecipeDataVO;
|
||||
import com.bonus.canteen.core.menu.vo.MenuRecipeV2VO;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
|
|
@ -87,4 +88,11 @@ public interface MenuRecipeMapper {
|
|||
* @return
|
||||
*/
|
||||
List<MenuRecipeDataVO> selectApplyDateListByRecipeId(@Param("applyDate") LocalDate applyDate, @Param("recipeIds") List<Long> recipeIds);
|
||||
|
||||
/**
|
||||
* 查询基础
|
||||
* @param baseDishesIdList
|
||||
* @return
|
||||
*/
|
||||
List<MenuBaseModel> selectBaseSizeDishesId(@Param("baseDishesIdList") List<Long> baseDishesIdList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
package com.bonus.canteen.core.menu.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MenuBaseDishesModel {
|
||||
private Long dishesId;
|
||||
private String sizeJson;
|
||||
private Integer convertFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.bonus.canteen.core.menu.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class MenuBaseModel {
|
||||
private Long baseDishesId;
|
||||
private List<MenuBaseDishesModel> dishesList;
|
||||
}
|
||||
|
|
@ -2,9 +2,12 @@ package com.bonus.canteen.core.menu.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipe;
|
||||
import com.bonus.canteen.core.menu.dto.MenuRecipeAddDTO;
|
||||
import com.bonus.canteen.core.menu.dto.MenuRecipeParamDTO;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 菜品计划信息Service接口
|
||||
*
|
||||
|
|
@ -12,58 +15,12 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
* @date 2025-04-03
|
||||
*/
|
||||
public interface IMenuRecipeService {
|
||||
/**
|
||||
* 查询菜品计划信息
|
||||
*
|
||||
* @param id 菜品计划信息主键
|
||||
* @return 菜品计划信息
|
||||
*/
|
||||
public MenuRecipe selectMenuRecipeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询菜品计划信息列表
|
||||
*
|
||||
* @param menuRecipe 菜品计划信息
|
||||
* @return 菜品计划信息集合
|
||||
*/
|
||||
public List<MenuRecipe> selectMenuRecipeList(MenuRecipe menuRecipe);
|
||||
|
||||
/**
|
||||
* 新增菜品计划信息
|
||||
*
|
||||
* @param menuRecipe 菜品计划信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMenuRecipe(MenuRecipe menuRecipe);
|
||||
|
||||
/**
|
||||
* 修改菜品计划信息
|
||||
*
|
||||
* @param menuRecipe 菜品计划信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMenuRecipe(MenuRecipe menuRecipe);
|
||||
|
||||
/**
|
||||
* 批量删除菜品计划信息
|
||||
*
|
||||
* @param ids 需要删除的菜品计划信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMenuRecipeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除菜品计划信息信息
|
||||
*
|
||||
* @param id 菜品计划信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMenuRecipeById(Long id);
|
||||
|
||||
/**
|
||||
* 菜谱列表-获取菜品列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getDishesList(MenuRecipeParamDTO dto);
|
||||
|
||||
Long add(@Valid MenuRecipeAddDTO dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,12 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.canteen.core.menu.dto.MenuRecipeParamDTO;
|
||||
import com.bonus.canteen.core.menu.dto.RecipeDishesCountDTO;
|
||||
import com.bonus.canteen.core.menu.dto.*;
|
||||
import com.bonus.canteen.core.menu.mapper.MenuRecipeDishesMapper;
|
||||
import com.bonus.canteen.core.menu.model.MenuBaseDishesModel;
|
||||
import com.bonus.canteen.core.menu.model.MenuBaseModel;
|
||||
import com.bonus.canteen.core.menu.service.IMenuRecipeService;
|
||||
import com.bonus.canteen.core.menu.vo.MenuRecipeDataVO;
|
||||
import com.bonus.canteen.core.menu.vo.MenuRecipeV2VO;
|
||||
|
|
@ -24,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.menu.mapper.MenuRecipeMapper;
|
||||
import com.bonus.canteen.core.menu.domain.MenuRecipe;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 菜品计划信息Service业务层处理
|
||||
|
|
@ -36,82 +39,6 @@ public class MenuRecipeServiceImpl implements IMenuRecipeService {
|
|||
@Autowired
|
||||
private MenuRecipeMapper menuRecipeMapper;
|
||||
|
||||
/**
|
||||
* 查询菜品计划信息
|
||||
*
|
||||
* @param id 菜品计划信息主键
|
||||
* @return 菜品计划信息
|
||||
*/
|
||||
@Override
|
||||
public MenuRecipe selectMenuRecipeById(Long id) {
|
||||
return menuRecipeMapper.selectMenuRecipeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜品计划信息列表
|
||||
*
|
||||
* @param menuRecipe 菜品计划信息
|
||||
* @return 菜品计划信息
|
||||
*/
|
||||
@Override
|
||||
public List<MenuRecipe> selectMenuRecipeList(MenuRecipe menuRecipe) {
|
||||
return menuRecipeMapper.selectMenuRecipeList(menuRecipe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜品计划信息
|
||||
*
|
||||
* @param menuRecipe 菜品计划信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMenuRecipe(MenuRecipe menuRecipe) {
|
||||
menuRecipe.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return menuRecipeMapper.insertMenuRecipe(menuRecipe);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜品计划信息
|
||||
*
|
||||
* @param menuRecipe 菜品计划信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMenuRecipe(MenuRecipe menuRecipe) {
|
||||
menuRecipe.setUpdateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return menuRecipeMapper.updateMenuRecipe(menuRecipe);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除菜品计划信息
|
||||
*
|
||||
* @param ids 需要删除的菜品计划信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMenuRecipeByIds(Long[] ids) {
|
||||
return menuRecipeMapper.deleteMenuRecipeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜品计划信息信息
|
||||
*
|
||||
* @param id 菜品计划信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMenuRecipeById(Long id) {
|
||||
return menuRecipeMapper.deleteMenuRecipeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜谱列表-获取菜品列表
|
||||
*
|
||||
|
|
@ -155,6 +82,13 @@ public class MenuRecipeServiceImpl implements IMenuRecipeService {
|
|||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public Long add(MenuRecipeAddDTO dto) {
|
||||
this.changeBaseDishesIdTo(dto);
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public List<LocalDate> getLastWeekDate() {
|
||||
List<LocalDate> objects = new ArrayList<>();
|
||||
LocalDate sunday = LocalDate.now().with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY));
|
||||
|
|
@ -172,4 +106,52 @@ public class MenuRecipeServiceImpl implements IMenuRecipeService {
|
|||
}
|
||||
return dates;
|
||||
}
|
||||
|
||||
public void changeBaseDishesIdTo(MenuRecipeAddDTO content) {
|
||||
List<MenuRecipeDateAddDTO> recipeDateList = content.getRecipeDateList();
|
||||
if (!ObjectUtil.isEmpty(recipeDateList)) {
|
||||
List<MenuRecipeDishesAddDTO> bean = recipeDateList.stream()
|
||||
.filter((x) -> ObjectUtil.isNotEmpty(x.getDetailList()))
|
||||
.flatMap((x) -> x.getDetailList().stream())
|
||||
.filter((x) -> ObjectUtil.isNotEmpty(x.getDishesList()))
|
||||
.flatMap((x) -> x.getDishesList().stream()).collect(Collectors.toList());
|
||||
this.changeBaseDishesId(bean);
|
||||
}
|
||||
}
|
||||
|
||||
public void changeBaseDishesId(List<MenuRecipeDishesAddDTO> bean) {
|
||||
if (!ObjectUtil.isEmpty(bean)) {
|
||||
List<Long> baseDishesIdList = bean.stream().map(MenuRecipeDishesAddDTO::getDishesId).distinct().collect(Collectors.toList());
|
||||
List<MenuBaseModel> baseList = this.menuRecipeMapper.selectBaseSizeDishesId(baseDishesIdList);
|
||||
Map<Long, List<MenuBaseDishesModel>> baseMap = baseList.stream().collect(Collectors.toMap(MenuBaseModel::getBaseDishesId, MenuBaseModel::getDishesList));
|
||||
bean.forEach((dishes) -> {
|
||||
Long sizeType = dishes.getSizeType();
|
||||
List baseDishesList;
|
||||
MenuBaseDishesModel tempDishes;
|
||||
if (sizeType == 2L) {
|
||||
baseDishesList = baseMap.get(dishes.getDishesId());
|
||||
tempDishes = (MenuBaseDishesModel)baseDishesList.get(0);
|
||||
if (CharSequenceUtil.contains(tempDishes.getSizeJson(), "大份")) {
|
||||
dishes.setDishesId(tempDishes.getDishesId());
|
||||
} else {
|
||||
dishes.setDishesId(((MenuBaseDishesModel)baseDishesList.get(1)).getDishesId());
|
||||
}
|
||||
} else if (sizeType == 3L) {
|
||||
baseDishesList = baseMap.get(dishes.getDishesId());
|
||||
tempDishes = (MenuBaseDishesModel)baseDishesList.get(0);
|
||||
if (CharSequenceUtil.contains(tempDishes.getSizeJson(), "小份")) {
|
||||
dishes.setDishesId(tempDishes.getDishesId());
|
||||
} else {
|
||||
dishes.setDishesId(((MenuBaseDishesModel)baseDishesList.get(1)).getDishesId());
|
||||
}
|
||||
} else {
|
||||
baseDishesList = baseMap.get(dishes.getDishesId());
|
||||
tempDishes = (MenuBaseDishesModel)baseDishesList.get(0);
|
||||
dishes.setDishesId(tempDishes.getDishesId());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
|
||||
</select>
|
||||
<select id="selectBaseSizeDishesId" resultType="com.bonus.canteen.core.menu.model.MenuBaseModel">
|
||||
select
|
||||
base_dishes_id,
|
||||
dishes_id,
|
||||
size_json
|
||||
from
|
||||
menu_dishes
|
||||
where
|
||||
base_dishes_id in
|
||||
<foreach collection="baseDishesIdList" item="baseDishesId" separator="," open="(" close=")">
|
||||
#{baseDishesId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="insertMenuRecipe" parameterType="com.bonus.canteen.core.menu.domain.MenuRecipe" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into menu_recipe
|
||||
|
|
|
|||
Loading…
Reference in New Issue