|
|
|
@@ -9,6 +9,7 @@ import com.iformall.domain.po.WxMerchantBUser; |
|
|
|
import com.iformall.domain.po.WxMsgValidationcode; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.service.WxMallService; |
|
|
|
import com.iformall.service.WxMerchantBUserService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.service.WxMsgValidationcodeService; |
|
|
|
@@ -39,6 +40,9 @@ public class WxMsgValidationcodeController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxMallService wxMallService; |
|
|
|
|
|
|
|
@TenantIgnore |
|
|
|
@GetMapping("sendvalidationcode") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@@ -60,7 +64,8 @@ public class WxMsgValidationcodeController extends BaseController { |
|
|
|
userQ.setPhone(phone); |
|
|
|
userQ.setStatus(EnumMerchantBUserStatus.VALID.getCode()); |
|
|
|
|
|
|
|
List<WxMerchantBUser> orgUserList = wxMerchantBUserService.findList(userQ); |
|
|
|
List<WxMerchantBUser> orgUserList = wxMerchantBUserService.findAllList(userQ); |
|
|
|
// List<WxMerchantBUser> orgUserList = wxMerchantBUserService.findList(userQ); |
|
|
|
if (orgUserList.size() <= 0) { |
|
|
|
logger.error("B端用户不存在, phone: " + phone); |
|
|
|
return new ResultData(ErrorCode.USER_IS_EMPTY); |
|
|
|
@@ -79,7 +84,7 @@ public class WxMsgValidationcodeController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.updateTenantInfo(user); |
|
|
|
wxMsgValidationcode.updateTenantInfo(wxAppinfo); |
|
|
|
wxMsgValidationcode.setPhone(phone); |
|
|
|
wxMsgValidationcode.setType(EnumMsgModel.VALIDATION_CODE.getCode()); |
|
|
|
wxMsgValidationcode.setAppid(appid); |
|
|
|
@@ -95,9 +100,12 @@ public class WxMsgValidationcodeController extends BaseController { |
|
|
|
@ApiImplicitParam(name = "code", value = "验证码", dataType = "String", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "appid", value = "appid", dataType = "String", paramType = "query", required = true)}) |
|
|
|
public ResultData hasvalidationcode(String tenantId, String parentTenantId, String phone, Integer type, String code, String appid) { |
|
|
|
TenantEntity tenantEntity = new TenantEntity(); |
|
|
|
tenantEntity.setTenantId(tenantId); |
|
|
|
tenantEntity.setParentTenantId(parentTenantId); |
|
|
|
|
|
|
|
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.setTenantId(tenantId); |
|
|
|
wxMsgValidationcode.setParentTenantId(parentTenantId); |
|
|
|
wxMsgValidationcode.updateTenantInfo(tenantEntity); |
|
|
|
wxMsgValidationcode.setPhone(phone); |
|
|
|
wxMsgValidationcode.setType(EnumMsgModel.VALIDATION_CODE.getCode()); |
|
|
|
wxMsgValidationcode.setCode(code); |
|
|
|
|