From f33bb23ebe6ea8e805c84fa3020a9cc307a29a00 Mon Sep 17 00:00:00 2001 From: xusd <hugeinfo123> Date: Tue, 22 Oct 2024 15:14:27 +0800 Subject: [PATCH] feature:本地环境能提交到亿迅环境兼容 --- dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java index ef6dff2..9451d26 100644 --- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java +++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java @@ -6,6 +6,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.alibaba.fastjson.JSON; @@ -105,4 +106,25 @@ throw new ServiceException("CustClientImpl.paClientGetUserAll", e); } } + + /** + * 当事人-获取登录用户 + * @param userId 用户编号 + * @return + */ + public CtUnitDTO getUnitByUserId(String userId){ + try{ + ReturnBO returnBo = custClient.getUnitByUserId(userId); + if (ReturnConsts.OK == returnBo.getCode()){ + CtUnitDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUnitDTO.class); + return loginUser; + }else{ + log.error("Client外服务接口[CustClientImpl.getUnitByUserId]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); + throw new ClientException("CustClientImpl.getUnitByUserId", returnBo.getMsg()); + } + }catch (Exception e){ + log.error("service方法[CustClientImpl.getUnitByUserId]调用异常:"+e, e); + throw new ServiceException("CustClientImpl.getUnitByUserId", e); + } + } } -- Gitblit v1.8.0