This commit is contained in:
那些花儿
2025-09-05 15:15:11 +08:00
parent 23885590c5
commit a72c01358a
13 changed files with 1719 additions and 60 deletions
@@ -42,8 +42,8 @@ public class SysV4AppsController {
@Ok("json")
@SaCheckLogin
@ApiOperation("获取应用分类")
public Result categories() {
List<Sys_module> list = dao.query(Sys_module.class, Cnd.where(Sys_module::getPlatform, "=", "PC").asc(Sys_module::getSortNum));
public Result categories(@Param(value = "platform", df = "PC") String platform) {
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());
@@ -58,7 +58,7 @@ public class SysV4AppsController {
@Ok("json:full")
@SaCheckLogin
@ApiOperation("获取应用列表")
public Result list(@Param("categoryId") String categoryId, @Param("letter") String letter, @Param("keyword") String keyword, HttpServletRequest req) {
public Result list(@Param("categoryId") String categoryId, @Param("letter") String letter, @Param("keyword") String keyword, @Param(value = "platform", df = "PC") String platform, HttpServletRequest req) {
Sql sql = Sqls.create("""
SELECT
m.id,
@@ -77,7 +77,7 @@ public class SysV4AppsController {
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and("m.platform", "=", "PC");
cnd.and("m.platform", "=", platform);
cnd.and("m.disabled", "=", false);
cnd.and(Cnd.exps("m.parentId", "is", null).or("m.parentId", "=", ""));
cnd.andEX("m.moduleId", "=", categoryId);