From e0a6e1d028d04908a7751da7b166853c5baddf85 Mon Sep 17 00:00:00 2001 From: xusd <hugeinfo123> Date: Tue, 17 Sep 2024 19:44:12 +0800 Subject: [PATCH] 测试环境端口调整 --- dyh-service/dyh-sync/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java | 41 +++++++++++++++++++++++++++++++---------- 1 files changed, 31 insertions(+), 10 deletions(-) diff --git a/dyh-service/dyh-sync/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java b/dyh-service/dyh-sync/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java index a96db5d..2e962c0 100644 --- a/dyh-service/dyh-sync/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java +++ b/dyh-service/dyh-sync/src/main/java/cn/huge/module/client/api/impl/CustClientImpl.java @@ -8,7 +8,7 @@ import cn.huge.module.client.api.CustClient; import cn.huge.module.cust.dto.CtUserDTO; import cn.huge.module.cust.dto.PaUserDTO; -import cn.huge.module.mediate.dto.WechatBindCaseDTO; +import cn.huge.module.sync.domain.target.TargetCtAccount; import cn.huge.module.sync.domain.target.TargetCtUnit; import com.alibaba.fastjson.JSON; import com.fasterxml.jackson.databind.ObjectMapper; @@ -46,23 +46,44 @@ private ObjectMapper objectMapper = new ObjectMapper(); /** - * 内部用户-获取登录用户 - * @param userId 用户编号 - * @return CtUserDTO + * 微服务调用-数据迁移-批量新增 + * @param targetTableList 批量数据 + * @return */ - public CtUserDTO clientGetUser(List<TargetCtUnit> targetCtUnitList){ + public CtUserDTO saveTableList(List<TargetCtUnit> targetTableList){ try{ - ReturnBO returnBo = custClient.saveCtUnitList(targetCtUnitList); + ReturnBO returnBo = custClient.saveTableList(targetTableList); if (ReturnConsts.OK == returnBo.getCode()){ CtUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUserDTO.class); return loginUser; }else{ - log.error("Client外服务接口[CustClientImpl.clientGetUser]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); - throw new ClientException("CustClientImpl.clientGetUser", returnBo.getMsg()); + log.error("Client外服务接口[CustClientImpl.saveTableList]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); + throw new ClientException("CustClientImpl.saveTableList", returnBo.getMsg()); } }catch (Exception e){ - log.error("service方法[CustClientImpl.clientGetUser]调用异常:"+e, e); - throw new ServiceException("CustClientImpl.clientGetUser", e); + log.error("service方法[CustClientImpl.saveTableList]调用异常:"+e, e); + throw new ServiceException("CustClientImpl.saveTableList", e); + } + } + + /** + * 微服务调用-数据迁移-批量新增 + * @param targetTableList 批量数据 + * @return + */ + public CtUserDTO saveTableList1(List<TargetCtAccount> targetTableList){ + try{ + ReturnBO returnBo = custClient.saveTableList1(targetTableList); + if (ReturnConsts.OK == returnBo.getCode()){ + CtUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUserDTO.class); + return loginUser; + }else{ + log.error("Client外服务接口[CustClientImpl.saveTableList1]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); + throw new ClientException("CustClientImpl.saveTableList1", returnBo.getMsg()); + } + }catch (Exception e){ + log.error("service方法[CustClientImpl.saveTableList1]调用异常:"+e, e); + throw new ServiceException("CustClientImpl.saveTableList1", e); } } } -- Gitblit v1.8.0