yujian
2019-05-29 0588d6be74335f41c79a8d8e32dbd1c3d3e47fa3
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
125
126
127
128
129
package com.yeshi.fanli.dao.mybatis.lable;
 
import java.util.List;
 
import org.apache.ibatis.annotations.Param;
 
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.lable.LabelGoods;
 
    
 
public interface LabelGoodsMapper extends BaseMapper<LabelGoods>{
 
    /**
     * 批量插入
     * @param list
     * @return
     */
    int insertBatch(List<LabelGoods> list);
            
    /**
     * 判断是否已贴过标签
     * @param title
     * @param startTime
     * @return
     */
    Long getRelationNum( @Param("labelId") Long labelId);
    
    /**
     * 批量删除
     * @param ids
     * @return
     */
    int deleteBatchByPrimaryKey(long[] ids);
    
    
    /**
     * 删除商品多个标签
     */
    void deleteByAuctionIdAndLabIDs(@Param("auctionId")Long auctionId, @Param("list") List<Long> list);
    
    
    
    /**
     * 批量删除
     * @param ids
     * @return
     */
    int deleteBatchByPK(List<Long> list);
    
    
    /**
     * 判断是否已贴过标签
     * @param title
     * @param startTime
     * @return
     */
    Long isExistence(@Param("goodsId") Long goodsId, @Param("labelId") Long labelId);
    
    /**
     * 查询商品当前是否包含 9k9类目
     * @param title
     * @param list
     * @return
     */
    List<LabelGoods> listQuery9k9Class(@Param("gid") Long title, @Param("list") List<Long> list);
    
    
    
    /**
     * 查询商品对应标签
     * @param goodsId
     * @return
     */
    int getCountByGoodsId(@Param("goodsId") Long goodsId);
    
    
    /**
     * 查询商品对应标签 -- 分页
     * @param record
     * @return
     */
    List<LabelGoods> queryByGoodsId(@Param("start") int start, @Param("count") int count, @Param("goodsId") Long record);
    
    int getCountQueryByGoodsId(@Param("goodsId") Long record);
    
    
    /**
     * 根据商品id删除标签
     * @param goodsId
     * @return
     */
    int deleteByGoodsId(Long goodsId);
    
    
    int deleteBatchByGoodsId(List<Long> list);
    
    
    /**
     * 根据标签id批量删除
     * @param ids
     * @return
     */
    int deleteByLabId(Long labId);
    
    /**
     * 批量删除
     * @param ids
     * @return
     */
    
    int deleteByGoodsIdAndLabId(Long goodsId, Long labId);
    
    
    /**
     * 查询所有数据+条件
     * @param start
     * @param count
     * @param goodsId
     * @param labIds
     * @return
     */
    List<LabelGoods> listQuery(@Param("start") long start, @Param("count") int count, 
             @Param("labIds") List<Long> labIds);
    
    long countQuery(@Param("labIds") List<Long> labIds);
    
    
}