ソースを参照

[优化]用户积分接口授权校验

release_toaliyun_real
Burce 6年前
コミット
30d7e5d4a3
1個のファイルの変更4行の追加1行の削除
  1. +4
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java

+ 4
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java ファイルの表示

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


読み込み中…
キャンセル
保存