yujian
2019-09-03 2ddf5b8a1290123e2d1c05bcc851ec35cd217afc
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.yeshi.fanli.dao.mybatis.lable;
 
import java.util.List;
import java.util.Map;
 
import org.apache.ibatis.annotations.Param;
 
import com.yeshi.fanli.entity.bus.lable.Label;
import com.yeshi.fanli.entity.bus.lable.LabelGoods;
import com.yeshi.fanli.exception.goods.quality.LabelException;
 
public interface LabelMapper {
 
    int insert(Label record);
 
    int insertSelective(Label record);
    
    int updateByPrimaryKey(Label record);
    
    int updateByPrimaryKeySelective(Label record);
    
    int deleteByPrimaryKey(Long id);
    
    Label selectByPrimaryKey(Long id);
    
    List<Label> selectByTitle(@Param("title") String title);
    
    
    Label getByTitle(@Param("title") String title);
    
    
    /**
     * 多个标签查询
     * @param list
     * @return
     */
    List<Label> listByTitles(List<String> list);
    
    
    /**
     * 统计标签总数
     * @return
     */
    long getCount();
    
    /**
     * 统计今日方式 录入总数
     * @return
     */
    long getCountToday();
    
    
    Map<String, Object> getCountByEntryMode();
    
    /**
     * 批量删除
     * @param ids
     * @return
     */
    int deleteBatchByPrimaryKey(long[] ids);
    
    /**
     * 根据条件查询标签
     * @param start
     * @param count
     * @param title
     * @param startTime
     * @param endTime
     * @return
     */
    List<Label> query(@Param("start") long start, @Param("count") int count, @Param("key") String title,
            @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("orderMode") String orderMode);
    
    int getQueryCount(@Param("key") String title, @Param("startTime") String startTime,
            @Param("endTime") String endTime);
    
    
    /**
     * 商品标签添加候选项(已排除存在标签)
     * @param goodsId
     * @return
     * @throws LabelException
     */
    List<Label> queryGoodsCandidate(@Param("start") int start, @Param("count") int count, 
            @Param("key") String key, @Param("goodsId") Long goodsId);
    int getCountQueryGoodsCandidate(@Param("key") String key, @Param("goodsId") Long goodsId);
    
    /**
     * 查询一级分类 标签候选项
     * @param classId
     * @return
     */
    List<Label> queryClassCandidate(@Param("start") int start, @Param("count") int count, 
            @Param("key") String key, @Param("classId") Long classId);
    int getCountQueryClassCandidate(@Param("key") String key, @Param("classId") Long classId);
    
    
    /**
     * 查询子级分类 标签候选项
     * @param subClassId
     * @return
     */
    List<Label> querySubClassCandidate(@Param("start") int start, @Param("count") int count, 
            @Param("key") String key, @Param("subClassId") Long subClassId);
    int getCountQuerySubClassCandidate(@Param("key") String key, @Param("subClassId") Long subClassId);
    
    
    
    /**
     * 查询二级以下分类 标签列表
     * @param subClassId
     * @return
     */
    List<Label> getSecondClassLables(@Param("subClassId") Long subClassId);
    
    
    /**
     * 查询商品对应标签
     * @param goodsId
     * @return
     */
    List<LabelGoods> getByGoodsId(@Param("goodsId") Long goodsId);
    
}