commit
ad068ed3ea
@ -1,7 +1,6 @@
|
|||||||
package com.stdiet.web.controller.custom;
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
import com.aliyun.vod20170321.models.GetPlayInfoResponseBody;
|
||||||
import com.aliyun.vod20170321.models.GetVideoInfoResponseBody;
|
|
||||||
import com.stdiet.common.core.controller.BaseController;
|
import com.stdiet.common.core.controller.BaseController;
|
||||||
import com.stdiet.common.core.domain.AjaxResult;
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
import com.stdiet.common.core.domain.entity.SysDictData;
|
import com.stdiet.common.core.domain.entity.SysDictData;
|
||||||
@ -39,6 +38,8 @@ public class WechatAppletController extends BaseController {
|
|||||||
|
|
||||||
public static final String[] imageName = {"breakfastImages", "lunchImages", "dinnerImages", "extraMealImages", "bodyImages"};
|
public static final String[] imageName = {"breakfastImages", "lunchImages", "dinnerImages", "extraMealImages", "bodyImages"};
|
||||||
@Autowired
|
@Autowired
|
||||||
|
ISysRecipesService iSysRecipesService;
|
||||||
|
@Autowired
|
||||||
private ISysCustomerCaseService sysCustomerCaseService;
|
private ISysCustomerCaseService sysCustomerCaseService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysWxUserLogService sysWxUserLogService;
|
private ISysWxUserLogService sysWxUserLogService;
|
||||||
@ -479,7 +480,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
public AjaxResult getRecipesPlans(@RequestParam String customerId) {
|
public AjaxResult getRecipesPlans(@RequestParam String customerId) {
|
||||||
Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L;
|
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();
|
SysOrderPause orderPause = new SysOrderPause();
|
||||||
orderPause.setCusId(cusId);
|
orderPause.setCusId(cusId);
|
||||||
@ -498,14 +499,28 @@ public class WechatAppletController extends BaseController {
|
|||||||
List<SysDictData> unitDict = iSysDictTypeService.selectDictDataByType("cus_cus_unit");
|
List<SysDictData> unitDict = iSysDictTypeService.selectDictDataByType("cus_cus_unit");
|
||||||
List<SysDictData> weightDict = iSysDictTypeService.selectDictDataByType("cus_cus_weight");
|
List<SysDictData> weightDict = iSysDictTypeService.selectDictDataByType("cus_cus_weight");
|
||||||
List<SysDictData> menuTypeDict = iSysDictTypeService.selectDictDataByType("cus_dishes_type");
|
List<SysDictData> menuTypeDict = iSysDictTypeService.selectDictDataByType("cus_dishes_type");
|
||||||
|
List<SysDictData> igdUnitDict = iSysDictTypeService.selectDictDataByType("sys_ingredient_unit");
|
||||||
|
List<SysDictData> idgTypeDict = iSysDictTypeService.selectDictDataByType("cus_ing_type");
|
||||||
|
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
result.put("unitDict", unitDict);
|
result.put("unitDict", unitDict);
|
||||||
result.put("weightDict", weightDict);
|
result.put("weightDict", weightDict);
|
||||||
result.put("menuTypeDict", menuTypeDict);
|
result.put("menuTypeDict", menuTypeDict);
|
||||||
|
result.put("igdUnitDict", igdUnitDict);
|
||||||
|
result.put("idgTypeDict", idgTypeDict);
|
||||||
|
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getRecipesDetail")
|
||||||
|
public AjaxResult getRecipesDetail(@RequestParam Long menuId) {
|
||||||
|
return AjaxResult.success(iSysRecipesService.selectDishesByMenuId(menuId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getPlanDetail")
|
||||||
|
public AjaxResult getPlanDetail(@RequestParam Long planId) {
|
||||||
|
return AjaxResult.success(iSysRecipesService.selectSysRecipesByRecipesId(planId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,10 +103,14 @@ public interface SysRecipesPlanMapper
|
|||||||
|
|
||||||
List<SysRecipesPlanListInfo> selectRecipesPlanListInfo(String outId);
|
List<SysRecipesPlanListInfo> selectRecipesPlanListInfo(String outId);
|
||||||
|
|
||||||
|
List<SysRecipesPlanListInfo> selectRecipesPlanListInfoByCusId(Long cusId);
|
||||||
|
|
||||||
|
|
||||||
List<SysRecipesPlan> selectPlanListByCusId(Long cusId);
|
List<SysRecipesPlan> selectPlanListByCusId(Long cusId);
|
||||||
|
|
||||||
List<SysRecipesPlan> selectRecipesModelList(SysRecipesPlan sysRecipesPlan);
|
List<SysRecipesPlan> selectRecipesModelList(SysRecipesPlan sysRecipesPlan);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量更新食谱计划的开始时间、结束时间
|
* 批量更新食谱计划的开始时间、结束时间
|
||||||
* @param list
|
* @param list
|
||||||
|
@ -112,6 +112,9 @@ public interface ISysRecipesPlanService
|
|||||||
*/
|
*/
|
||||||
List<SysRecipesPlanListInfo> selectRecipesPlanListInfo(String outId);
|
List<SysRecipesPlanListInfo> selectRecipesPlanListInfo(String outId);
|
||||||
|
|
||||||
|
List<SysRecipesPlanListInfo> selectRecipesPlanListInfoByCusId(Long cusId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过客户id查询食谱计划
|
* 通过客户id查询食谱计划
|
||||||
* @param cusId
|
* @param cusId
|
||||||
|
@ -416,6 +416,11 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
|||||||
return sysRecipesPlanMapper.selectRecipesPlanListInfo(outId);
|
return sysRecipesPlanMapper.selectRecipesPlanListInfo(outId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysRecipesPlanListInfo> selectRecipesPlanListInfoByCusId(Long cusId) {
|
||||||
|
return sysRecipesPlanMapper.selectRecipesPlanListInfoByCusId(cusId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysRecipesPlan> selectPlanListByCusId(Long cusId) {
|
public List<SysRecipesPlan> selectPlanListByCusId(Long cusId) {
|
||||||
return sysRecipesPlanMapper.selectPlanListByCusId(cusId);
|
return sysRecipesPlanMapper.selectPlanListByCusId(cusId);
|
||||||
|
@ -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 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>
|
||||||
|
|
||||||
|
<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">
|
<resultMap type="SysRecipesDaily" id="SysRecipesResult">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="numDay" column="num_day"/>
|
<result property="numDay" column="num_day"/>
|
||||||
|
@ -136,7 +136,7 @@ export default {
|
|||||||
typeName: this.menuTypeDict[type],
|
typeName: this.menuTypeDict[type],
|
||||||
values: mData[type],
|
values: mData[type],
|
||||||
}));
|
}));
|
||||||
console.log(mMenus);
|
// console.log(mMenus);
|
||||||
return mMenus;
|
return mMenus;
|
||||||
},
|
},
|
||||||
...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]),
|
...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user