Browse Source

错误码

master
jianjun 4 years ago
parent
commit
35cdcf90b0
  1. 6
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java
  2. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

6
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java

@ -90,13 +90,13 @@ public class ResiCategoryStatsConfigController {
if(IcResiCategoryStatsConfigConstant.WARN_YES.equals(formDTO.getWarn())){
//判断level1 和level2 的值
if(null ==level1 || level1==0){
return new Result().error(EpmetErrorCode.OPERATION_FAILED.getCode(),"黄色预警阈值需大于0");
return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"黄色预警阈值需大于0");
}
if(null == level2 || level2==0){
return new Result().error(EpmetErrorCode.OPERATION_FAILED.getCode(),"红色预警阈值需大于0");
return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"红色预警阈值需大于0");
}
if(level2<=level1){
return new Result().error(EpmetErrorCode.OPERATION_FAILED.getCode(),"黄色预警阈值需大于红色预警阈值");
return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"黄色预警阈值需大于红色预警阈值");
}
}
resiCategoryStatsConfigService.update(customerId,formDTO);

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -32,6 +32,7 @@ import com.epmet.commons.tools.enums.GenderEnum;
import com.epmet.commons.tools.enums.HouseTypeEnum;
import com.epmet.commons.tools.enums.RelationshipEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
@ -173,7 +174,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
dto.setIdCard(map.get("ID_CARD"));
IcResiUserDTO userDTO = baseDao.getResiUser(dto);
if (null != userDTO && null != userDTO.getIdCard()) {
throw new RenException(EpmetErrorCode.OPERATION_FAILED.getCode(), EpmetErrorCode.OPERATION_FAILED.getMsg(), "新增居民信息失败,身份证号已存在!", RenException.MessageMode.CODE_INTERNAL_EXTERNAL);
String errorMsg = "新增居民信息失败,身份证号已存在!";
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg);
}
}
//2021.11.25 end
@ -231,7 +233,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
dto.setIdCard(map.get("ID_CARD"));
IcResiUserDTO userDTO = baseDao.getResiUser(dto);
if (null != userDTO && null != userDTO.getIdCard()) {
throw new RenException(EpmetErrorCode.OPERATION_FAILED.getCode(), EpmetErrorCode.OPERATION_FAILED.getMsg(), "修改居民信息失败,身份证号已存在!", RenException.MessageMode.CODE_INTERNAL_EXTERNAL);
String errorMsg = "修改居民信息失败,身份证号已存在!";
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), errorMsg, errorMsg);
}
}
//2021.11.25 end

Loading…
Cancel
Save