大屏页面初始化

This commit is contained in:
2026-02-28 10:59:21 +08:00
parent 6dc7e99b4b
commit 3548359387
3 changed files with 27 additions and 20 deletions

View File

@@ -1,5 +1,7 @@
package com.mini.mybigscreen.biz.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mini.mybigscreen.Model.Result;
import com.mini.mybigscreen.biz.domain.ErpCategory;
import com.mini.mybigscreen.biz.service.ErpCategoryService;
@@ -27,7 +29,10 @@ public class ErpCategoryController {
private ErpCategoryService categoryService;
@GetMapping("list")
public Result<List<ErpCategory>> getList() {
return Result.success(categoryService.list());
public Result<List<ErpCategory>> getList(String categoryType) {
QueryWrapper<ErpCategory> query = new QueryWrapper<>();
query.eq(StrUtil.isNotBlank(categoryType), "category_type", categoryType)
.orderByDesc("create_time");
return Result.success(categoryService.list(query));
}
}