From d88c167fc5973a2c15ff1539e4cdab36e4a7842c Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 28 八月 2019 14:47:15 +0800
Subject: [PATCH] 奖励券使用区分订单下单三方日期

---
 fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java |  553 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 281 insertions(+), 272 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java
index b276c2e..6198ab8 100644
--- a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java
+++ b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderMapper.java
@@ -1,273 +1,282 @@
-package com.yeshi.fanli.dao.mybatis.order;
-
-import java.math.BigDecimal;
-import java.util.Date;
-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.order.CommonOrder;
-import com.yeshi.fanli.vo.order.CommonOrderVO;
-
-public interface CommonOrderMapper extends BaseMapper<CommonOrder> {
-
-	/**
-	 * 鏌ヨ鐢ㄦ埛璁㈠崟 骞惰鍗曞彿鍒嗙粍
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @return
-	 */
-
-	List<CommonOrderVO> listUserOrder(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
-			@Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
-			@Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime,
-			@Param("day") Integer day, @Param("source") Integer source);
-
-	/**
-	 * 缁熻鐢ㄦ埛璁㈠崟 骞惰鍗曞彿鍒嗙粍
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @return
-	 */
-	long countUserOrder(@Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type,
-			@Param("orderState") Integer orderState, @Param("orderNo") String orderNo,
-			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day,
-			@Param("source") Integer source);
-
-	/**
-	 * 鍒ゆ柇閮ㄥ垎澶辨晥鐘舵��
-	 * 
-	 * @param uid
-	 * @param orderNo
-	 * @return
-	 */
-	CommonOrderVO getBuFenOrderState(@Param("uid") Long uid, @Param("orderNo") String orderNo);
-
-	/**
-	 * 鏍规嵁鐢ㄦ埛ID锛岃鍗曠姸鎬佸拰璁㈠崟缁撶畻鏃堕棿缁熻璁㈠崟鐨勬暟閲�
-	 * 
-	 * @param uid
-	 * @param state
-	 * @param minDate
-	 * @param maxDate
-	 * @return
-	 */
-	long countByUidAndOrderStateWithOrderBalanceTime(@Param("uid") Long uid, @Param("state") int state,
-			@Param("minDate") Date minDate, @Param("maxDate") Date maxDate);
-
-	/**
-	 * 鏍规嵁璁㈠崟鍙枫�佽鍗曠被鍨嬫煡璇㈠晢鍝�
-	 * 
-	 * @param list
-	 *            璁㈠崟瀵硅薄
-	 * @return
-	 */
-	List<CommonOrderVO> listOrderGoodsInfo(List<CommonOrderVO> list);
-
-	/**
-	 * 缁熻鍘嗗彶璁㈠崟鏁伴噺
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	Map<String, BigDecimal> countHistoryOrder(@Param("uid") Long uid, @Param("day") Integer day,
-			@Param("source") Integer source);
-
-	/**
-	 * 鏄ㄦ棩鎬昏鍗�-鏍规嵁绾㈠寘绫诲瀷 鑷喘 閭�璇� 鍒嗕韩
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	Map<String, BigDecimal> countByUidAndOrderState(@Param("uid") Long uid, @Param("type") Integer type,
-			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day,
-			@Param("source") Integer source);
-
-	/**
-	 * 濂栭噾璁㈠崟鏁伴噺
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	long countBonusOrderNumber(@Param("uid") Long uid, @Param("type") Integer type, @Param("day") Integer day,
-			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source);
-
-	/**
-	 * 濂栭噾缁熻
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	BigDecimal countBonusOrderMoney(@Param("uid") Long uid, @Param("type") Integer type, @Param("day") Integer day,
-			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source);
-
-	/**
-	 * 濂栭噾缁熻
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	Map<String, Object> countBonusOrderMoneyAndNumber(@Param("uid") Long uid, @Param("type") Integer type,
-			@Param("day") Integer day, @Param("startTime") String startTime, @Param("endTime") String endTime,
-			@Param("source") Integer source);
-
-	int countByOrderNOAndOrderType(@Param("orderNO") String orderNO, @Param("orderType") int orderType);
-
-	/**
-	 * 鏍规嵁璁㈠崟鍙蜂笌璁㈠崟鎺掑簭鍊艰幏鍙栬鎯�
-	 * 
-	 * @param orderNo
-	 *            -璁㈠崟鍙�
-	 * @param orderBy
-	 *            -璁㈠崟鎺掑簭鍊�
-	 * @param orderType
-	 *            -璁㈠崟绫诲瀷
-	 * @return
-	 */
-	CommonOrder selectByOrderNoAndOrderTypeAndOrderBy(@Param("orderNo") String orderNo,
-			@Param("orderType") int orderType, @Param("orderBy") int orderBy);
-
-	/**
-	 * 璁㈠崟鍒楄〃鏌ヨ
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param state
-	 * @param type
-	 * @param orderState
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	List<CommonOrderVO> listQueryByUid(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
-			@Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
-			@Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime,
-			@Param("day") Integer day);
-
-	/**
-	 * 缁熻
-	 */
-	long countQueryByUid(@Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type,
-			@Param("orderState") Integer orderState, @Param("orderNo") String orderNo,
-			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day);
-
-	/**
-	 * 璁㈠崟鍒楄〃鏌ヨ
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param state
-	 * @param type
-	 * @param orderState
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	List<CommonOrderVO> listQuery(@Param("start") long start, @Param("count") int count,
-			@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
-			@Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
-			@Param("endTime") String endTime, @Param("source") Integer source);
-
-	/**
-	 * 璁㈠崟鍒楄〃鏌ヨ(涓嶅寘鍚瓙璁㈠崟)
-	 * 
-	 * @param start
-	 * @param count
-	 * @param keyType
-	 * @param key
-	 * @param state
-	 * @param type
-	 * @param orderState
-	 * @param startTime
-	 * @param endTime
-	 * @param source
-	 * @return
-	 */
-	List<CommonOrderVO> listQueryWithNoChild(@Param("start") long start, @Param("count") int count,
-			@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
-			@Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
-			@Param("endTime") String endTime, @Param("source") Integer source);
-
-	/**
-	 * 缁熻
-	 */
-	long countQuery(@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
-			@Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
-			@Param("endTime") String endTime, @Param("source") Integer source);
-
-	long countQueryWithNoChild(@Param("keyType") Integer keyType, @Param("key") String key,
-			@Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
-			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source);
-
-	/**
-	 * 鏍规嵁鏉ユ簮绫诲瀷涓庤鍗曞彿鏌ヨ鍒楄〃
-	 * 
-	 * @param sourceType
-	 * @param orderNo
-	 * @return
-	 */
-	List<CommonOrder> listBySourceTypeAndOrderNo(@Param("sourceType") int sourceType, @Param("orderNo") String orderNo);
-
-	/**
-	 * 鏌ヨ鍒稿鍔遍噾棰濅互鍙婅鍗曚俊鎭�
-	 * 
-	 * @param uid
-	 * @param state
-	 * @param orderNo
-	 * @return
-	 */
-	List<CommonOrderVO> getCouponHongbaoByOrderNo(@Param("uid") Long uid, @Param("hongBaoState") Integer hongBaoState,
-			@Param("orderNo") String orderNo);
-
-	/**
-	 * 鏌ヨ鍒稿鍔遍噾棰濅互鍙婅鍗曚俊鎭�
-	 * 
-	 * @param uid
-	 * @param state
-	 * @param orderNo
-	 * @return
-	 */
-	CommonOrderVO getCommonOrderByOrderNo(@Param("uid") Long uid, @Param("orderNo") String orderNo,
-			@Param("orderState") Integer orderState, @Param("sourceType") Integer sourceType);
-
-	/**
-	 * 鏍规嵁鏉ユ簮鍜屼氦鏄揑D鑾峰彇璁㈠崟璇︽儏
-	 * 
-	 * @param sourceType
-	 * @param tradeId
-	 * @return
-	 */
-
-	CommonOrder selectBySourceTypeAndTradeId(@Param("sourceType") int sourceType, @Param("tradeId") String tradeId);
-
-	/**
-	 * 鏍规嵁鏉ユ簮鍜屼氦鏄揑D鑾峰彇璁㈠崟鍒楄〃
-	 * 
-	 * @param sourceType
-	 * @param tradeId
-	 * @return
-	 */
-	List<CommonOrder> listBySourceTypeAndTradeId(@Param("sourceType") int sourceType, @Param("tradeId") String tradeId);
-
-	/**
-	 * 
-	 * @param sourceType
-	 * @param state
-	 * @param minTime
-	 *            -鏈�澶у垱寤烘椂闂�
-	 * @param maxTime
-	 *            -鏈�灏忓垱寤烘椂闂�
-	 * @return
-	 */
-	List<CommonOrder> listBySourceTypeAndStateAndThirdCrateTime(@Param("sourceType") int sourceType,
-			@Param("state") Integer state, @Param("minTime") Long minTime, @Param("maxTime") Long maxTime,
-			@Param("start") long start, @Param("count") int count);
+package com.yeshi.fanli.dao.mybatis.order;
+
+import java.math.BigDecimal;
+import java.util.Date;
+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.order.CommonOrder;
+import com.yeshi.fanli.vo.order.CommonOrderVO;
+
+public interface CommonOrderMapper extends BaseMapper<CommonOrder> {
+
+	/**
+	 * 鏌ヨ鐢ㄦ埛璁㈠崟 骞惰鍗曞彿鍒嗙粍
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @return
+	 */
+
+	List<CommonOrderVO> listUserOrder(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
+			@Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
+			@Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime,
+			@Param("day") Integer day, @Param("source") Integer source);
+
+	/**
+	 * 缁熻鐢ㄦ埛璁㈠崟 骞惰鍗曞彿鍒嗙粍
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @return
+	 */
+	long countUserOrder(@Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type,
+			@Param("orderState") Integer orderState, @Param("orderNo") String orderNo,
+			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day,
+			@Param("source") Integer source);
+
+	/**
+	 * 鍒ゆ柇閮ㄥ垎澶辨晥鐘舵��
+	 * 
+	 * @param uid
+	 * @param orderNo
+	 * @return
+	 */
+	CommonOrderVO getBuFenOrderState(@Param("uid") Long uid, @Param("orderNo") String orderNo);
+
+	/**
+	 * 鏍规嵁鐢ㄦ埛ID锛岃鍗曠姸鎬佸拰璁㈠崟缁撶畻鏃堕棿缁熻璁㈠崟鐨勬暟閲�
+	 * 
+	 * @param uid
+	 * @param state
+	 * @param minDate
+	 * @param maxDate
+	 * @return
+	 */
+	long countByUidAndOrderStateWithOrderBalanceTime(@Param("uid") Long uid, @Param("state") int state,
+			@Param("minDate") Date minDate, @Param("maxDate") Date maxDate);
+
+	/**
+	 * 鏍规嵁璁㈠崟鍙枫�佽鍗曠被鍨嬫煡璇㈠晢鍝�
+	 * 
+	 * @param list
+	 *            璁㈠崟瀵硅薄
+	 * @return
+	 */
+	List<CommonOrderVO> listOrderGoodsInfo(List<CommonOrderVO> list);
+
+	/**
+	 * 缁熻鍘嗗彶璁㈠崟鏁伴噺
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	Map<String, BigDecimal> countHistoryOrder(@Param("uid") Long uid, @Param("day") Integer day,
+			@Param("source") Integer source);
+
+	/**
+	 * 鏄ㄦ棩鎬昏鍗�-鏍规嵁绾㈠寘绫诲瀷 鑷喘 閭�璇� 鍒嗕韩
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	Map<String, BigDecimal> countByUidAndOrderState(@Param("uid") Long uid, @Param("type") Integer type,
+			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day,
+			@Param("source") Integer source);
+
+	/**
+	 * 濂栭噾璁㈠崟鏁伴噺
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	long countBonusOrderNumber(@Param("uid") Long uid, @Param("type") Integer type, @Param("day") Integer day,
+			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source);
+
+	/**
+	 * 濂栭噾缁熻
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	BigDecimal countBonusOrderMoney(@Param("uid") Long uid, @Param("type") Integer type, @Param("day") Integer day,
+			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source);
+
+	/**
+	 * 濂栭噾缁熻
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	Map<String, Object> countBonusOrderMoneyAndNumber(@Param("uid") Long uid, @Param("type") Integer type,
+			@Param("day") Integer day, @Param("startTime") String startTime, @Param("endTime") String endTime,
+			@Param("source") Integer source);
+
+	int countByOrderNOAndOrderType(@Param("orderNO") String orderNO, @Param("orderType") int orderType);
+
+	/**
+	 * 鏍规嵁璁㈠崟鍙蜂笌璁㈠崟鎺掑簭鍊艰幏鍙栬鎯�
+	 * 
+	 * @param orderNo
+	 *            -璁㈠崟鍙�
+	 * @param orderBy
+	 *            -璁㈠崟鎺掑簭鍊�
+	 * @param orderType
+	 *            -璁㈠崟绫诲瀷
+	 * @return
+	 */
+	CommonOrder selectByOrderNoAndOrderTypeAndOrderBy(@Param("orderNo") String orderNo,
+			@Param("orderType") int orderType, @Param("orderBy") int orderBy);
+
+	/**
+	 * 璁㈠崟鍒楄〃鏌ヨ
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param state
+	 * @param type
+	 * @param orderState
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 */
+	List<CommonOrderVO> listQueryByUid(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
+			@Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
+			@Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime,
+			@Param("day") Integer day);
+
+	/**
+	 * 缁熻
+	 */
+	long countQueryByUid(@Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type,
+			@Param("orderState") Integer orderState, @Param("orderNo") String orderNo,
+			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day);
+
+	/**
+	 * 璁㈠崟鍒楄〃鏌ヨ
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param state
+	 * @param type
+	 * @param orderState
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 */
+	List<CommonOrderVO> listQuery(@Param("start") long start, @Param("count") int count,
+			@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
+			@Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
+			@Param("endTime") String endTime, @Param("source") Integer source);
+
+	/**
+	 * 璁㈠崟鍒楄〃鏌ヨ(涓嶅寘鍚瓙璁㈠崟)
+	 * 
+	 * @param start
+	 * @param count
+	 * @param keyType
+	 * @param key
+	 * @param state
+	 * @param type
+	 * @param orderState
+	 * @param startTime
+	 * @param endTime
+	 * @param source
+	 * @return
+	 */
+	List<CommonOrderVO> listQueryWithNoChild(@Param("start") long start, @Param("count") int count,
+			@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
+			@Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
+			@Param("endTime") String endTime, @Param("source") Integer source);
+
+	/**
+	 * 缁熻
+	 */
+	long countQuery(@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state,
+			@Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime,
+			@Param("endTime") String endTime, @Param("source") Integer source);
+
+	long countQueryWithNoChild(@Param("keyType") Integer keyType, @Param("key") String key,
+			@Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState,
+			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("source") Integer source);
+
+	/**
+	 * 鏍规嵁鏉ユ簮绫诲瀷涓庤鍗曞彿鏌ヨ鍒楄〃
+	 * 
+	 * @param sourceType
+	 * @param orderNo
+	 * @return
+	 */
+	List<CommonOrder> listBySourceTypeAndOrderNo(@Param("sourceType") int sourceType, @Param("orderNo") String orderNo);
+
+	/**
+	 * 鏌ヨ鍒稿鍔遍噾棰濅互鍙婅鍗曚俊鎭�
+	 * 
+	 * @param uid
+	 * @param state
+	 * @param orderNo
+	 * @return
+	 */
+	List<CommonOrderVO> getCouponHongbaoByOrderNo(@Param("uid") Long uid, @Param("hongBaoState") Integer hongBaoState,
+			@Param("orderNo") String orderNo);
+
+	/**
+	 * 鏌ヨ鍒稿鍔遍噾棰濅互鍙婅鍗曚俊鎭�
+	 * 
+	 * @param uid
+	 * @param state
+	 * @param orderNo
+	 * @return
+	 */
+	CommonOrderVO getCommonOrderByOrderNo(@Param("uid") Long uid, @Param("orderNo") String orderNo,
+			@Param("orderState") Integer orderState, @Param("sourceType") Integer sourceType);
+
+	/**
+	 * 鏍规嵁鏉ユ簮鍜屼氦鏄揑D鑾峰彇璁㈠崟璇︽儏
+	 * 
+	 * @param sourceType
+	 * @param tradeId
+	 * @return
+	 */
+
+	CommonOrder selectBySourceTypeAndTradeId(@Param("sourceType") int sourceType, @Param("tradeId") String tradeId);
+
+	/**
+	 * 鏍规嵁鏉ユ簮鍜屼氦鏄揑D鑾峰彇璁㈠崟鍒楄〃
+	 * 
+	 * @param sourceType
+	 * @param tradeId
+	 * @return
+	 */
+	List<CommonOrder> listBySourceTypeAndTradeId(@Param("sourceType") int sourceType, @Param("tradeId") String tradeId);
+
+	/**
+	 * 
+	 * @param sourceType
+	 * @param state
+	 * @param minTime
+	 *            -鏈�澶у垱寤烘椂闂�
+	 * @param maxTime
+	 *            -鏈�灏忓垱寤烘椂闂�
+	 * @return
+	 */
+	List<CommonOrder> listBySourceTypeAndStateAndThirdCrateTime(@Param("sourceType") int sourceType,
+			@Param("state") Integer state, @Param("minTime") Long minTime, @Param("maxTime") Long maxTime,
+			@Param("start") long start, @Param("count") int count);
+	
+	
+	/**
+	 * 鏍规嵁璁㈠崟鍙锋煡璇�
+	 * @param orderNO
+	 * @return
+	 */
+	List<CommonOrder> getByOrderNo(@Param("uid") Long uid, @Param("orderNo") String orderNo);
+
 }
\ No newline at end of file

--
Gitblit v1.8.0