From 1ac0d92fc65b6e1524b172af4adffbf8974e467b Mon Sep 17 00:00:00 2001
From: liyj <15602261488@163.com>
Date: Mon, 28 Oct 2024 08:00:17 +0800
Subject: [PATCH] 1、新功能优化
---
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