wuyouming666
2023-09-18 c07b4f92f7598b6f69d4c709d6651aeab24e69e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.example.springboot.service;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.springboot.entity.Category;
import com.example.springboot.entity.vo.CategoryVo;
 
import java.util.List;
 
public interface CategoryService extends IService<Category> {
    /**
     * 分页查询分类
     *
     * @param categoryVO
     * @return
     */
    IPage<Category> selectPage(CategoryVo categoryVO);
 
    /**
     * 查询子集,返回非嵌套数据结构
     *
     * @param id
     * @param bool 是否包含自己
     * @return
     */
    List<Category> selectList(Long id, Boolean bool);
 
    /**
     * 查询子集,不包含自己,返回非嵌套数据结构
     *
     * @param id   分类的id
     * @param path 分类的路径
     * @return
     */
    List<Category> selectByPath(Long id, String path);
 
    /**
     * 查询子集,返回嵌套数据结构
     *
     * @return
     */
    List<Category> selectChilds(Long creator);
 
    /**
     * 查询子集,不包含自己,返回嵌套数据结构
     *
     * @param id
     * @return
     */
    List<Category> selectChild(Long id);
}