Administrator
2018-10-30 7bf6a0582c7c62c90ee2ed8a88654f11d0479092
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
package com.yeshi.fanli.service.inter.lable;
 
import java.util.List;
 
import com.yeshi.fanli.entity.bus.lable.LabelGoods;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.LabelClassException;
import com.yeshi.fanli.exception.LabelGoodsException;
 
public interface LabelGoodsService {
 
    /**
     * 插入对象
     * 
     * @param record
     * @return
     * @throws LabelGoodsException
     */
    public int insert(LabelGoods record) throws LabelGoodsException;
 
    /**
     * 更新当前对象所有数据
     * 
     * @param record
     * @return
     * @throws LabelGoodsException
     */
    public int updateByPrimaryKey(LabelGoods record) throws LabelGoodsException;
 
    /**
     * 选择性更新内容——不为空则更新该字段
     * 
     * @param record
     * @return
     * @throws LabelGoodsException
     */
    public int updateByPrimaryKeySelective(LabelGoods record) throws LabelGoodsException;
 
    /**
     * 根据id删除当前对象
     * 
     * @param id
     * @return
     * @throws LabelGoodsException
     */
    public int deleteByPrimaryKey(Long id) throws LabelGoodsException;
 
    /**
     * 根据id查找当前对象
     * 
     * @param id
     * @return
     * @throws LabelGoodsException
     */
    public LabelGoods selectByPrimaryKey(Long id) throws LabelGoodsException;
 
 
    /**
     * 根据id批量删除
     * 
     * @param ids
     */
    public int deleteBatchById(long[] ids) throws LabelGoodsException;
 
    /**
     * 商品贴标签
     * 
     * @param arrtitle
     * @param ids
     * @param admin
     * @return
     * @throws LabelGoodsException
     */
    public void setGoodsLabel(String[] arrtitle, List<String> goodsIds, AdminUser admin) throws Exception;
 
    /**
     * 根据商品id 删除商品对应的所有标签信息
     * 
     * @param ids
     * @throws LabelGoodsException
     */
    public void deleteByGoodsId(List<String> ids) throws LabelGoodsException;
 
    /**
     * 批量添加商品标签
     * 
     * @param label
     * @param goodsIdList
     * @param admin
     * @param weight
     * @param weightSmall
     * @param weightLarge
     */
    public void addBatchRandom(String[] lables, List<String> idList, AdminUser admin, Integer weight,
            Integer weightSmall, Integer weightLarge) throws Exception;
 
    /**
     * 获取标签商品关联数量
     * 
     * @param labelId
     * @return
     * @throws LabelGoodsException
     */
    public Long getRelationNum(Long labelId) throws LabelGoodsException;
 
 
    public Long isExistence(Long goodsId, Long labId);
 
    public int deleteByGoodsIdAndLabId(Long goodsId, Long labId);
 
    /**
     * 查询商品对应标签 --分页
     * 
     * @param start
     * @param count
     * @param goodsId
     * @return
     * @throws LabelClassException
     */
    public List<LabelGoods> queryByGoodsId(int start, int count, Long goodsId) throws LabelClassException;
 
    public int getCountQueryByGoodsId(Long goodsId);
    
    
    /**
     * 统计商品的标签数量
     * @param goodsId
     * @return
     */
    public int getCountByGoodsId(Long goodsId);
    
 
    /**
     * 商品选择标签添加入库
     * @param taoBaoGoodsBrief
     * @param labIdList
     * @param admin
     * @throws Exception
     */
    public void addBatchByLabId(TaoBaoGoodsBrief taoBaoGoodsBrief, List<String> labIdList, AdminUser admin) throws Exception;
    
    /**
     * 批量商品贴上标签  
     * @param goodsIdList  商品id
     * @param labIdList    标签id
     * @param admin
     * @throws Exception
     */
    public void batchGoodsAddLables(List<Long> goodsIdList, List<Long> labIdList, AdminUser admin) throws Exception;
 
    /**
     * 单个商品贴标签
     * @param goodsId
     * @param labIdList
     * @param admin
     * @throws Exception
     */
    public void singleGoodsAddLables(Long goodsId, List<Long> labIdList, AdminUser admin) throws Exception;
    
}