admin
2019-07-09 531d93708df8017e59830f15b41f3cc42d6126e6
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
package com.yeshi.fanli.dao.mybatis.lable;
 
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
 
import org.apache.ibatis.annotations.Param;
 
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.lable.QualityFactory;
import com.yeshi.fanli.vo.quality.QualityFactoryVO;
 
public interface QualityFactoryMapper extends BaseMapper<QualityFactory>{
 
 
    /**
     * 批量插入
     * 
     * @param list
     * @return
     */
    int insertBatch(List<QualityFactory> list);
 
    /**
     * 批量选择更新
     * 
     * @param list
     * @return
     */
    int updateBatchSelective(List<QualityFactory> list);
 
    /**
     * 批量删除
     * 
     * @param list
     * @return
     */
    int deleteBatchByPrimaryKey(List<Long> list);
    
    
    /**
     * 根据商品id 批量删除
     * @param list
     */
    void deleteBatchByGoodsId(List<Long> list);
 
    /**
     * 统计总行数
     * 
     * @return
     */
    Long countTotalRows(@Param("days") Integer days);
 
    List<QualityFactory> queryByGoodsId(@Param("goodsId") Long goodsId);
    
    
    /**
     * 根据商品id查询
     * @param auctionId
     * @return
     */
    QualityFactory getByAuctionId(@Param("auctionId") Long auctionId);
    
 
    /**
     * 根据多个商品id 查询对应的商品信息
     * 
     * @param list
     * @return
     */
    List<QualityFactory> listQueryGoodsByGoodsId(List<Long> list);
 
    Long queryCountByGoodsId(@Param("goodsId") Long goodsId);
 
    List<QualityFactory> listQueryByAuctionId(List<Long> list);
 
    // 精选库查询 -- 查询所有
    List<QualityFactory> queryAll(@Param("start") long start, @Param("count") int count, @Param("days") Integer days);
 
    // 精选库查询
    List<QualityFactory> query(QualityFactoryVO qualityFactoryVO);
 
    long queryCount(QualityFactoryVO qualityFactoryVO);
 
    /**
     * 统计商品数量
     * 
     * @return
     */
    Map<String, Object> getCountAll();
 
    /**
     * 根据商品id移除精选库
     * 
     * @param goodsId
     * @return
     */
    int deleteByGoodsId(Long goodsId);
 
    /**
     * 查询精选商品数据应用前端
     * 
     * @param start
     * @param count
     * @param key
     * @param classId
     * @param labId
     * @return
     */
    List<QualityFactory> listQuery(@Param("start") long start, @Param("count") int count, @Param("key") String key,
            @Param("systemCid") Long systemCid, @Param("labId") Long labId, @Param("cids") String cids,
            @Param("hasQuan") Integer hasQuan);// 分类id、标签id
 
    /**
     * 对应查询精选商品数据应用前端统计
     */
    long countQuery(@Param("key") String key, @Param("systemCid") Long systemCid, @Param("labId") Long labId,
            @Param("cids") String cids, @Param("hasQuan") Integer hasQuan);
 
    /**
     * 根据关键词 搜索商品标题和标签
     * 
     * @param start
     * @param count
     * @param systemCid
     * @param key
     * @param list
     * @param sort
     * @return
     */
    List<QualityFactory> listQueryByKeyAndlabIDs(@Param("start") long start, @Param("count") int count,
            @Param("key") String key, @Param("list") List<Long> list, @Param("sort") Integer sort,
            @Param("systemCid") Long systemCid, @Param("hasQuan") Integer hasQuan, @Param("userType") Integer userType,
            @Param("biz30day") Integer biz30day,
            // 在售价范围
            @Param("startprice") Integer startprice, @Param("endprice") Integer endprice);
 
    long countQueryKeyAndlabIDs(@Param("key") String key, @Param("list") List<Long> list, Long systemCid,
            @Param("hasQuan") Integer hasQuan, @Param("userType") Integer userType, @Param("biz30day") Integer biz30day,
            // 在售价范围
            @Param("startprice") Integer startprice, @Param("endprice") Integer endprice);
 
    /**
     * 根据类目id删除商品
     * 
     * @param doTime
     * @param gcids
     * @return
     */
    int removeStorageGoods(String doTime, Long gcids);
 
    
    /**
     * 子类查询
     * 
     * @param start
     * @param count
     * @param key
     * @param classId
     * @param labId
     * @return
     */
    List<QualityFactory> listQueryByKey(@Param("start") long start, @Param("count") int count, @Param("key") String key,
            @Param("sort") Integer sort, @Param("systemCid") Long systemCid, @Param("hasQuan") Integer hasQuan,
            @Param("userType") Integer userType, @Param("biz30day") Integer biz30day,
            // 在售价范围
            @Param("startprice") Integer startprice, @Param("endprice") Integer endprice);
 
    /**
     * 子类查询
     */
    long countQueryByKey(@Param("key") String key, @Param("systemCid") Long systemCid,
            @Param("hasQuan") Integer hasQuan, @Param("userType") Integer userType, @Param("biz30day") Integer biz30day,
            // 在售价范围
            @Param("startprice") Integer startprice, @Param("endprice") Integer endprice);
 
    /**
     * 券面额数据查询
     * 
     * @param start
     * @param count
     * @param key
     * @param systemCid
     * @return
     */
    List<QualityFactory> listQueryByCouponAmount(@Param("start") long start, @Param("count") int count,
            @Param("startAmount") Integer startAmount, @Param("endAmount") Integer endAmount,
            @Param("startPropor") Integer startPropor);
 
    long countQueryByCouponAmount(@Param("startAmount") Integer startAmount, @Param("endAmount") Integer endAmount,
            @Param("startPropor") Integer startPropor);
 
    /**
     * 限时抢购商品
     * 
     * @param start
     * @param count
     * @param periodtime
     * @return
     */
    List<QualityFactory> listQueryByFlashSale(@Param("start") long start, @Param("count") int count);
 
    long countQueryByFlashSale();
 
    /**
     * 限时秒杀 随机3个商品
     * @return
     */
    List<QualityFactory> listFlashSaleRandGoods();
    
    /**
     * 返利金额数据查询
     * 
     * @param start
     * @param count
     * @param key
     * @param systemCid
     * @return
     */
    List<QualityFactory> listQueryByRebateAmount(@Param("start") long start, @Param("count") int count,
            @Param("proportion") String proportion, @Param("startAmount") Integer startAmount,
            @Param("endAmount") Integer endAmount, @Param("tkRate") double tkRate);
 
    long countQueryByRebateAmount(@Param("proportion") String proportion, @Param("startAmount") Integer startAmount,
            @Param("endAmount") Integer endAmount, @Param("tkRate") double tkRate);
 
    /**
     * 返利金额数据查询 - 首页下方数据
     * 
     * @param start
     * @param count
     * @param key
     * @param systemCid
     * @return
     */
    List<QualityFactory> listRecommendToIndex(@Param("start") long start, @Param("count") int count,
            @Param("proportion") Double proportion, @Param("commision") Integer commision,
            @Param("couponAmount") Integer couponAmount, @Param("tkRate") double tkRate,
            @Param("couponRatio") Double couponRatio);
 
    long countRecommendToIndex(@Param("proportion") Double proportion, @Param("commision") Integer commision,
            @Param("couponAmount") Integer couponAmount, @Param("tkRate") double tkRate,
            @Param("couponRatio") Double couponRatio);
 
    /**
     * 根据时间 获取dateTime时间之前创建的商品信息
     * 
     * @param systemCid
     *            系统分类id
     * @param dateTime
     *            筛选时间
     * @param goodsSource
     *            商品来源
     * @return
     */
    List<Long> getAuctionIdbyClassId(@Param("systemCid") Long systemCid, @Param("goodsSource") Integer goodsSource,
            @Param("beforeTime") String beforeTime);
 
    /**
     * 更新权重
     * 
     * @param weight
     * @param time
     * @return
     */
    void updateWeight(@Param("weight") Integer weight, @Param("time") Integer time);
 
    // 查询优惠券-当日
    List<QualityFactory> queryToCouponColumn(@Param("start") long start, @Param("count") int count);
 
    long countQueryToCouponColumn();
 
    /**
     * 搜索-推荐商品
     * 
     * @param start
     * @param count
     * @param key
     *            关键词
     * @return
     */
    List<QualityFactory> listRecommendBykey(@Param("start") long start, @Param("count") int count,
            @Param("key") String key, @Param("hasQuan") Integer hasQuan, @Param("userType") Integer userType,
            @Param("startprice") Double startprice, @Param("endprice") Double endprice,
            @Param("startTkRate") Double startTkRate, @Param("endTkRate") Double endTkRate,
            @Param("sort") Integer sort);
 
    long countRecommendBykey(@Param("key") String key, @Param("hasQuan") Integer hasQuan,
            @Param("userType") Integer userType, @Param("startprice") Double startprice,
            @Param("endprice") Double endprice, @Param("startTkRate") Double startTkRate,
            @Param("endTkRate") Double endTkRate);
 
    List<QualityFactory> listQueryBylabIDs(@Param("start") long start, @Param("count") int count,
            @Param("list") List<Long> list, @Param("gid") Long gid, @Param("systemCid") Long systemCid);
 
    /**
     * 按最低销量倒叙排列
     * 
     * @param salesCount
     * @param start
     * @param count
     * @return
     */
    List<QualityFactory> listByMinSalesCountOrderByCreateTimeDesc(@Param("salesCount") int salesCount,
            @Param("start") long start, @Param("count") int count);
 
    /**
     * 按最低销量倒叙排列
     * 
     * @param salesCount
     * @param start
     * @param count
     * @return
     */
    List<QualityFactory> listFreeGoods(@Param("start") long start, @Param("count") int count);
    
    long countFreeGoods();
 
    
    /**
     * 根据店铺信息获取商品
     * @param start
     * @param count
     * @param shopId
     * @return
     */
    List<QualityFactory> listByShopId(@Param("start") long start, @Param("count") int count, 
            @Param("shopId") Long shopId);
    
    long countByShopId(@Param("shopId") Long shopId);
    
    
    
    /**
     * 9k9类
     * 
     */
    List<QualityFactory> get9k9ClassGoods(@Param("start") long start, @Param("count") int count,
            @Param("biz30day") Integer biz30day, @Param("zkPrice") BigDecimal zkPrice,
            @Param("minQuanPrice") BigDecimal minQuanPrice, @Param("maxQuanPrice") BigDecimal maxQuanPrice,
            @Param("cids") String cids);
 
    long count9k9ClassGoods(@Param("biz30day") Integer biz30day, @Param("zkPrice") BigDecimal zkPrice,
            @Param("minQuanPrice") BigDecimal minQuanPrice, @Param("maxQuanPrice") BigDecimal maxQuanPrice
            ,@Param("cids") String cids);
 
    
    
    /**
     * 今日必抢 - 9k9
     * 
     */
    List<QualityFactory> listQueryEverydayRob(@Param("start") long start, @Param("count") int count,
            @Param("zkPrice") BigDecimal zkPrice,
            @Param("minQuanPrice") BigDecimal minQuanPrice, @Param("maxQuanPrice") BigDecimal maxQuanPrice);
    
    long countQueryEverydayRob(@Param("zkPrice") BigDecimal zkPrice,
            @Param("minQuanPrice") BigDecimal minQuanPrice, @Param("maxQuanPrice") BigDecimal maxQuanPrice);
 
 
}