h5预订餐

This commit is contained in:
sxu 2025-06-06 15:11:09 +08:00
parent a3fe487e36
commit 434fbedda2
2 changed files with 47 additions and 51 deletions

View File

@ -13,9 +13,9 @@ public class AppletCurrentDishesDetailVO {
@ApiModelProperty("菜品名称") @ApiModelProperty("菜品名称")
private String dishesName; private String dishesName;
@ApiModelProperty("库存数量") @ApiModelProperty("库存数量")
private Integer surplusNum; private Integer remanentNum;
@ApiModelProperty("限购数量") @ApiModelProperty("限购数量")
private Integer restrictNum; private Integer limitNum;
@ApiModelProperty("菜品价格") @ApiModelProperty("菜品价格")
private Integer dishesPrice; private Integer dishesPrice;
@ApiModelProperty("优惠价") @ApiModelProperty("优惠价")
@ -49,14 +49,6 @@ public class AppletCurrentDishesDetailVO {
return this.dishesName; return this.dishesName;
} }
public Integer getSurplusNum() {
return this.surplusNum;
}
public Integer getRestrictNum() {
return this.restrictNum;
}
public Integer getDishesPrice() { public Integer getDishesPrice() {
return this.dishesPrice; return this.dishesPrice;
} }
@ -77,12 +69,20 @@ public class AppletCurrentDishesDetailVO {
this.dishesName = dishesName; this.dishesName = dishesName;
} }
public void setSurplusNum(final Integer surplusNum) { public Integer getRemanentNum() {
this.surplusNum = surplusNum; return remanentNum;
} }
public void setRestrictNum(final Integer restrictNum) { public void setRemanentNum(Integer remanentNum) {
this.restrictNum = restrictNum; this.remanentNum = remanentNum;
}
public Integer getLimitNum() {
return limitNum;
}
public void setLimitNum(Integer limitNum) {
this.limitNum = limitNum;
} }
public void setDishesPrice(final Integer dishesPrice) { public void setDishesPrice(final Integer dishesPrice) {

View File

@ -7,17 +7,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="canteenId" column="canteen_id"/> <result property="canteenId" column="canteen_id"/>
<result property="canteenName" column="canteen_name"/> <result property="canteenName" column="canteen_name"/>
<result property="canteenImgUrl" column="canteen_img_url"/> <result property="canteenImgUrl" column="canteen_img_url"/>
<result property="startBusinessTime" column="start_business_time_ac"/> <result property="startBusinessTime" column="biz_start_time_ac"/>
<result property="endBusinessTime" column="end_business_time_ac"/> <result property="endBusinessTime" column="biz_end_time_ac"/>
<result property="businessState" column="business_state_ac"/> <result property="businessState" column="biz_state_ac"/>
<collection property="stallList" ofType="com.bonus.canteen.core.basic.domain.AppletReserveStallVO"> <collection property="stallList" ofType="com.bonus.canteen.core.basic.domain.AppletReserveStallVO">
<result property="stallId" column="stall_id"/> <result property="stallId" column="stall_id"/>
<result property="stallName" column="stall_name"/> <result property="stallName" column="stall_name"/>
<result property="stallImgUrl" column="stall_img_url"/> <result property="stallImgUrl" column="stall_img_url"/>
<result property="recipeId" column="recipe_id"/> <result property="recipeId" column="recipe_id"/>
<result property="startBusinessTime" column="start_business_time"/> <result property="startBusinessTime" column="biz_start_time"/>
<result property="endBusinessTime" column="end_business_time"/> <result property="endBusinessTime" column="biz_end_time"/>
<result property="businessState" column="business_state"/> <result property="businessState" column="biz_state"/>
</collection> </collection>
</resultMap> </resultMap>
@ -40,8 +40,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<collection property="dishesDetailList" ofType="com.bonus.canteen.core.cook.vo.AppletCurrentDishesDetailVO"> <collection property="dishesDetailList" ofType="com.bonus.canteen.core.cook.vo.AppletCurrentDishesDetailVO">
<result property="dishesId" column="dishes_id"/> <result property="dishesId" column="dishes_id"/>
<result property="dishesName" column="real_dishes_name"/> <result property="dishesName" column="real_dishes_name"/>
<result property="surplusNum" column="surplus_num"/> <result property="remanentNum" column="remanent_num"/>
<result property="restrictNum" column="restrict_num"/> <result property="limitNum" column="limit_num"/>
<result property="dishesPrice" column="dishes_price"/> <result property="dishesPrice" column="dishes_price"/>
<result property="prefPrice" column="pref_price"/> <result property="prefPrice" column="pref_price"/>
<result property="sizeType" column="size_type"/> <result property="sizeType" column="size_type"/>
@ -65,17 +65,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ass.stall_name, ass.stall_name,
ass.img_url as stall_img_url, ass.img_url as stall_img_url,
mr.recipe_id, mr.recipe_id,
ac.start_business_time as start_business_time_ac, ac.biz_start_time as biz_start_time_ac,
ac.end_business_time as end_business_time_ac, ac.biz_end_time as biz_end_time_ac,
ac.business_state as business_state_ac, ac.biz_state as biz_state_ac,
ass.start_business_time, ass.biz_start_time,
ass.end_business_time, ass.biz_end_time,
ass.business_state ass.biz_state
from from
alloc_canteen ac basic_canteen ac
left join alloc_stall ass on ac.canteen_id = ass.canteen_id left join basic_stall ass on ac.canteen_id = ass.canteen_id
left join menu_recipe mr on mr.stall_id = ass.stall_id left join cook_recipe mr on mr.stall_id = ass.stall_id
left join menu_app_recipe mar on mar.recipe_id = mr.recipe_id left join cook_recipe_bind_app mar on mar.recipe_id = mr.recipe_id
where where
bind_type = 2 bind_type = 2
and ac.del_flag = 0 and ac.del_flag = 0
@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
stall_id, stall_id,
sum(monthly_sales) as monthly_sales sum(monthly_sales) as monthly_sales
from from
menu_dishes_sale_record cook_dishes_sale_record
where where
sale_month = month(curdate()) sale_month = month(curdate())
and stall_id in and stall_id in
@ -104,15 +104,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mrd.mealtime_type, mrd.mealtime_type,
md.meal_type as type_id, md.meal_type as type_id,
'菜品' as type_name, '菜品' as type_name,
mdb.base_dishes_id,
md.dishes_id, md.dishes_id,
mdb.dishes_name, md.dishes_name,
md.dishes_name as real_dishes_name, md.dishes_name as real_dishes_name,
md.meal_type as detail_type, md.meal_type as detail_type,
md.image_url as dishes_img_url, md.image_url as dishes_img_url,
mrd.detail_id, mrd.recipe_detail_id,
m.surplus_num, m.remanent_num,
m.restrict_num, m.limit_num,
m.price as dishes_price, m.price as dishes_price,
m.sale_price as pref_price, m.sale_price as pref_price,
ac.canteen_id, ac.canteen_id,
@ -125,26 +124,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mdsr.monthly_sales, mdsr.monthly_sales,
mdsr.good_probability mdsr.good_probability
from from
menu_recipe_detail mrd cook_recipe_detail mrd
inner join menu_recipe_dishes m on mrd.detail_id = m.detail_id inner join cook_recipe_dishes m on mrd.recipe_detail_id = m.recipe_detail_id
inner join menu_dishes md on m.dishes_id = md.dishes_id inner join cook_dishes md on m.dishes_id = md.dishes_id
inner join menu_dishes_type mdt on md.type_id = mdt.type_id inner join cook_dishes_type mdt on md.type_id = mdt.dishes_type_id
inner join menu_recipe mr on mrd.recipe_id = mr.recipe_id inner join cook_recipe mr on mrd.recipe_id = mr.recipe_id
inner join menu_app_recipe mar on mr.recipe_id = mar.recipe_id inner join cook_recipe_bind_app mar on mr.recipe_id = mar.recipe_id
and mar.bind_type = 2 and mar.bind_type = 2
left join menu_dishes_sale_record mdsr on md.dishes_id = mdsr.dishes_id left join cook_dishes_sale_record mdsr on md.dishes_id = mdsr.dishes_id
and mr.stall_id = mdsr.stall_id and mr.stall_id = mdsr.stall_id
and mdsr.sale_month = month(curdate()) and mdsr.sale_month = month(curdate())
left join alloc_canteen ac on mr.canteen_id = ac.canteen_id left join basic_canteen ac on mr.canteen_id = ac.canteen_id
left join alloc_stall ass on mr.stall_id = ass.stall_id left join basic_stall ass on mr.stall_id = ass.stall_id
left join menu_dishes_base mdb on md.base_dishes_id = mdb.base_dishes_id
-- left join menu_taste_dishes mtd on md.dishes_id = mtd.dishes_id
-- left join menu_dishes_taste mdtt on mtd.taste_id = mdtt.taste_id
where where
mrd.apply_date = #{applyDate} mrd.apply_date = #{applyDate}
and mr.recipe_id = #{recipeId} and mr.recipe_id = #{recipeId}
order by order by
m.sort_num asc md.dishes_id asc
</select> </select>
</mapper> </mapper>