微信食谱开发

This commit is contained in:
huangdeliang 2021-05-11 16:00:04 +08:00
parent d736726b24
commit e5fb063b57
6 changed files with 25 additions and 2 deletions

View File

@ -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<SysRecipesPlan> plans = sysRecipesPlanService.selectPlanListByCusId(cusId);
List<SysRecipesPlanListInfo> 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));
}
}

View File

@ -103,10 +103,14 @@ public interface SysRecipesPlanMapper
List<SysRecipesPlanListInfo> selectRecipesPlanListInfo(String outId);
List<SysRecipesPlanListInfo> selectRecipesPlanListInfoByCusId(Long cusId);
List<SysRecipesPlan> selectPlanListByCusId(Long cusId);
List<SysRecipesPlan> selectRecipesModelList(SysRecipesPlan sysRecipesPlan);
/**
* 批量更新食谱计划的开始时间结束时间
* @param list

View File

@ -112,6 +112,9 @@ public interface ISysRecipesPlanService
*/
List<SysRecipesPlanListInfo> selectRecipesPlanListInfo(String outId);
List<SysRecipesPlanListInfo> selectRecipesPlanListInfoByCusId(Long cusId);
/**
* 通过客户id查询食谱计划
* @param cusId

View File

@ -421,6 +421,11 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
return sysRecipesPlanMapper.selectRecipesPlanListInfo(outId);
}
@Override
public List<SysRecipesPlanListInfo> selectRecipesPlanListInfoByCusId(Long cusId) {
return sysRecipesPlanMapper.selectRecipesPlanListInfoByCusId(cusId);
}
@Override
public List<SysRecipesPlan> selectPlanListByCusId(Long cusId) {
return sysRecipesPlanMapper.selectPlanListByCusId(cusId);

View File

@ -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
</select>
<select id="selectRecipesPlanListInfoByCusId" resultMap="SysRecipesPlanListInfoResult">
select id, start_date, end_date, start_num_day, end_num_day, recipes_id from sys_recipes_plan where cus_id=#{cusId} and del_flag = 0 and review_status = 2 and send_flag = 1
</select>
<resultMap type="SysRecipesDaily" id="SysRecipesResult">
<result property="id" column="id"/>
<result property="numDay" column="num_day"/>

View File

@ -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"]),