yujian
2020-05-06 eb1adc13eda955e8ef0fc9fe41fb246fa89b722d
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.yeshi.fanli.dao.mybatis;
 
import java.util.List;
 
import org.apache.ibatis.annotations.Param;
 
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
 
public interface GoodsSubClassMapper {
 
    int deleteByPrimaryKey(Long id);
 
    int insert(GoodsSubClass record);
 
    int insertSelective(GoodsSubClass record);
 
    GoodsSubClass selectByPrimaryKey(Long id);
 
    int updateByPrimaryKeySelective(GoodsSubClass record);
 
    int updateByPrimaryKey(GoodsSubClass record);
    
    
    /**
     *  查询一级之下的所有二级分类
     * @param rootId  一级id
     * @returnL
     */
    List<GoodsSubClass> queryByRootId(@Param("rootId") Long rootId, @Param("state") Integer state,@Param("month") Integer month);
    
    /**
     *  查询二级分类之下其他分类
     * @param rootId  一级id
     * @return
     */
    List<GoodsSubClass> queryByPid(@Param("pid") Long pid, @Param("state") Integer state);
    
    
    List<GoodsSubClass> queryByRootIdAndWeight(@Param("rootId") Long rootId, @Param("type") int type, @Param("weight") int weight);
    
    List<GoodsSubClass> queryByPidAndWeight(@Param("pid") Long pid, @Param("type") int type, @Param("weight") int weight);
    
    /**
     *  统计一级之下的所有二级分类
     * @param rootId  一级id
     * @returnL
     */
    int countByRootId(@Param("rootId") Long rootId);
    
    /**
     *  统计二级分类之下其他分类
     * @param rootId  一级id
     * @return
     */
    int countByPid(@Param("pid") Long pid);
    
    /**
     *  统计一级之下最大权重
     * @param rootId  一级id
     * @returnL
     */
    int getMaxWeightByRootId(@Param("rootId") Long rootId);
    
    /**
     *  统计二级分类之最大权重
     * @param rootId  一级id
     * @return
     */
    int getMaxWeightByPid(@Param("pid") Long pid);
    
    /**
     * 一级id查询
     * @param list
     * @return
     */
    List<GoodsSubClass> queryByListCid(List<Long> list);
    
}