From e79d8c8f9679839bf983341fe2cf3212e1bb3001 Mon Sep 17 00:00:00 2001 From: wangwh <2397901735@qq.com> Date: Mon, 28 Oct 2024 14:44:33 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/gzdyh_test' into gzdyh_test --- dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java b/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java index 5f5609c..6611471 100644 --- a/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java +++ b/dyh-service/dyh-disp/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java @@ -5,6 +5,7 @@ import cn.huge.base.common.exception.ClientException; import cn.huge.base.common.exception.ServiceException; import cn.huge.module.client.api.CustClient; +import cn.huge.module.cust.dto.CtUnitDTO; import cn.huge.module.cust.dto.CtUserDTO; import cn.huge.module.cust.dto.PaUserDTO; import com.fasterxml.jackson.databind.ObjectMapper; @@ -99,4 +100,26 @@ } } + /** + * 根据id查询组织信息 + * @url {ctx}/api/client/ctUnit/getUnitById + * @param unitId 组织编号 + * @return Object + */ + public CtUnitDTO getUnitById(String unitId){ + try{ + ReturnBO returnBo = custClient.getUnitById(unitId); + if (ReturnConsts.OK == returnBo.getCode()){ + CtUnitDTO ctUnitDTO = objectMapper.convertValue(returnBo.getData(), CtUnitDTO.class); + return ctUnitDTO; + }else{ + log.error("Client外服务接口[CustClientImpl.getUnitById]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); + throw new ClientException("CustClientImpl.getUnitById", returnBo.getMsg()); + } + }catch (Exception e){ + log.error("service方法[CustClientImpl.getUnitById]调用异常:"+e, e); + throw new ServiceException("CustClientImpl.getUnitById", e); + } + } + } -- Gitblit v1.8.0