管理员标识返回
This commit is contained in:
parent
cc1041c731
commit
e43c77d0ee
@ -1,11 +1,16 @@
|
|||||||
package com.xdap.self_development.pojo.view;
|
package com.xdap.self_development.pojo.view;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
public class MenuParamView {
|
public class MenuParamView {
|
||||||
private String id;
|
private String id;
|
||||||
// private String menuPath;
|
// private String menuPath;
|
||||||
@ -14,4 +19,5 @@ public class MenuParamView {
|
|||||||
// private String parameterName;
|
// private String parameterName;
|
||||||
// private String parameterId;
|
// private String parameterId;
|
||||||
private String parameterPer;
|
private String parameterPer;
|
||||||
|
private Integer isAdmin;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,6 +174,14 @@ public class ModelRoleServiceImpl implements ModelRoleService {
|
|||||||
if (ObjectUtils.isEmpty(roleID)) {
|
if (ObjectUtils.isEmpty(roleID)) {
|
||||||
throw new RuntimeException("角色为空");
|
throw new RuntimeException("角色为空");
|
||||||
}
|
}
|
||||||
|
ModelRolesPojo modelRolesPojos = businessDatabase.getBusinessDatabase()
|
||||||
|
.eq("is_enabled", 1)
|
||||||
|
.eq("id", roleID)
|
||||||
|
.doQueryFirst(ModelRolesPojo.class);
|
||||||
|
if (ObjectUtils.isNotEmpty(modelRolesPojos) && (modelRolesPojos.getRoleCode().contains("ADMIN")
|
||||||
|
|| modelRolesPojos.getRoleCode().contains("Admin") || modelRolesPojos.getRoleCode().contains("admin"))) {
|
||||||
|
return Arrays.asList(new MenuParamView(roleID, "", "", "",1));
|
||||||
|
}
|
||||||
ArrayList<MenuParamView> menuParamViews = new ArrayList<>();
|
ArrayList<MenuParamView> menuParamViews = new ArrayList<>();
|
||||||
List<ModelRolePermissionPojo> role = businessDatabase.getBusinessDatabase()
|
List<ModelRolePermissionPojo> role = businessDatabase.getBusinessDatabase()
|
||||||
.eq("role_id", roleID)
|
.eq("role_id", roleID)
|
||||||
@ -292,7 +300,7 @@ public class ModelRoleServiceImpl implements ModelRoleService {
|
|||||||
if (ObjectUtils.isEmpty(xdapDepartments)) {
|
if (ObjectUtils.isEmpty(xdapDepartments)) {
|
||||||
stringsDept.add("未知部门:" + depId);
|
stringsDept.add("未知部门:" + depId);
|
||||||
} else {
|
} else {
|
||||||
stringsDept.add(xdapDepartments.getName()+"-ID:"+depId);
|
stringsDept.add(xdapDepartments.getName() + "-ID:" + depId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("部门", stringsDept);
|
map.put("部门", stringsDept);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user