用户信息文件问题
This commit is contained in:
parent
4be10cc0d3
commit
faac0d72b9
@ -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<List<UserCustomDTO>> listpage(ListPage page) {
|
||||
SuccessResultList<List<UserDTO>> successResultList = userService.listPage(page);
|
||||
@ -62,7 +65,11 @@ public class UserCustomService extends DefaultBaseService {
|
||||
List<RolePO> rolePOS = roleUserService.listRolePOByUserId(userDTO.getUserId());
|
||||
List<UserCustomDTO.Role> 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());
|
||||
|
Loading…
Reference in New Issue
Block a user