认证清单-修改历史完善。67009
This commit is contained in:
+8
@@ -311,4 +311,12 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @return
|
||||
*/
|
||||
String getUserThirdIdByUserId(List<SysUser> sysUserList, String userId);
|
||||
|
||||
/**
|
||||
* 根据用户id,获取用户名
|
||||
* @param sysUserList
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
String getUsernameByUserId(List<SysUser> sysUserList, String userId);
|
||||
}
|
||||
|
||||
+15
@@ -782,4 +782,19 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsernameByUserId(List<SysUser> sysUserList, String userId) {
|
||||
String result = "";
|
||||
if(CollectionUtils.isNotEmpty(sysUserList)){
|
||||
result = sysUserList.stream().filter(user -> {
|
||||
boolean flag = false;
|
||||
if (org.apache.commons.lang3.StringUtils.equals(userId, user.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user