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

[调整]注券接口用户授权校验

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
08cb90dd8b
3 измененных файлов: 8 добавлений и 4 удалений
  1. +2
    -2
      mallinkBApi/src/main/java/com/iformall/controller/WxCouponSendController.java
  2. +5
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java

+ 2
- 2
mallinkBApi/src/main/java/com/iformall/controller/WxCouponSendController.java Просмотреть файл

@@ -100,10 +100,10 @@ public class WxCouponSendController extends BaseController {
try {
wxCouponSendService.handSel(wxCouponSend, cUserId);
} catch (MallinkException e) {
logger.error("注异常: " + e.getMessage());
logger.error("注异常: " + e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
} catch (Exception e) {
logger.error("注异常: " + e.getMessage());
logger.error("注异常: " + e.getMessage());
return new ResultData(ErrorCode.COUPON_HANDSEL_VERIFY, e.getMessage());
}
return new ResultData();


+ 5
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java Просмотреть файл

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

if(StringUtils.isEmpty(cu.getPhone())) {
throw new MallinkException(ErrorCode.USER_NOT_AUTH_PHONE);
}
// 1002 ,11012,2020 ,2000,2022,2021,3005,3999,1050,3000

WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(cu.getId());
if (Objects.isNull(wxCUserBasicInfo)) {


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java Просмотреть файл

@@ -194,6 +194,7 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService {
return wxCreditHistoryMapper.selectByPrimaryKey(id);
}

@Override
public void check(Long cUserId) {
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(cUserId);
if (wxCUserBasicInfo == null) {


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