|
@@ -100,7 +100,7 @@ public class UserRepo implements IUserRepo {
|
|
|
@Override
|
|
|
public User getByIDJustInfo(Long userId) throws UserNotExistException, RoleNotFoundException {
|
|
|
Optional<UserPO> userPOOptional = userDao.findById(userId);
|
|
|
- if (!userPOOptional.isPresent()) {
|
|
|
+ if (!userPOOptional.isPresent()){
|
|
|
throw new UserNotExistException("用户不存在");
|
|
|
} else {
|
|
|
return Converter.convert(User.class, userPOOptional.get());
|
|
@@ -414,16 +414,20 @@ public class UserRepo implements IUserRepo {
|
|
|
userResult.setEnterpriseAuthentication(Converter.convert(EnterpriseAuthentication.class, enterpriseAuthenticationPO));
|
|
|
}
|
|
|
//获取用户能力
|
|
|
+ String abilityName="";
|
|
|
List<String> abailities = new ArrayList<>();
|
|
|
if(userPO.getPersonalCompetence()!=null){
|
|
|
abailities= Arrays.asList(userPO.getPersonalCompetence().split(","));
|
|
|
}
|
|
|
-// {
|
|
|
-// for (int i = 0; i < abailities.size(); i++) {
|
|
|
-// String abilityName = testTypeDao.findByCode(abailities.get(i)).get().getName();
|
|
|
-// abailities.add(abilityName);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ {
|
|
|
+ for (int i = 0; i < abailities.size(); i++) {
|
|
|
+ if(testTypeDao.findByCode(abailities.get(i)).get().getName()!=null) {
|
|
|
+ abilityName = testTypeDao.findByCode(abailities.get(i)).get().getName();
|
|
|
+ abailities.add(abilityName);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
userResult.setPersonAbilities(abailities);
|
|
|
/*获取区域管理员信息*/
|
|
|
List<RegionalManagerToRegionalPO> regionalManagerToRegionalPOList = regionalManagerToRegionalDao.findByUserIdAndIsDeleted(userPO.getId(), DeletedStatus.isNotDeleted);
|