Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-10-31 10:06:27 +08:00
commit 7884d2dcc4
3 changed files with 8 additions and 2 deletions

View File

@ -225,6 +225,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
wrapper.in(true, "del_flag", 0, 5);
}
}
if (params.containsKey("infoList")) {
// TODO
}
wrapper.orderByAsc("del_flag").orderByDesc("create_date");
return wrapper;
}

View File

@ -168,7 +168,7 @@ public class SysUserController {
@ApiImplicitParam(name = "username", value = "用户名", paramType = "query", dataType = "String")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<SysUserDTO> list = sysUserService.list(params);
params.put("export", true);
ExcelUtils.exportExcelToTarget(response, null, "用户管理", list, SysUserExcel.class);
}

View File

@ -97,7 +97,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
@Override
public List<SysUserDTO> list(Map<String, Object> params) {
//普通管理员只能查询所属部门及子部门的数据
// 普通管理员只能查询所属部门及子部门的数据
UserDetail user = SecurityUser.getUser();
if (user.getSuperAdmin() == SuperAdminEnum.NO.value()) {
params.put("deptIdList", sysDeptService.getSubDeptIdList(user.getDeptId()));
@ -106,6 +106,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
if (roleDTO != null) {
params.put("role_id", roleDTO.getId());
}
if (params.containsKey("export")) { // 导出特殊处理
params.remove("role_id");
}
List<SysUserEntity> entityList = baseDao.getList(params);
return ConvertUtils.sourceToTarget(entityList, SysUserDTO.class);