From c9ab2045dc366a49cdaf1f167bcd758dd2c6e541 Mon Sep 17 00:00:00 2001 From: "Stormeye.Wu" Date: Mon, 27 Aug 2018 15:59:40 +0800 Subject: [PATCH] =?UTF-8?q?[B=E7=AB=AF=E9=AA=8C=E8=AF=81=E7=A0=81=E5=8F=91?= =?UTF-8?q?=E6=94=BE][=E4=BF=AE=E6=94=B9]:=E4=BF=AE=E6=94=B9=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81crash=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxMsgValidationcodeController.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mallinkBApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java b/mallinkBApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java index 91372708c..5cc042ca9 100644 --- a/mallinkBApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java +++ b/mallinkBApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java @@ -36,18 +36,17 @@ public class WxMsgValidationcodeController extends BaseController { @GetMapping("sendvalidationcode") @ApiImplicitParams({ - @ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "appid", value = "appid", dataType = "String", paramType = "query", required = true)}) - public ResultData sendvalidationcode(String tenantId, String phone, Integer type, String appid) { + public ResultData sendvalidationcode(String phone, Integer type, String appid) { - WxMerchantBUser user = new WxMerchantBUser(); - user.setAppId(appid); - user.setPhone(phone); + WxMerchantBUser userQ = new WxMerchantBUser(); + userQ.setAppId(appid); + userQ.setPhone(phone); - WxMerchantBUser buser=wxMerchantBUserService.getBUserByAppId(user); - if (buser==null) { + WxMerchantBUser user=wxMerchantBUserService.getBUserByAppId(userQ); + if (user==null) { logger.error("B端用户不存在, phone: " + phone); return new ResultData(ErrorCode.USER_IS_EMPTY); } @@ -65,7 +64,7 @@ public class WxMsgValidationcodeController extends BaseController { } WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); - wxMsgValidationcode.setTenantId(tenantId); + wxMsgValidationcode.setTenantId(user.getTenantId()); wxMsgValidationcode.setPhone(phone); wxMsgValidationcode.setType(type); wxMsgValidationcode.setAppid(appid);