Browse Source

[调整]用户授权校验,统一提示为授权手机号

release_toaliyun_real
Burce 6 years ago
parent
commit
017f76851b
3 changed files with 4 additions and 2 deletions
  1. +2
    -0
      mallinkBApi/src/main/java/com/iformall/controller/WxCreditHistoryController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java

+ 2
- 0
mallinkBApi/src/main/java/com/iformall/controller/WxCreditHistoryController.java View File

@@ -73,6 +73,8 @@ public class WxCreditHistoryController extends BaseController {
WxCUserBasicInfo wxCUserBasicInfo = new WxCUserBasicInfo(); WxCUserBasicInfo wxCUserBasicInfo = new WxCUserBasicInfo();
if (wxCUserBasicInfoList != null && wxCUserBasicInfoList.size() > 0) { if (wxCUserBasicInfoList != null && wxCUserBasicInfoList.size() > 0) {
wxCUserBasicInfo = wxCUserBasicInfoList.get(0); wxCUserBasicInfo = wxCUserBasicInfoList.get(0);
} else {
return new ResultData(ErrorCode.USER_NOT_AUTH_PHONE);
} }
return new ResultData(wxCUserBasicInfo); return new ResultData(wxCUserBasicInfo);
} }


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java View File

@@ -605,7 +605,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {
public void handSel(WxCouponSend wxCouponSend, Object cUserId) { public void handSel(WxCouponSend wxCouponSend, Object cUserId) {
WxCUser cu = wxCUserMapper.selectByPrimaryKey(cUserId); WxCUser cu = wxCUserMapper.selectByPrimaryKey(cUserId);
if (Objects.isNull(cu)) { if (Objects.isNull(cu)) {
throw new MallinkException(ErrorCode.USER_IS_EMPTY);
throw new MallinkException(ErrorCode.USER_NOT_AUTH_PHONE);
} }


if(StringUtils.isEmpty(cu.getPhone())) { if(StringUtils.isEmpty(cu.getPhone())) {


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java View File

@@ -209,7 +209,7 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService {
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(record.getCUserId()); WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(record.getCUserId());
if (wxCUser == null && wxCUserBasicInfo == null) { if (wxCUser == null && wxCUserBasicInfo == null) {
//验证此用户是否存在 //验证此用户是否存在
throw new MallinkException(ErrorCode.USER_IS_EMPTY);
throw new MallinkException(ErrorCode.USER_NOT_AUTH_PHONE);
} }
if (StringUtils.isNotEmpty(record.getSpendStr())) { if (StringUtils.isNotEmpty(record.getSpendStr())) {
record.setSpend(new BigDecimal(record.getSpendStr()).multiply(new BigDecimal(100)).intValue()); record.setSpend(new BigDecimal(record.getSpendStr()).multiply(new BigDecimal(100)).intValue());


Loading…
Cancel
Save