From faac0d72b97b6371c63a22d3a15a5e2d5a4ee7ca Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Thu, 25 Jul 2024 19:18:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operator/service/user/custom/UserCustomService.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java b/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java index fde5923..6cd6e95 100644 --- a/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java +++ b/src/main/java/cn/com/tenlion/operator/service/user/custom/UserCustomService.java @@ -4,6 +4,7 @@ import cn.com.tenlion.operator.controller.api.user.custom.UserCustomController; import cn.com.tenlion.operator.pojo.dtos.user.custom.UserCustomDTO; import cn.com.tenlion.operator.pojo.dtos.user.info.UserInfoDTO; import cn.com.tenlion.operator.pojo.pos.account.AccountPO; +import cn.com.tenlion.operator.properties.SystemApiPathProperties; import cn.com.tenlion.operator.service.account.IAccountService; import cn.com.tenlion.operator.service.user.info.UserInfoService; import com.sun.org.apache.bcel.internal.generic.RETURN; @@ -43,6 +44,8 @@ public class UserCustomService extends DefaultBaseService { private IRoleUserService roleUserService; @Autowired private UserInfoService userInfoService; + @Autowired + private SystemApiPathProperties systemApiPathProperties; public SuccessResultList> listpage(ListPage page) { SuccessResultList> successResultList = userService.listPage(page); @@ -62,7 +65,11 @@ public class UserCustomService extends DefaultBaseService { List rolePOS = roleUserService.listRolePOByUserId(userDTO.getUserId()); List roles = rolePOS.stream().map(rolePO -> new UserCustomDTO.Role(rolePO.getRoleId(), rolePO.getRoleName())).collect(Collectors.toList()); userCustomDTO.setRoles(roles); - userInfoDTOS.stream().filter(dto -> StringUtils.equals(userDTO.getUserId(), dto.getUserId())).findFirst().ifPresent(userCustomDTO::setUserInfo); + userInfoDTOS.stream().filter(dto -> StringUtils.equals(userDTO.getUserId(), dto.getUserId())).findFirst().ifPresent(userInfo -> { + userInfo.setIdCardFront(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), userInfo.getIdCardFront())); + userInfo.setIdCardBack(String.format("%sroute/file/download/true/%s", systemApiPathProperties.getCopyrightExternal(), userInfo.getIdCardBack())); + userCustomDTO.setUserInfo(userInfo); + }); return userCustomDTO; }).collect(Collectors.toList()); return new SuccessResultList<>(userCustomDTOS, successResultList.getPage(), successResultList.getTotal());