refactor: 代码优化
This commit is contained in:
@@ -59,8 +59,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
|
|
||||||
private final RedisTemplate redisTemplate;
|
private final RedisTemplate redisTemplate;
|
||||||
|
|
||||||
private final SysRoleMenuService roleMenuService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户分页列表
|
* 获取用户分页列表
|
||||||
*
|
*
|
||||||
@@ -172,10 +170,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
public boolean deleteUsers(String idsStr) {
|
public boolean deleteUsers(String idsStr) {
|
||||||
Assert.isTrue(StrUtil.isNotBlank(idsStr), "删除的用户数据为空");
|
Assert.isTrue(StrUtil.isNotBlank(idsStr), "删除的用户数据为空");
|
||||||
// 逻辑删除
|
// 逻辑删除
|
||||||
List<Long> ids = Arrays.asList(idsStr.split(",")).stream()
|
List<Long> ids = Arrays.stream(idsStr.split(","))
|
||||||
.map(idStr -> Long.parseLong(idStr)).collect(Collectors.toList());
|
.map(Long::parseLong)
|
||||||
boolean result = this.removeByIds(ids);
|
.collect(Collectors.toList());
|
||||||
return result;
|
return this.removeByIds(ids);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user