| @@ -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); | ||||