diff --git a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AppConfController.java b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AppConfController.java index 12d51270..6172c0a9 100644 --- a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AppConfController.java +++ b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AppConfController.java @@ -19,10 +19,12 @@ import java.util.Map; import static net.ximatai.muyun.platform.PlatformConst.BASE_PATH; +import static net.ximatai.muyun.platform.controller.AppConfController.MODULE_ALIAS; @Tag(name = "全局程序配置(面向前端平台级业务)") -@Path(BASE_PATH + "/conf") +@Path(BASE_PATH + "/" + MODULE_ALIAS) public class AppConfController extends Scaffold implements ICreateAbility, ISelectAbility, IUpdateAbility, ITableCreateAbility, IModuleRegisterAbility { + public final static String MODULE_ALIAS = "conf"; private final static String CONF_ID = "1"; @@ -81,10 +83,10 @@ public ModuleController getModuleController() { @Override public ModuleConfig getModuleConfig() { return ModuleConfig.ofName("用户管理") - .setAlias("conf") + .setAlias(MODULE_ALIAS) .setTable(getMainTable()) .setUrl("platform/conf/index") .addAction(new ModuleAction("set", "写入配置", ModuleAction.TypeLike.UPDATE)); -// .addAction(new ModuleAction("get", "获取配置", ModuleAction.TypeLike.UPDATE)); 不参与权限 +// .addAction(new ModuleAction("get", "获取配置", ModuleAction.TypeLike.UPDATE)); 不参与权限,所以注释掉 } } diff --git a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java index bc36ea44..dab24e99 100644 --- a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java +++ b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java @@ -28,11 +28,13 @@ import java.util.Objects; import static net.ximatai.muyun.platform.PlatformConst.BASE_PATH; +import static net.ximatai.muyun.platform.controller.AuthorizationController.MODULE_ALIAS; @Startup @Tag(name = "权限管理") -@Path(BASE_PATH + "/authorization") +@Path(BASE_PATH + "/" + MODULE_ALIAS) public class AuthorizationController extends Scaffold implements IDatabaseAbilityStd, IModuleRegisterAbility { + public final static String MODULE_ALIAS = "authorization"; private final LoadingCache> actionCache = Caffeine.newBuilder() .build(this::loadAction); @@ -181,7 +183,7 @@ public ModuleController getModuleController() { @Override public ModuleConfig getModuleConfig() { return ModuleConfig.ofName("权限管理") - .setAlias("authorization") + .setAlias(MODULE_ALIAS) .setUrl("platform/authorization/index") .addAction(new ModuleAction("view", "浏览", ModuleAction.TypeLike.VIEW)) .addAction(new ModuleAction("grant", "授权", ModuleAction.TypeLike.UPDATE)) diff --git a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/RoleController.java b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/RoleController.java index 89adac0e..d4eeea77 100644 --- a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/RoleController.java +++ b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/RoleController.java @@ -23,12 +23,15 @@ import java.util.Map; import static net.ximatai.muyun.platform.PlatformConst.BASE_PATH; +import static net.ximatai.muyun.platform.controller.RoleController.MODULE_ALIAS; @Startup @Tag(name = "角色管理") -@Path(BASE_PATH + "/role") +@Path(BASE_PATH + "/" + MODULE_ALIAS) public class RoleController extends ScaffoldForPlatform implements ITreeAbility, IChildrenAbility, IModuleRegisterAbility { + public final static String MODULE_ALIAS = "role"; + @Inject UserRoleController userRoleController; @@ -119,7 +122,7 @@ public ModuleConfig getModuleConfig() { return ModuleConfig.ofName("角色管理") .setTable("auth_role") .setUrl("platform/role/index") - .setAlias("role") + .setAlias(MODULE_ALIAS) .addAction(new ModuleAction("assign", "分配", ModuleAction.TypeLike.UPDATE)) .addAction(new ModuleAction("revoke", "撤回", ModuleAction.TypeLike.UPDATE)); }