diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/AppletCurrentDishesDetailVO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/AppletCurrentDishesDetailVO.java index 2d78d71..f9925c6 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/AppletCurrentDishesDetailVO.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/cook/vo/AppletCurrentDishesDetailVO.java @@ -13,9 +13,9 @@ public class AppletCurrentDishesDetailVO { @ApiModelProperty("菜品名称") private String dishesName; @ApiModelProperty("库存数量") - private Integer surplusNum; + private Integer remanentNum; @ApiModelProperty("限购数量") - private Integer restrictNum; + private Integer limitNum; @ApiModelProperty("菜品价格") private Integer dishesPrice; @ApiModelProperty("优惠价") @@ -49,14 +49,6 @@ public class AppletCurrentDishesDetailVO { return this.dishesName; } - public Integer getSurplusNum() { - return this.surplusNum; - } - - public Integer getRestrictNum() { - return this.restrictNum; - } - public Integer getDishesPrice() { return this.dishesPrice; } @@ -77,12 +69,20 @@ public class AppletCurrentDishesDetailVO { this.dishesName = dishesName; } - public void setSurplusNum(final Integer surplusNum) { - this.surplusNum = surplusNum; + public Integer getRemanentNum() { + return remanentNum; } - public void setRestrictNum(final Integer restrictNum) { - this.restrictNum = restrictNum; + public void setRemanentNum(Integer remanentNum) { + this.remanentNum = remanentNum; + } + + public Integer getLimitNum() { + return limitNum; + } + + public void setLimitNum(Integer limitNum) { + this.limitNum = limitNum; } public void setDishesPrice(final Integer dishesPrice) { diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml index 077fbc9..dbd4cc0 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/cook/CookRecipeH5Mapper.xml @@ -7,17 +7,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - + + + - - - + + + @@ -40,8 +40,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + @@ -65,17 +65,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ass.stall_name, ass.img_url as stall_img_url, mr.recipe_id, - ac.start_business_time as start_business_time_ac, - ac.end_business_time as end_business_time_ac, - ac.business_state as business_state_ac, - ass.start_business_time, - ass.end_business_time, - ass.business_state + ac.biz_start_time as biz_start_time_ac, + ac.biz_end_time as biz_end_time_ac, + ac.biz_state as biz_state_ac, + ass.biz_start_time, + ass.biz_end_time, + ass.biz_state from - alloc_canteen ac - left join alloc_stall ass on ac.canteen_id = ass.canteen_id - left join menu_recipe mr on mr.stall_id = ass.stall_id - left join menu_app_recipe mar on mar.recipe_id = mr.recipe_id + basic_canteen ac + left join basic_stall ass on ac.canteen_id = ass.canteen_id + left join cook_recipe mr on mr.stall_id = ass.stall_id + left join cook_recipe_bind_app mar on mar.recipe_id = mr.recipe_id where bind_type = 2 and ac.del_flag = 0 @@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" stall_id, sum(monthly_sales) as monthly_sales from - menu_dishes_sale_record + cook_dishes_sale_record where sale_month = month(curdate()) and stall_id in @@ -104,15 +104,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mrd.mealtime_type, md.meal_type as type_id, '菜品' as type_name, - mdb.base_dishes_id, md.dishes_id, - mdb.dishes_name, + md.dishes_name, md.dishes_name as real_dishes_name, md.meal_type as detail_type, md.image_url as dishes_img_url, - mrd.detail_id, - m.surplus_num, - m.restrict_num, + mrd.recipe_detail_id, + m.remanent_num, + m.limit_num, m.price as dishes_price, m.sale_price as pref_price, ac.canteen_id, @@ -125,26 +124,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mdsr.monthly_sales, mdsr.good_probability 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 - inner join menu_app_recipe mar on mr.recipe_id = mar.recipe_id + cook_recipe_detail mrd + inner join cook_recipe_dishes m on mrd.recipe_detail_id = m.recipe_detail_id + inner join cook_dishes md on m.dishes_id = md.dishes_id + inner join cook_dishes_type mdt on md.type_id = mdt.dishes_type_id + inner join cook_recipe mr on mrd.recipe_id = mr.recipe_id + inner join cook_recipe_bind_app mar on mr.recipe_id = mar.recipe_id 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 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 - -- 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 + left join basic_canteen ac on mr.canteen_id = ac.canteen_id + left join basic_stall ass on mr.stall_id = ass.stall_id where mrd.apply_date = #{applyDate} and mr.recipe_id = #{recipeId} order by - m.sort_num asc + md.dishes_id asc