This commit is contained in:
sxu 2025-04-17 13:09:10 +08:00
parent 404afb709d
commit 1a89497dde
2 changed files with 39 additions and 4 deletions

View File

@ -127,9 +127,9 @@ public class MenuAppRecipeServiceImpl implements IMenuAppRecipeService {
resultList.sort(Collections.reverseOrder((s1, s2) -> {
return s2.getMealtimeType() - s1.getMealtimeType();
}));
Long stallId = menuAppRecipeMapper.selectStallIdByWrappers(Wrappers.lambdaQuery(MenuRecipe.class).eq(MenuRecipe::getRecipeId, content.getRecipeId()).eq(MenuRecipe::getDelFlag, DelFlagEnum.DEL_FALSE.key()));
AllocStall allocStall = allocStallMapper.selectAllocStallByStallId(stallId);
List<AllocStallMealtime> mealTimeList = allocStall.getAllocStallMealtimeList();
Long stallId = menuAppRecipeMapper.selectStallIdByWrappers(Wrappers.lambdaQuery(MenuRecipe.class).eq(MenuRecipe::getRecipeId, content.getRecipeId()));
List<AllocStallMealtime> allocStallMealtimes = allocStallMapper.selectMealtimeByStallId(stallId);
List<AllocStallMealtime> mealTimeList = allocStallMealtimes;
log.info("配置api查询的档口餐次,档口id: {}, 配置: {}", stallId, JSON.toJSONString(mealTimeList));
if (ObjectUtil.isEmpty(mealTimeList)) {
log.info("未获取到开启餐次");

View File

@ -16,6 +16,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" />
</resultMap>
<resultMap id="appletReserveRecipeVO" type="com.bonus.canteen.core.menu.vo.AppletReserveRecipeVO">
<result property="mealtimeType" column="mealtime_type"/>
<collection property="typeList" ofType="com.bonus.canteen.core.menu.vo.AppletReserveRecipeTypeVO">
<result property="typeId" column="type_id"/>
<result property="typeName" column="type_name"/>
<collection property="dishesList" ofType="com.bonus.canteen.core.menu.vo.AppletReserveRecipeDishesVO">
<result property="baseDishesId" column="base_dishes_id"/>
<result property="dishesName" column="dishes_name"/>
<result property="detailType" column="detail_type"/>
<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"/>
<result property="recommendFlag" column="recommend_flag"/>
<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"/>
<result property="monthlySales" column="monthly_sales"/>
<result property="goodProbability" column="good_probability"/>
</collection>
<collection property="tasteNameList" ofType="string">
<result property="tasteName" column="taste_name"/>
</collection>
</collection>
</collection>
</resultMap>
<sql id="selectMenuAppRecipeVo">
select id, recipe_id, bind_type, bind_time, meal_line_id, create_by, create_time, update_by, update_time, remark from menu_app_recipe
</sql>
@ -89,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<!-- 获取预定点餐菜谱 -->
<select id="selectReserveRecipe" resultType="com.bonus.canteen.core.menu.vo.AppletReserveRecipeVO">
<select id="selectReserveRecipe" resultMap="appletReserveRecipeVO">
select
mrd.mealtime_type,
-- if(md.meal_type = 2, 2, mdt.type_id) as type_id,