大屏页面初始化
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user