From 9446a53b3ad03be2deec4b31ee8c5a6f01918bab Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 19 Nov 2021 13:09:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20ResultDataResolve?= =?UTF-8?q?r.java=EF=BC=8C=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0showMessage?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../listener/bean/log/LogOperationHelper.java | 2 +- .../service/impl/LogOperationServiceImpl.java | 6 ++-- .../epmet/controller/IcLoinController.java | 4 +-- .../service/impl/IcLoginServiceImpl.java | 2 +- .../tools/feign/ResultDataResolver.java | 7 +++-- .../java/com/epmet/config/CorsConfig.java | 2 +- .../impl/QuestionnaireServiceImpl.java | 2 +- .../impl/BizPointTotalDetailServiceImpl.java | 8 +++--- .../impl/PingyinPrivateEpmetApiService.java | 4 +-- .../service/impl/ResiEventServiceImpl.java | 10 +++---- .../impl/IcResiUserImportServiceImpl.java | 28 +++++++++---------- .../service/impl/IcResiUserServiceImpl.java | 2 +- 12 files changed, 39 insertions(+), 38 deletions(-) diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java index b8c82f6640..ce6502583e 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/bean/log/LogOperationHelper.java @@ -57,7 +57,7 @@ public class LogOperationHelper implements ResultDataResolver { form.setUserId(userId); Result result = userOpenFeignClient.getCustomerStaffInfoByUserId(form); CustomerStaffDTO staffInfo = getResultDataOrThrowsException(result, ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), - "调用epmet-user服务获取staff信息发生异常"); + "调用epmet-user服务获取staff信息发生异常", null); return new OperatorInfo(staffInfo.getCustomerId(), staffInfo.getMobile(), staffInfo.getRealName()); } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java index 09b9269063..4ccc4e868f 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java @@ -82,7 +82,7 @@ public class LogOperationServiceImpl implements LogOperationService, ResultDataR CustomerStaffFormDTO form = new CustomerStaffFormDTO(); form.setUserIds(new ArrayList<>(userIds)); Result> result = userOpenFeignClient.list(form); - List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常"); + List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常", null); HashMap staffMap = new HashMap<>(); staffs.forEach(s -> { @@ -103,7 +103,7 @@ public class LogOperationServiceImpl implements LogOperationService, ResultDataR form.setCustomerId(customerId); form.setMobile(operatorMobile); Result> result = userOpenFeignClient.list(form); - List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常"); + List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务发生异常", null); if (staffs.size() == 0) { return null; @@ -134,7 +134,7 @@ public class LogOperationServiceImpl implements LogOperationService, ResultDataR CustomerStaffFormDTO form = new CustomerStaffFormDTO(); form.setRealName(operatorName); Result> result = userOpenFeignClient.list(form); - List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务查询工作人员信息发生异常"); + List staffs = getResultDataOrThrowsException(result, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用user服务查询工作人员信息发生异常", null); List userIds = new ArrayList<>(); HashMap staffMap = new HashMap(); diff --git a/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java b/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java index cd3c5543e6..659945bddb 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java @@ -76,7 +76,7 @@ public class IcLoinController implements ResultDataResolver { // 获取用户信息 Result> staffResult = epmetUserFeignClient.checkCustomerStaff(mobile); - List staffList = getResultDataOrThrowsException(staffResult, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】获取用户信息失败"); + List staffList = getResultDataOrThrowsException(staffResult, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】获取用户信息失败", null); if (CollectionUtils.isEmpty(staffList)) { throw new RenException(EpmetErrorCode.ERR10003.getCode()); } @@ -93,7 +93,7 @@ public class IcLoinController implements ResultDataResolver { RootOrgListByStaffIdFormDTO orgListForm = new RootOrgListByStaffIdFormDTO(); orgListForm.setStaffId(staffId); Result> orgListResult = govOrgOpenFeignClient.getStaffOrgListByStaffId(orgListForm); - List orgs = getResultDataOrThrowsException(orgListResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】根据staffId查询所属客户跟组织列表失败"); + List orgs = getResultDataOrThrowsException(orgListResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】根据staffId查询所属客户跟组织列表失败", null); // 生成登录票据 String ticket = UUID.randomUUID().toString().replace("-", ""); diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java index d14db75885..1e1767070e 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java @@ -65,7 +65,7 @@ public class IcLoginServiceImpl implements IcLoginService, ResultDataResolver { String token = this.generateIcToken(staffId, app, client); Result agencyResult = govOrgOpenFeignClient.getAgencyById(orgId); - CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(agencyResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【IC平台登录】获取组织信息失败"); + CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(agencyResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【IC平台登录】获取组织信息失败", null); // 2.缓存token cacheToken(app, client, staffId, token, orgId, agencyInfo.getCustomerId()); diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java index 5b56e64b1a..1bfa31e96b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/ResultDataResolver.java @@ -34,18 +34,19 @@ public interface ResultDataResolver { * @return * @param targetServiceName 目标service名称 * @param errorCode 错误码,可以为空,为空则使用上游服务抛出的错误码 - * @param errorInternalMsg 错误信息,可以为空,为空则使用上游服务抛出的异常信息 + * @param errorInternalMsg 内部错误信息,可以为空,为空则使用上游服务抛出的异常信息 + * @param showMsg 展示给前端程序的错误信息,可以为空。为空则根据errorCode给定错误msg信息 * @author wxz * @date 2021.06.07 22:45 */ - default R getResultDataOrThrowsException(Result result, String targetServiceName, Integer errorCode, String errorInternalMsg) { + default R getResultDataOrThrowsException(Result result, String targetServiceName, Integer errorCode, String errorInternalMsg, String showMsg) { if (result == null) { throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), "调用{}服务发生错误,返回Result为null", targetServiceName); } if (!result.success()) { Integer finalErrorCode = errorCode == null ? result.getCode() : errorCode; String finalErrorInternalMsg = StringUtils.isBlank(errorInternalMsg) ? result.getInternalMsg() : errorInternalMsg; - throw new RenException(finalErrorCode, finalErrorInternalMsg); + throw new RenException(finalErrorCode, finalErrorInternalMsg, showMsg, RenException.MessageMode.CODE_INTERNAL_EXTERNAL); } return result.getData(); } diff --git a/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java b/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java index bb95213c1f..72a2e0a31f 100644 --- a/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java +++ b/epmet-gateway/src/main/java/com/epmet/config/CorsConfig.java @@ -117,7 +117,7 @@ class EpmetWebFilter implements WebFilter, ResultDataResolver { adminOpenFeignClient.list(), ServiceConstant.EPMET_ADMIN_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), - "调用Admin服务查询Cors配置失败"); + "调用Admin服务查询Cors配置失败", null); } catch (Exception e) { logger.error("调用Admin服务查询Cors配置失败"); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java index 1c6aab452d..2d69ac0fb3 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java @@ -73,7 +73,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService, ResultDat CustomerGridFormDTO form = new CustomerGridFormDTO(); form.setGridId(gridId); Result gridInfoResult = govOrgOpenFeignClient.getGridBaseInfoByGridId(form); - CustomerGridDTO gridInfo = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【调查问卷】校验访问权限,查询网格信息失败"); + CustomerGridDTO gridInfo = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【调查问卷】校验访问权限,查询网格信息失败", null); // 网格父级ID列表:网格ID(拼接起来,冒号分割) String gridIdPath = gridInfo.getPids().concat(":").concat(gridInfo.getId()); List publishRangeEntity = prPublishRangeService.getPublishRangeEntity(projectKey); diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java index 87b7b20a32..2fd521d1d9 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java @@ -380,7 +380,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl> result = resiGroupOpenFeignClient.listGroupDetailsExcludeGroupIds(form); - List groups = getResultDataOrThrowsException(result, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询积分为0的小组列表失败"); + List groups = getResultDataOrThrowsException(result, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询积分为0的小组列表失败", null); if (CollectionUtils.isEmpty(groups)) { return new ArrayList<>(); } @@ -412,7 +412,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl> listResult = resiGroupOpenFeignClient.listGroupDetailsByGroupIds(groupIds); - List groupInfos = getResultDataOrThrowsException(listResult, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排行】批量查询小组信息出错"); + List groupInfos = getResultDataOrThrowsException(listResult, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排行】批量查询小组信息出错", null); // 将小组基本信息转化为map HashMap groupMap = new HashMap<>(); @@ -454,7 +454,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.getGridBaseInfoByGridId(form); - return getResultDataOrThrowsException(result, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询网格信息失败"); + return getResultDataOrThrowsException(result, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询网格信息失败", null); } @Override @@ -464,7 +464,7 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl groupList = getResultDataOrThrowsException(resiGroupOpenFeignClient.listGroupsByMember(form), - ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【我所在的小组排名】查询组列表失败"); + ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【我所在的小组排名】查询组列表失败", null); if (CollectionUtils.isEmpty(groupList)) { return new ArrayList(); diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java index da62386442..9878fe2a3c 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/apiservice/impl/PingyinPrivateEpmetApiService.java @@ -55,7 +55,7 @@ public class PingyinPrivateEpmetApiService extends ApiService implements String urlParams = super.convertQueryParams2String(constructCommonUrlParamsMap(platformKey, authType, uuid, currentTimeMillis, sign)); String requestUrl = baseUrl.concat(apiUrl).concat(urlParams); Result stringResult = HttpClientManager.getInstance().sendPostByHttps(requestUrl, "{}"); - String remoteResultString = getResultDataOrThrowsException(stringResult, "【调用平阴私有化平台获取AccessToken】", EpmetErrorCode.SERVER_ERROR.getCode(), null); + String remoteResultString = getResultDataOrThrowsException(stringResult, "【调用平阴私有化平台获取AccessToken】", EpmetErrorCode.SERVER_ERROR.getCode(), null, null); Result remoteResult = parsePlatformResponseResult(remoteResultString, GetAccessTokenResultDTO.class); log.info("【调用平阴私有化平台获取AccessToken】结果:{}", remoteResultString); accessTokenFromCache = remoteResult.getData().getAccessToken(); @@ -159,7 +159,7 @@ public class PingyinPrivateEpmetApiService extends ApiService implements String jsonString = JSON.toJSONString(form); Result result = super.sendPostRequest(platformId, ThirdPlatformActions.PUSH_COMPONENT_ACCESS_TOKEN, jsonString, null, urlParams); - getResultDataOrThrowsException(result, "【平阴私有化平台】推送ComponentAccessToken", EpmetErrorCode.SERVER_ERROR.getCode(), null); + getResultDataOrThrowsException(result, "【平阴私有化平台】推送ComponentAccessToken", EpmetErrorCode.SERVER_ERROR.getCode(), null, null); } @Override diff --git a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java index 36a2a43684..fa19f94f14 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java +++ b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java @@ -50,7 +50,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve //查询人大代表列表 ListUserByBadgeFormDTO npcForm = new ListUserByBadgeFormDTO(customerId, BadgeConstant.BADGE_KEY_NPC); Result> npcResult = epmetUserOpenFeignClient.listUsersByBadge(npcForm); - List npcData = getResultDataOrThrowsException(npcResult, ServiceConstant.EPMET_USER_SERVER, null, null); + List npcData = getResultDataOrThrowsException(npcResult, ServiceConstant.EPMET_USER_SERVER, null, null, null); if(CollectionUtils.isEmpty(npcData)) { // 没有人大代表,直接返回空列表即可 @@ -61,7 +61,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve List npcGridIds = npcData.stream().map(d -> d.getGridId()).collect(Collectors.toList()); OrgInfoFormDTO form = new OrgInfoFormDTO(OrgInfoConstant.GRID, npcGridIds); Result> npcGridInfoResult = govOrgOpenFeignClient.selectOrgInfo(form); - List npcGridInfos = getResultDataOrThrowsException(npcGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + List npcGridInfos = getResultDataOrThrowsException(npcGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); Map npcGridInfoMap = convertNpcGridInfos2Map(npcGridInfos); @@ -109,7 +109,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve TreeSet targetLevels = new TreeSet<>(); Result gridInfoResult = govOrgOpenFeignClient.queryGridInfo(gridId); - GridInfoResultDTO gridInfoData = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + GridInfoResultDTO gridInfoData = getResultDataOrThrowsException(gridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); String pidsPath = gridInfoData.getPids(); List parentOrgIds = Arrays.asList(pidsPath.split(":")); // 翻转列表 @@ -118,7 +118,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve // 一.网格信息(只有一条,但是为了适应接口,组装成了列表) List currentGridId = Arrays.asList(gridId); Result> currentGridInfoResult = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, currentGridId)); - List currentGridInfos = getResultDataOrThrowsException(currentGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + List currentGridInfos = getResultDataOrThrowsException(currentGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); OrgInfoResultDTO currentGridInfo = currentGridInfos.get(0); // 因为上游接口的值对应问题,这里只好做一个适配,拼接起来,希望上游代码不要再改了... @@ -128,7 +128,7 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve // 二.父级组织信息 Result> parentOrgInfoResult = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.AGENCY, parentOrgIds)); - List parentOrgInfos = getResultDataOrThrowsException(parentOrgInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); + List parentOrgInfos = getResultDataOrThrowsException(parentOrgInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null, null); parentOrgInfos.forEach(porg -> { String levelName = OrgLevelEnums.getLevelName(porg.getLevel()); if (StringUtils.isBlank(levelName)) { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java index 909f16b8ad..e0e1bac217 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java @@ -166,11 +166,11 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res userForm.setClient(loginUserClient); userForm.setUserId(loginUserId); - LoginUserDetailsResultDTO loginUserDetails = getResultDataOrThrowsException(epmetUserOpenFeignClient.getLoginUserDetails(userForm), ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + LoginUserDetailsResultDTO loginUserDetails = getResultDataOrThrowsException(epmetUserOpenFeignClient.getLoginUserDetails(userForm), ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); String currUserAgencyId = loginUserDetails.getAgencyId(); //String excelPathName = "/opt/test/基础信息表/resi_info.xls"; - CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(currUserAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(currUserAgencyId), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); String customerId = agencyInfo.getCustomerId(); try { @@ -788,55 +788,55 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res switch (pureUri) { case "/epmetuser/icresidemanddict/demandoption": options = getResultDataOrThrowsException(epmetUserOpenFeignClient.getDemandOptions(), ServiceConstant.EPMET_USER_SERVER, - EpmetErrorCode.SERVER_ERROR.getCode(), null); + EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/customergrid/gridoption": GridOptionFormDTO form = new GridOptionFormDTO(); form.setAgencyId(currUserAgencyId); form.setPurpose(purpose); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getGridOption(form), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/customerpartybranch/branchoption": CustomerPartyBranchDTO bform = new CustomerPartyBranchDTO(); bform.setGridId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBranchOption(bform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBranchOption(bform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icbuilding/buildingoption": IcBuildingDTO buildingform = new IcBuildingDTO(); buildingform.setNeighborHoodId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingOptions(buildingform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getBuildingOptions(buildingform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icbuildingunit/unitoption": IcBuildingUnitDTO buForm = new IcBuildingUnitDTO(); buForm.setBuildingId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getUnitOptions(buForm), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getUnitOptions(buForm), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/ichouse/houseoption": HouseFormDTO hform = new HouseFormDTO(); hform.setUnitId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getHouseOption(hform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getHouseOption(hform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/gov/org/icneighborhood/neighborhoodoption": IcNeighborHoodDTO nform = new IcNeighborHoodDTO(); nform.setAgencyId(currUserAgencyId); nform.setGridId(cascadeItemColumnWrapper.getColValue()); - options = getResultDataOrThrowsException(govOrgOpenFeignClient.getNeighborHoodOptions(nform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(govOrgOpenFeignClient.getNeighborHoodOptions(nform), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/education": - options = getResultDataOrThrowsException(adminOpenFeignClient.getEducationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getEducationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/house": - options = getResultDataOrThrowsException(adminOpenFeignClient.getHouseOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getHouseOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/nation": - options = getResultDataOrThrowsException(adminOpenFeignClient.getNationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getNationOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/ninesmallplaces": - options = getResultDataOrThrowsException(adminOpenFeignClient.getNineSmallPlacesOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getNineSmallPlacesOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; case "/sys/dict/data/relationship": - options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null); + options = getResultDataOrThrowsException(adminOpenFeignClient.getRelationshipOption(), ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null); break; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 3c021235fd..ddb7c9307d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -832,6 +832,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> result = operCustomizeOpenFeignClient.listItems(form); - return getResultDataOrThrowsException(result, ServiceConstant.OPER_CUSTOMIZE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "查询表单相关信息失败"); + return getResultDataOrThrowsException(result, ServiceConstant.OPER_CUSTOMIZE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "查询表单相关信息失败", null); } }