From e5fb063b579a08d758b365303aeea5698512b702 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Tue, 11 May 2021 16:00:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E9=A3=9F=E8=B0=B1=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/custom/WechatAppletController.java | 9 ++++++++- .../com/stdiet/custom/mapper/SysRecipesPlanMapper.java | 4 ++++ .../stdiet/custom/service/ISysRecipesPlanService.java | 3 +++ .../custom/service/impl/SysRecipesPlanServiceImpl.java | 5 +++++ .../resources/mapper/custom/SysRecipesPlanMapper.xml | 4 ++++ .../src/views/custom/recipesShow/MenuDetail/index.vue | 2 +- 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java index 96bf037ec..f3df8b123 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/WechatAppletController.java @@ -39,6 +39,8 @@ public class WechatAppletController extends BaseController { public static final String[] imageName = {"breakfastImages", "lunchImages", "dinnerImages", "extraMealImages", "bodyImages"}; @Autowired + ISysRecipesService iSysRecipesService; + @Autowired private ISysCustomerCaseService sysCustomerCaseService; @Autowired private ISysWxUserLogService sysWxUserLogService; @@ -449,7 +451,7 @@ public class WechatAppletController extends BaseController { public AjaxResult getRecipesPlans(@RequestParam String customerId) { Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L; - List plans = sysRecipesPlanService.selectPlanListByCusId(cusId); + List plans = sysRecipesPlanService.selectRecipesPlanListInfoByCusId(cusId); SysOrderPause orderPause = new SysOrderPause(); orderPause.setCusId(cusId); @@ -476,6 +478,11 @@ public class WechatAppletController extends BaseController { return AjaxResult.success(result); } + + @GetMapping("/getRecipesDetail") + public AjaxResult getRecipesDetail(@RequestParam Long menuId) { + return AjaxResult.success(iSysRecipesService.selectDishesByMenuId(menuId)); + } } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysRecipesPlanMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysRecipesPlanMapper.java index 43cafab6f..2b58ea0b1 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysRecipesPlanMapper.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysRecipesPlanMapper.java @@ -103,10 +103,14 @@ public interface SysRecipesPlanMapper List selectRecipesPlanListInfo(String outId); + List selectRecipesPlanListInfoByCusId(Long cusId); + + List selectPlanListByCusId(Long cusId); List selectRecipesModelList(SysRecipesPlan sysRecipesPlan); + /** * 批量更新食谱计划的开始时间、结束时间 * @param list diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysRecipesPlanService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysRecipesPlanService.java index 65aa040b6..8a86d0858 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysRecipesPlanService.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysRecipesPlanService.java @@ -112,6 +112,9 @@ public interface ISysRecipesPlanService */ List selectRecipesPlanListInfo(String outId); + List selectRecipesPlanListInfoByCusId(Long cusId); + + /** * 通过客户id查询食谱计划 * @param cusId diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java index 23cf963b9..0c342f571 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java @@ -421,6 +421,11 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService { return sysRecipesPlanMapper.selectRecipesPlanListInfo(outId); } + @Override + public List selectRecipesPlanListInfoByCusId(Long cusId) { + return sysRecipesPlanMapper.selectRecipesPlanListInfoByCusId(cusId); + } + @Override public List selectPlanListByCusId(Long cusId) { return sysRecipesPlanMapper.selectPlanListByCusId(cusId); diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml index 6fe4eca81..aa0c9a6f0 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml @@ -246,6 +246,10 @@ select id, start_date, end_date, start_num_day, end_num_day, recipes_id from sys_recipes_plan where out_id=#{outId} and del_flag = 0 and review_status = 2 and send_flag = 1 + + diff --git a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue index aca5686bd..ca7088903 100644 --- a/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue +++ b/stdiet-ui/src/views/custom/recipesShow/MenuDetail/index.vue @@ -136,7 +136,7 @@ export default { typeName: this.menuTypeDict[type], values: mData[type], })); - console.log(mMenus); + // console.log(mMenus); return mMenus; }, ...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]),