Explorar el Código

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

release_toaliyun_real
Burce hace 6 años
padre
commit
30d7e5d4a3
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  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 Ver fichero

@@ -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());
}


Cargando…
Cancelar
Guardar