|
@@ -481,19 +481,39 @@ public class AdminUserLogic {
|
|
|
.eq(AdminUserPermissionsRela::getAdminUserId, adminUser.getAdminUserId())
|
|
|
.list();
|
|
|
|
|
|
- final List<String> deptList = permissionsRelas.stream()
|
|
|
+ final List<String> deptIds = permissionsRelas.stream()
|
|
|
.filter(AdminUserPermissionsRela::getIsDept)
|
|
|
.map(AdminUserPermissionsRela::getAdminUserPermissionsId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- final List<String> websitList = permissionsRelas.stream()
|
|
|
+ final List<String> websitIds = permissionsRelas.stream()
|
|
|
.filter(v -> !v.getIsDept())
|
|
|
.map(AdminUserPermissionsRela::getAdminUserPermissionsId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- adminUserBean.setPermissions(permissionsRelas);
|
|
|
- adminUserBean.setAdminDeptIds(deptList);
|
|
|
- adminUserBean.setAdminWebsitIds(websitList);
|
|
|
+ List<AdminUserPermissions> permissions = new ArrayList<>();
|
|
|
+ List<AdminUserPermissions> deptList = new ArrayList<>();
|
|
|
+ if (CollectionUtil.isNotEmpty(deptIds)) {
|
|
|
+ for (String deptId : deptIds) {
|
|
|
+ AdminUserPermissions bean = new AdminUserPermissions();
|
|
|
+ bean.setAdminUserPermissionsId(deptId);
|
|
|
+ deptList.add(bean);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CollectionUtil.isNotEmpty(websitIds)) {
|
|
|
+ for (String websitId : websitIds) {
|
|
|
+ AdminUserPermissions bean = new AdminUserPermissions();
|
|
|
+ bean.setAdminUserPermissionsId(websitId);
|
|
|
+ permissions.add(bean);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ adminUserBean.setPermissionList(permissionsRelas);
|
|
|
+ adminUserBean.setAdminDeptIds(deptIds);
|
|
|
+ adminUserBean.setAdminWebsitIds(websitIds);
|
|
|
+ adminUserBean.setDeptList(deptList);
|
|
|
+ adminUserBean.setPermissions(permissions);
|
|
|
|
|
|
return adminUserBean;
|
|
|
}
|