admin
2019-01-22 0e552c5dba18d27622116a7d7a6e04fc99f8e8a7
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
package com.yeshi.fanli.service.inter.lable;
 
import java.util.List;
import java.util.Map;
 
import com.yeshi.fanli.entity.bus.lable.BoutiqueAutoRule;
import com.yeshi.fanli.entity.bus.lable.Label;
import com.yeshi.fanli.entity.bus.lable.QualityFactory;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.QualityFactoryException;
 
public interface QualityFactoryService {
 
    /**
     * 选择性更新内容——不为空则更新该字段
     * 
     * @param record
     * @return
     * @throws QualityFactoryException
     */
    public int updateByPrimaryKeySelective(QualityFactory record) throws QualityFactoryException;
 
    /**
     * 根据id查找当前对象
     * 
     * @param id
     * @return
     * @throws QualityFactoryException
     */
    public QualityFactory selectByPrimaryKey(Long id) throws QualityFactoryException;
 
    /**
     * 统计商品数量
     * 
     * @return
     */
    public Map<String, Object> getCountAll();
 
    /**
     * 根据商品id 移除精品库
     * 
     * @param ids
     * @throws QualityFactoryException
     */
    public void deleteByGoodsId(List<String> ids) throws QualityFactoryException;
 
    /**
     * 根据淘宝id 删除精选库对应信息
     * 
     * @param gid
     * @throws QualityFactoryException
     */
    public void deleteByTaoBaoGoodsId(Long gid) throws QualityFactoryException;
 
    /**
     * 根据淘宝id集合 批量删除精选库对应信息
     * 
     * @param listId
     * @throws QualityFactoryException
     */
    public void deleteBatchByTaoBaoGoodsId(List<Long> listId) throws QualityFactoryException;
 
    /**
     * 根据淘宝id 删除
     * 
     * @param auctionId
     * @throws QualityFactoryException
     */
    public void deleteByTbAuctionId(Long auctionId);
 
    /**
     * 统计商品id 是存在精品库
     * 
     * @param goodsId
     * @return
     */
    public Long queryCountByGoodsId(Long goodsId);
 
    /**
     * 批量入库--淘宝
     * 
     * @param auctionIdList
     * @param admin
     * @throws Exception
     */
    public void addBatch(List<Long> auctionIdList, String las, AdminUser admin) throws Exception;
 
    /**
     * 精选库商品筛选
     * 
     * @param start
     * @param count
     * @param key
     * @param totalSales
     * @param price
     * @param tkRate
     * @param goodsSource
     * @param days
     * @param startZkPrice
     * @param endZkPrice
     * @param startBiz30day
     * @param endBiz30day
     * @param startWeight
     * @param endWeight
     * @param startTkRate
     * @param endTkRate
     * @param startAmount
     * @param endAmount
     * @param hasCoupon
     * @param freeShipment
     * @param isPrepay
     * @param payRate30
     * @param goodRate
     * @param rfdRate
     * @return
     * @throws QualityFactoryException
     */
    public List<QualityFactory> query(long start, int count, String key, Integer totalSales, Integer price,
            Integer tkRate, Integer propor, Integer goodsSource, Integer days, Integer startZkPrice, Integer endZkPrice,
            Integer startBiz30day, Integer endBiz30day, Integer startWeight, Integer endWeight, Integer startTkRate,
            Integer endTkRate, Integer startAmount, Integer endAmount, Integer hasCoupon, Integer freeShipment,
            Integer isPrepay, Integer payRate30, Integer goodRate, Integer rfdRate, Integer startPropor,
            Integer endPropor, Long gcid, Integer keyType) throws QualityFactoryException;
 
    public long queryCount(String key, Integer goodsSource, Integer days, Integer startZkPrice, Integer endZkPrice,
            Integer startBiz30day, Integer endBiz30day, Integer startWeight, Integer endWeight, Integer startTkRate,
            Integer endTkRate, Integer startAmount, Integer endAmount, Integer hasCoupon, Integer freeShipment,
            Integer isPrepay, Integer payRate30, Integer goodRate, Integer rfdRate, Integer startPropor,
            Integer endPropor, Long gcid, Integer keyType) throws QualityFactoryException;
 
    /**
     * 批量设置权重 + 随机权重
     * 
     * @param idList
     * @param admin
     * @param weight
     * @param weightSmall
     * @param weightLarge
     * @throws Exception
     */
    public void setWeightBatch(List<Long> idList, AdminUser admin, Integer weight, Integer weightSmall,
            Integer weightLarge) throws Exception;
 
    /**
     * 统计总行数
     * 
     * @return
     */
    public Long countTotalRows(Integer days);
 
    /**
     * 查询所有数据-无条件
     * 
     * @param start
     * @param count
     * @return
     */
    public List<QualityFactory> queryAll(long start, int count, Integer days);
 
    /**
     * 查询需要更新的精选库商品id
     * 
     * @param count
     * @param hour
     * @return
     */
    public List<Long> queryNeedUpdate(long start, int count, int hour);
 
    /**
     * 统计更新数据量
     * 
     * @return
     */
    public long queryNeedUpdateCount();
 
    /**
     * 查询精选商品数据应用前端
     * 
     * @param start
     * @param count
     * @param key
     * @param classId
     *            分类id
     * @param labId
     *            标签id
     * @return
     */
    public List<QualityFactory> listQuery(long start, int count, String key, Long classId, Long labId);
 
    /**
     * 对应查询精选商品数据应用前端统计
     */
    public long countQuery(String key, Integer goodsSource, Long classId, Long labId);
 
    /**
     * 更新精选库商品
     * 
     * @param goodsList
     * @param systemCid
     * @param labels
     */
    public void autoInsertOrUpadateStorage(List<TaoBaoGoodsBrief> goodsList, List<Label> listLabs,
            BoutiqueAutoRule autoRule) throws Exception;
 
    /**
     * AuctionId查收精选库
     * 
     * @param list
     * @return
     */
    public List<QualityFactory> listQueryByAuctionId(List<Long> list);
 
    /**
     * 根据时间 获取当前时间之前创建的商品信息
     * 
     * @param systemCid
     *            系统分类id
     * @param dateTime
     *            筛选时间
     * @param goodsSource
     *            商品来源
     * @return
     */
    public List<Long> getAuctionIdbyClassId(Long systemCid, Integer goodsSource, String dateTime)
            throws QualityFactoryException;
 
    /**
     * 更新权重
     * 
     * @param weight
     * @param time
     * @return
     */
    public void updateWeight(Integer weight, Integer time);
 
    /**
     * 根据精选库商品id 更新商品信息
     * 
     * @param listId
     *            商品主键
     */
    public void updateGoodsFactory(List<Long> listId);
 
    /**
     * 根据最低销量查询精选库(按创建时间倒叙排列)
     * 
     * @param salesCount
     * @param page
     * @param pageSize
     * @return
     */
    public List<QualityFactory> listByMinSalesCountOrderByCreateTimeDesc(int salesCount, int page, int pageSize);
 
}