Browse Source

[B端验证码发放][修改]:修改验证码crash问题

release_toaliyun_real
Stormeye.Wu 7 years ago
parent
commit
c9ab2045dc
1 changed files with 7 additions and 8 deletions
  1. +7
    -8
      mallinkBApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java

+ 7
- 8
mallinkBApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java View File

@@ -36,18 +36,17 @@ public class WxMsgValidationcodeController extends BaseController {


@GetMapping("sendvalidationcode") @GetMapping("sendvalidationcode")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "tenantId", value = "租户ID", dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true),
@ApiImplicitParam(name = "type", value = "场景", dataType = "Integer", 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)}) @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); logger.error("B端用户不存在, phone: " + phone);
return new ResultData(ErrorCode.USER_IS_EMPTY); return new ResultData(ErrorCode.USER_IS_EMPTY);
} }
@@ -65,7 +64,7 @@ public class WxMsgValidationcodeController extends BaseController {
} }


WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode();
wxMsgValidationcode.setTenantId(tenantId);
wxMsgValidationcode.setTenantId(user.getTenantId());
wxMsgValidationcode.setPhone(phone); wxMsgValidationcode.setPhone(phone);
wxMsgValidationcode.setType(type); wxMsgValidationcode.setType(type);
wxMsgValidationcode.setAppid(appid); wxMsgValidationcode.setAppid(appid);


Loading…
Cancel
Save