Commit 4fd22658 authored by hongguangwu's avatar hongguangwu

档案相关权限-优化

parent b06c5b70
......@@ -331,7 +331,8 @@ public class UserController {
public String getUserIdByDeptIds(@RequestBody String deptIds) {
StringBuilder userIds = new StringBuilder("'0'");
if (Common.isNotNull(deptIds)) {
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, deptIds));
List<String> list = Common.initStrToList(deptIds, ",");
List<SysUser> sysUsers = userService.list(Wrappers.<SysUser>query().lambda().in(SysUser::getDeptId, list));
if (Common.isNotEmpty(sysUsers)){
for (SysUser u:sysUsers){
userIds.append(",'").append(u.getUserId()).append("'");
......
......@@ -108,9 +108,9 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
// 处理权限部门
if (sysDataAuth.getIsDeptAuth() == 1 || sysDataAuth.getIsDeptAuth() == 2) {
if (sysDataAuth.getIsDeptAuth() == 2) {
sql.append(" or a.CREATE_BY in (start'0' ");
sql.append(" or a.CREATE_BY in (start0");
for (SysDataAuthDeptRel dept : authDeptList) {
sql.append(", '").append(dept.getDeptId()).append("'");
sql.append(",").append(dept.getDeptId());
}
sql.append("end)");
} else {
......@@ -314,9 +314,9 @@ public class SysDataAuthServiceImpl extends ServiceImpl<SysDataAuthMapper, SysDa
if (menuDeptList == null || menuDeptList.isEmpty()) {
return R.failed("请选择部门关联的菜单!");
} else if (sysDataAuth.getIsDeptAuth() == 2) {
sql.append(" or a.CREATE_BY in (start'0' ");
sql.append(" or a.CREATE_BY in (start0");
for (SysDataAuthDeptRel dept : authDeptList) {
sql.append(", '").append(dept.getDeptId()).append("'");
sql.append(",").append(dept.getDeptId());
dept.setSysDataAuthId(mainId);
}
sql.append("end)");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment