This commit is contained in:
@jyuhsin
2026-03-11 15:39:04 +08:00
parent 58ea3f82ae
commit bdb3fbd13e
5 changed files with 67 additions and 28 deletions
@@ -50,17 +50,7 @@ public class SysV4AppsController {
@SaCheckLogin
@ApiOperation("获取应用分类")
public Result categories(@Param(value = "platform", df = "PC") String platform) {
List<Sys_module> list;
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
list = dao.query(Sys_module.class, Cnd.where(Sys_module::getPlatform, "=", platform).asc(Sys_module::getSortNum));
} else {
list = dao.query(
Sys_module.class,
Cnd.where(Sys_module::getPlatform, "=", platform)
.and(Sys_module::getId, "=", "2")
.asc(Sys_module::getSortNum)
);
}
List<Sys_module> list = dao.query(Sys_module.class, Cnd.where(Sys_module::getPlatform, "=", platform).asc(Sys_module::getSortNum));
List<Map<String, Object>> categories = list.stream().map(module -> {
Map<String, Object> category = new HashMap<>();
category.put("id", module.getId());