Просмотр исходного кода

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

release_toaliyun_real
Stormeye.Wu 7 лет назад
Родитель
Сommit
c9ab2045dc
1 измененных файлов: 7 добавлений и 8 удалений
  1. +7
    -8
      mallinkBApi/src/main/java/com/simple/controller/WxMsgValidationcodeController.java

+ 7
- 8
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);


Загрузка…
Отмена
Сохранить