1、统一抛出ServiceException带占位符的填充方式,不再使用ServiceExceptionUtils;2、新增System服务ErrorCode的国际化;3、Webcad异步导入移除分布式锁,导入解析事务完善;

This commit is contained in:
gaoqr
2025-11-20 11:12:21 +08:00
parent f051e6466b
commit ab4ec08078
139 changed files with 1005 additions and 1193 deletions
@@ -8,7 +8,6 @@ import cn.hutool.http.HttpStatus;
import com.alibaba.fastjson.JSON;
import com.cf.imes.framework.common.exception.ErrorCode;
import com.cf.imes.framework.common.exception.ServiceException;
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
import com.cf.imes.framework.ip.core.enums.ErrorCodeConstants;
import com.cf.imes.framework.ip.core.property.IPQueryProperties;
import com.cf.imes.framework.ip.core.service.IPQueryService;
@@ -46,11 +45,11 @@ public class IPQueryServiceImpl implements IPQueryService {
String appCode = ipQueryProperties.getAppCode();
if (CharSequenceUtil.isEmpty(apiUrl)) {
log.error("[IPQueryService][querySource]request apiUrl为空");
throw ServiceExceptionUtil.exception(queryError);
throw new ServiceException(queryError);
}
if (CharSequenceUtil.isEmpty(appCode)) {
log.error("[IPQueryService][querySource]request appCode为空");
throw ServiceExceptionUtil.exception(queryError);
throw new ServiceException(queryError);
}
log.info("[IPQueryService][querySource]request url{}", apiUrl);
log.info("[IPQueryService][querySource]request param, appCode: {}, ip: {}", appCode, ip);
@@ -63,7 +62,7 @@ public class IPQueryServiceImpl implements IPQueryService {
data.setIp(ip);
return data;
} else {
ServiceException serviceException = ServiceExceptionUtil.exception(queryError);
ServiceException serviceException = new ServiceException(queryError);
log.error(serviceException.getMessage() + ",状态【{}】,异常:{}", ipQueryRespDTO.getRet(), respBody);
return null;
}