mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-11-02 13:31:49 +08:00
Pre Merge pull request !891 from nicblusyc/6.X
This commit is contained in:
commit
a24697d607
@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用户 业务层处理
|
||||
@ -598,13 +599,15 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
*/
|
||||
@Override
|
||||
public String selectNicknameByIds(String userIds) {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (Long id : StringUtils.splitTo(userIds, Convert::toLong)) {
|
||||
String nickname = SpringUtils.getAopProxy(this).selectNicknameById(id);
|
||||
if (StringUtils.isNotBlank(nickname)) {
|
||||
list.add(nickname);
|
||||
}
|
||||
List<Long> ids = StringUtils.splitTo(userIds, Convert::toLong);
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
Map<Long, String> nickMap = selectUserNicksByIds(ids);
|
||||
List<String> list = ids.stream()
|
||||
.map(nickMap::get)
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toList());
|
||||
return StringUtils.joinComma(list);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user