修复customerId为空时错误
This commit is contained in:
parent
84e9236208
commit
562180c7d4
@ -488,8 +488,17 @@ public class WechatAppletController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getRecipesPlans")
|
@GetMapping("/getRecipesPlans")
|
||||||
public AjaxResult getRecipesPlans(@RequestParam String customerId) {
|
public AjaxResult getRecipesPlans(@RequestParam String customerId, @RequestParam String openid) {
|
||||||
Long cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L;
|
Long cusId = 0L;
|
||||||
|
if (StringUtils.isNull(customerId)) {
|
||||||
|
SysWxUserInfo wxUserInfo = sysWxUserInfoService.selectSysWxUserInfoById(openid);
|
||||||
|
cusId = StringUtils.isNotNull(wxUserInfo) ? wxUserInfo.getCusId() : 0L;
|
||||||
|
} else {
|
||||||
|
cusId = StringUtils.isNotEmpty(customerId) ? Long.parseLong(AesUtils.decrypt(customerId)) : 0L;
|
||||||
|
}
|
||||||
|
if (cusId == 0L) {
|
||||||
|
return AjaxResult.error(5000, "需要手机号进一步匹配");
|
||||||
|
}
|
||||||
|
|
||||||
List<SysRecipesPlanListInfo> plans = sysRecipesPlanService.selectRecipesPlanListInfoByCusId(cusId);
|
List<SysRecipesPlanListInfo> plans = sysRecipesPlanService.selectRecipesPlanListInfoByCusId(cusId);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user