commit for pull
This commit is contained in:
parent
18c1c6cc15
commit
cabed052a1
@ -55,29 +55,11 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysRoleDTO> list(Map<String, Object> params) {
|
public List<SysRoleDTO> list(Map<String, Object> params) {
|
||||||
List<SysRoleEntity> entityList = baseDao.selectList(getWrapper2(params));
|
List<SysRoleEntity> entityList = baseDao.selectList(getWrapper(params));
|
||||||
|
|
||||||
return ConvertUtils.sourceToTarget(entityList, SysRoleDTO.class);
|
return ConvertUtils.sourceToTarget(entityList, SysRoleDTO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private QueryWrapper<SysRoleEntity> getWrapper2(Map<String, Object> params){
|
|
||||||
String name = (String)params.get("name");
|
|
||||||
|
|
||||||
QueryWrapper<SysRoleEntity> wrapper = new QueryWrapper<>();
|
|
||||||
wrapper.like(StringUtils.isNotBlank(name), "name", name);
|
|
||||||
|
|
||||||
// //普通管理员,只能查询所属部门及子部门的数据
|
|
||||||
// UsernamePasswordAuthenticationToken authentication = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();
|
|
||||||
// LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
|
||||||
// SysUserEntity user = loginUser.getSysUserEntity();
|
|
||||||
// if(!Objects.isNull(user.getSuperAdmin()) && (user.getSuperAdmin() == SuperAdminEnum.NO.value() || )) {
|
|
||||||
// List<Long> deptIdList = sysDeptService.getSubDeptIdList(user.getDeptId());
|
|
||||||
// wrapper.in(deptIdList != null, "dept_id", deptIdList);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return wrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
private QueryWrapper<SysRoleEntity> getWrapper(Map<String, Object> params){
|
private QueryWrapper<SysRoleEntity> getWrapper(Map<String, Object> params){
|
||||||
String name = (String)params.get("name");
|
String name = (String)params.get("name");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user