From 573c491b4a1ba60e12a5678a01c1546c0077c1ee Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 30 七月 2019 09:07:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/dao/mybatis/lable/QualityFactoryMapper.java |  365 +++++++++++++++++++++++++++------------------------
 1 files changed, 193 insertions(+), 172 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/lable/QualityFactoryMapper.java b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/lable/QualityFactoryMapper.java
index 9f7e01e..7c676e6 100644
--- a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/lable/QualityFactoryMapper.java
+++ b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/lable/QualityFactoryMapper.java
@@ -1,151 +1,105 @@
 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 {
+public interface QualityFactoryMapper extends BaseMapper<QualityFactory>{
 
-	int deleteByPrimaryKey(Long id);
 
-	int insert(QualityFactory record);
-
-	int insertSelective(QualityFactory record);
-
-	QualityFactory selectByPrimaryKey(Long id);
-
-	int updateByPrimaryKeySelective(QualityFactory record);
-
-	int updateByPrimaryKey(QualityFactory record);
-	
-	
 	/**
 	 * 鎵归噺鎻掑叆
+	 * 
 	 * @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);
-	
-	
-	// 寰呮洿鏂扮簿閫夊晢鍝乮d
-	List<Long> queryNeedUpdate(@Param("start") long start, @Param("count") int count, @Param("hour") int hour);
-	
-	// 缁熻闇�鏇存柊鍟嗗搧鏁伴噺
-	long countQueryNeedUpdate();
-	
-	
-	// 绮鹃�夊簱鏌ヨ
-	List<QualityFactory> query(@Param("start") long start, @Param("count") int count, @Param("key") String key,
-			// 鎺掑簭瀛楁 锛氶攢閲忋�佷环鏍笺�佷剑閲�
-			@Param("totalSales") Integer totalSales, @Param("price") Integer price, @Param("tkRate") Integer tkRate,
-			// 鍟嗗搧鏉ユ簮銆佸叆搴撴椂闂�
-			@Param("propor")Integer propor,@Param("goodsSource") Integer goodsSource, @Param("days") Integer days, 
-			// 鍦ㄥ敭浠疯寖鍥�
-		    @Param("startZkPrice") Integer startZkPrice, @Param("endZkPrice") Integer endZkPrice,
-		    // 鏈堥攢閲忚寖鍥�
-			@Param("startBiz30day") Integer startBiz30day, @Param("endBiz30day") Integer endBiz30day, 
-			// 鏉冮噸鑼冨洿
-			@Param("startWeight") Integer startWeight, @Param("endWeight") Integer endWeight, 
-			// 浣i噾姣斾緥鑼冨洿
-			@Param("startTkRate") Integer startTkRate, @Param("endTkRate") Integer endTkRate, 
-			// 鍒搁潰棰濓細鍑忓灏�
-			@Param("startAmount") Integer startAmount, @Param("endAmount") Integer endAmount, 
-			// 鏄惁锛� 浼樻儬鍒� 銆佸寘閭�
-			@Param("hasCoupon") Integer hasCoupon, @Param("freeShipment") Integer freeShipment,
-			// 鏄惁锛氭秷璐硅�呬繚闅� 銆佹垚浜よ浆鍖�
-			@Param("isPrepay") Integer isPrepay,@Param("payRate30") Integer payRate30,
-			// 鏄惁锛氬ソ璇勭巼銆� 閫�娆剧巼
-			@Param("goodRate") Integer goodRate,@Param("rfdRate") Integer rfdRate,
-			// 鍒告瘮渚嬶細 鍒搁潰鍊�/鍦ㄥ敭浠�
-			@Param("startPropor") Integer startPropor, @Param("endPropor") Integer endPropor,
-			// 绫荤洰id 鎼滅储姝ょ被鍨�
-			@Param("gcid") Long gcid, @Param("keyType") Integer keyType);
-	
-	
 
-	long queryCount( @Param("key") String key, @Param("goodsSource") Integer goodsSource, @Param("days") Integer days, 
-			// 鍦ㄥ敭浠疯寖鍥�
-		    @Param("startZkPrice") Integer startZkPrice, @Param("endZkPrice") Integer endZkPrice,
-		    // 鏈堥攢閲忚寖鍥�
-			@Param("startBiz30day") Integer startBiz30day, @Param("endBiz30day") Integer endBiz30day, 
-			// 鏉冮噸鑼冨洿
-			@Param("startWeight") Integer startWeight, @Param("endWeight") Integer endWeight, 
-			// 浣i噾姣斾緥鑼冨洿
-			@Param("startTkRate") Integer startTkRate, @Param("endTkRate") Integer endTkRate, 
-			// 鍒搁潰棰濓細鍑忓灏�
-			@Param("startAmount") Integer startAmount, @Param("endAmount") Integer endAmount, 
-			// 鏄惁锛� 浼樻儬鍒� 銆佸寘閭�
-			@Param("hasCoupon") Integer hasCoupon, @Param("freeShipment") Integer freeShipment,
-			// 鏄惁锛氭秷璐硅�呬繚闅� 銆佹垚浜よ浆鍖�
-			@Param("isPrepay") Integer isPrepay,@Param("payRate30") Integer payRate30,
-			// 鏄惁锛氬ソ璇勭巼銆� 閫�娆剧巼
-			@Param("goodRate") Integer goodRate,@Param("rfdRate") Integer rfdRate,
-			// 鍒告瘮渚嬶細 鍒搁潰鍊�/鍦ㄥ敭浠�
-			@Param("startPropor") Integer startPropor, @Param("endPropor") Integer endPropor,
-			// 绫荤洰id
-			@Param("gcid") Long gcid, @Param("keyType") Integer keyType);
-	
+	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
@@ -154,18 +108,18 @@
 	 * @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銆佹爣绛緄d
-		
+			@Param("systemCid") Long systemCid, @Param("labId") Long labId, @Param("cids") String cids,
+			@Param("hasQuan") Integer hasQuan);// 鍒嗙被id銆佹爣绛緄d
+
 	/**
 	 * 瀵瑰簲鏌ヨ绮鹃�夊晢鍝佹暟鎹簲鐢ㄥ墠绔粺璁�
-	 */ 
-	long countQuery( @Param("key") String key, @Param("systemCid") Long systemCid, 
-			@Param("labId") Long labId, @Param("cids") String cids, @Param("hasQuan") Integer hasQuan);
-	
-	
-	
+	 */
+	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
@@ -175,48 +129,30 @@
 	 * @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);
-	
+			@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);
-	
-	
-	
+			@Param("startprice") Integer startprice, @Param("endprice") Integer endprice);
+
 	/**
 	 * 鏍规嵁绫荤洰id鍒犻櫎鍟嗗搧
+	 * 
 	 * @param doTime
 	 * @param gcids
 	 * @return
 	 */
 	int removeStorageGoods(String doTime, Long gcids);
-	
-	
-	/**
-	 * 浠婃棩蹇呮姠 - 9k9
-	 * @param start
-	 * @param count
-	 * @param systemCid
-	 * @param labId
-	 * @param sortField
-	 * @return
-	 */
-	List<QualityFactory> listQueryEverydayRob(@Param("start") long start, @Param("count") int count,
-			@Param("systemCid")Long systemCid, @Param("labId")Long labId, 
-			@Param("sortField")Integer sortField,
-			@Param("startCouponAmount")Double startCouponAmount, @Param("endCouponAmount")Double endCouponAmount);
-	
-	long countQueryEverydayRob(@Param("systemCid")Long systemCid, @Param("labId")Long labId,
-			@Param("startCouponAmount")Double startCouponAmount, @Param("endCouponAmount")Double endCouponAmount);
-	
+
 	
 	/**
 	 * 瀛愮被鏌ヨ
+	 * 
 	 * @param start
 	 * @param count
 	 * @param key
@@ -224,25 +160,23 @@
 	 * @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);
-		
+	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);
-	
-	
-	
-	
+	 */
+	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
@@ -252,26 +186,31 @@
 	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);
 
-	
+	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
@@ -281,13 +220,13 @@
 	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);
 
-	
+	long countQueryByRebateAmount(@Param("proportion") String proportion, @Param("startAmount") Integer startAmount,
+			@Param("endAmount") Integer endAmount, @Param("tkRate") double tkRate);
+
 	/**
 	 * 杩斿埄閲戦鏁版嵁鏌ヨ - 棣栭〉涓嬫柟鏁版嵁
+	 * 
 	 * @param start
 	 * @param count
 	 * @param key
@@ -296,45 +235,127 @@
 	 */
 	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);
+			@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  鍟嗗搧鏉ユ簮
+	 * 
+	 * @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);
+	
 	
 	
 	/**
-	 * 鎼滅储-鎺ㄨ崘鍟嗗搧
-	 * @param start
-	 * @param count
-	 * @param key 鍏抽敭璇�
-	 * @return
+	 * 9k9绫�
+	 * 
 	 */
-	List<QualityFactory> listRecommendBykey(@Param("start") long start, @Param("count") int count, @Param("key") String key);
+	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);
+
 	
-	long countRecommendBykey(@Param("key") String key);
+	
+	/**
+	 * 浠婃棩蹇呮姠 - 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);
+
+
 }

--
Gitblit v1.8.0