|
@@ -371,7 +371,7 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
|
*/
|
|
|
@ApiOperation(value = "查询学生端菜单")
|
|
|
@GetMapping("getStudentClientMenu")
|
|
|
- public List<PrivilegeDomain> getStudentClientMenu(
|
|
|
+ public List<CustomPrivilegeDomain> getStudentClientMenu(
|
|
|
@RequestParam(required = false) Long rootOrgId) {
|
|
|
|
|
|
if (null == rootOrgId) {
|
|
@@ -409,7 +409,7 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
|
List<PrivilegeEntity> privilegeList = privilegeRepo
|
|
|
.findAllByGroupIdOrderByWeightDesc(privilegeGroup.getId());
|
|
|
|
|
|
- List<PrivilegeDomain> privilegeInfoList = Lists.newArrayList();
|
|
|
+ List<CustomPrivilegeDomain> privilegeInfoList = Lists.newArrayList();
|
|
|
|
|
|
for (PrivilegeEntity cur : privilegeList) {
|
|
|
boolean hasPrivilege = undefined ? true : (pList!=null && pList.contains(cur.getId()));
|
|
@@ -418,7 +418,7 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- PrivilegeDomain privilegeInfo = new PrivilegeDomain();
|
|
|
+ CustomPrivilegeDomain privilegeInfo = new CustomPrivilegeDomain();
|
|
|
privilegeInfo.setHasPrivilege(hasPrivilege);
|
|
|
privilegeInfo.setCode(cur.getCode());
|
|
|
privilegeInfo.setCreationTime(cur.getCreationTime());
|
|
@@ -436,6 +436,17 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
|
privilegeInfo.setExt4(cur.getExt4());
|
|
|
privilegeInfo.setExt5(cur.getExt5());
|
|
|
|
|
|
+ //如果未自定义过菜单,则routeCode和权限编码一致
|
|
|
+ String routeCode;
|
|
|
+ if (undefined) {
|
|
|
+ routeCode=cur.getCode();
|
|
|
+ }
|
|
|
+ //如果自定义过菜单,则特殊处理
|
|
|
+ else{
|
|
|
+ routeCode= cur.getCode().replace("_"+rootOrgId,"");
|
|
|
+ }
|
|
|
+ privilegeInfo.setRouteCode(routeCode);
|
|
|
+
|
|
|
privilegeInfoList.add(privilegeInfo);
|
|
|
|
|
|
}
|