|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
|
|
import com.ningdatech.basic.model.GenericResult; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.ningdatech.pmapi.common.constant.RegionConst; |
|
|
import com.ningdatech.pmapi.common.constant.RegionConst; |
|
|
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; |
|
|
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; |
|
@@ -31,6 +32,8 @@ import com.ningdatech.pmapi.user.model.vo.UserRoleVO; |
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; |
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; |
|
|
import com.ningdatech.pmapi.user.service.IUserInfoService; |
|
|
import com.ningdatech.pmapi.user.service.IUserInfoService; |
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
|
|
|
import com.ningdatech.zwdd.ZwddIntegrationProperties; |
|
|
|
|
|
import com.ningdatech.zwdd.client.ZwddClient; |
|
|
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; |
|
|
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
@@ -57,6 +60,10 @@ public class UserInfoManage { |
|
|
private final UserInfoHelper userInfoHelper; |
|
|
private final UserInfoHelper userInfoHelper; |
|
|
private final RegionCacheHelper regionCacheHelper; |
|
|
private final RegionCacheHelper regionCacheHelper; |
|
|
|
|
|
|
|
|
|
|
|
private final ZwddIntegrationProperties zwddIntegrationProperties; |
|
|
|
|
|
|
|
|
|
|
|
private final ZwddClient zwddClient; |
|
|
|
|
|
|
|
|
public PageVo<ResUserInfoListVO> list(ReqUserInfoListPO req) { |
|
|
public PageVo<ResUserInfoListVO> list(ReqUserInfoListPO req) { |
|
|
PageVo<ResUserInfoListVO> pageVo = new PageVo<>(); |
|
|
PageVo<ResUserInfoListVO> pageVo = new PageVo<>(); |
|
|
|
|
|
|
|
@@ -409,7 +416,7 @@ public class UserInfoManage { |
|
|
resUserDetailVO.setPhoneNo(userInfo.getMobile()); |
|
|
resUserDetailVO.setPhoneNo(userInfo.getMobile()); |
|
|
resUserDetailVO.setStatus(userInfo.getAvailable()); |
|
|
resUserDetailVO.setStatus(userInfo.getAvailable()); |
|
|
resUserDetailVO.setEmployeeCode(userInfo.getEmployeeCode()); |
|
|
resUserDetailVO.setEmployeeCode(userInfo.getEmployeeCode()); |
|
|
resUserDetailVO.setAvatar(userInfo.getAvatar()); |
|
|
|
|
|
|
|
|
resUserDetailVO.setAvatar(makeAvatar(userInfo.getAvatar())); |
|
|
|
|
|
|
|
|
// 装配用户角色信息列表 |
|
|
// 装配用户角色信息列表 |
|
|
List<UserRole> userRoleList = iUserRoleService.list(Wrappers.lambdaQuery(UserRole.class) |
|
|
List<UserRole> userRoleList = iUserRoleService.list(Wrappers.lambdaQuery(UserRole.class) |
|
@@ -440,6 +447,18 @@ public class UserInfoManage { |
|
|
return resUserDetailVO; |
|
|
return resUserDetailVO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//生成头像 链接 |
|
|
|
|
|
private String makeAvatar(String avatar) { |
|
|
|
|
|
try{ |
|
|
|
|
|
GenericResult<String> accessToken = zwddClient.getAccessToken(); |
|
|
|
|
|
String token = accessToken.getData(); |
|
|
|
|
|
String res = "https://" + zwddIntegrationProperties.getDomain() + "/media/download?" + |
|
|
|
|
|
"access_token=" + token + "&media_id=" + avatar; |
|
|
|
|
|
return res; |
|
|
|
|
|
}catch (Exception e){} |
|
|
|
|
|
return org.apache.commons.lang3.StringUtils.EMPTY; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public Map<String, ProcessInstanceUserDto> getUserMapByIds(Set<String> staterUsers) { |
|
|
public Map<String, ProcessInstanceUserDto> getUserMapByIds(Set<String> staterUsers) { |
|
|
List<UserInfo> userInfos = iUserInfoService.listByIds(staterUsers); |
|
|
List<UserInfo> userInfos = iUserInfoService.listByIds(staterUsers); |
|
|
return userInfos.stream().map(u -> { |
|
|
return userInfos.stream().map(u -> { |
|
|