|
|
|
@@ -4,13 +4,12 @@ package com.iformall.controller; |
|
|
|
import com.iformall.annotation.AuthIgnore; |
|
|
|
import com.iformall.annotation.RedisCache; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxMall; |
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.po.WxMerchantBUser; |
|
|
|
import com.iformall.domain.po.WxScoreRules; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.vo.WxMerchantBuInfoVo; |
|
|
|
import com.iformall.enums.EnumCreditLockedStatus; |
|
|
|
import com.iformall.enums.EnumEnableType; |
|
|
|
import com.iformall.enums.EnumMerchantBUserStatus; |
|
|
|
import com.iformall.enums.EnumMerchantStatus; |
|
|
|
import com.iformall.service.*; |
|
|
|
@@ -58,6 +57,9 @@ public class WxMerchantBUserController extends BaseController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxScoreRulesService wxScoreRulesService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxAppinfoService wxAppinfoService; |
|
|
|
|
|
|
|
|
|
|
|
@RedisCache |
|
|
|
@@ -146,8 +148,26 @@ public class WxMerchantBUserController extends BaseController { |
|
|
|
if (StringUtils.isNotBlank(latitude) && StringUtils.isNotBlank(longitude)) { |
|
|
|
logger.info("B端用户: " + phone + " 登录 IP" + ipaddress + ", 经纬度(" + longitude + "," + latitude + ")"); |
|
|
|
} |
|
|
|
WxAppinfo wxAppinfo = wxAppinfoService.getByAppId(appId); |
|
|
|
if(wxAppinfo == null){ |
|
|
|
return new ResultData(ErrorCode.APP_ID_NOT_FOUND); |
|
|
|
} |
|
|
|
if(!wxAppinfo.getEnable().equals(EnumEnableType.Enable.getCode())){ |
|
|
|
return new ResultData(ErrorCode.APP_ID_NOT_ENABLE); |
|
|
|
} |
|
|
|
WxMall mall = wxMallService.getByTenantId(wxAppinfo.getTenantId()); |
|
|
|
if (mall == null) { |
|
|
|
logger.error("未配置相应的mall"); |
|
|
|
return new ResultData(Result.ERROR, "未配置相应的mall"); |
|
|
|
} |
|
|
|
if (!mall.isValid()) { |
|
|
|
logger.error("mall未启用"); |
|
|
|
return new ResultData(Result.ERROR, "mall未启用"); |
|
|
|
} |
|
|
|
|
|
|
|
WxMerchantBUser userQ = new WxMerchantBUser(); |
|
|
|
userQ.setAppId(appId); |
|
|
|
userQ.updateTenantInfo(mall); |
|
|
|
// userQ.setAppId(appId); |
|
|
|
userQ.setPhone(phone); |
|
|
|
userQ.setStatus(EnumMerchantBUserStatus.VALID.getCode()); |
|
|
|
List<WxMerchantBUser> orgList = wxMerchantBUserService.getBUserByAppId(userQ); |
|
|
|
|