| | |
| | | private ObjectMapper objectMapper = new ObjectMapper(); |
| | | |
| | | /** |
| | | * 内部用户-获取登录用户 |
| | | * @param userId 用户编号 |
| | | * @return CtUserDTO |
| | | * 微服务调用-数据迁移-批量新增 |
| | | * @param targetCtUnitList 批量数据 |
| | | * @return |
| | | */ |
| | | public CtUserDTO clientGetUser(List<TargetCtUnit> targetCtUnitList){ |
| | | public CtUserDTO saveCtUnitList(List<TargetCtUnit> targetCtUnitList){ |
| | | try{ |
| | | ReturnBO returnBo = custClient.saveCtUnitList(targetCtUnitList); |
| | | 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.saveCtUnitList]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.saveCtUnitList", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.clientGetUser]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.clientGetUser", e); |
| | | log.error("service方法[CustClientImpl.saveCtUnitList]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.saveCtUnitList", e); |
| | | } |
| | | } |
| | | } |