From 4bfa8875c0fce82200c08d8e16532b16e2e29056 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期三, 27 二月 2019 11:28:16 +0800
Subject: [PATCH] 券消息+过期+ 退回

---
 fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponRecordMapper.xml |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponRecordMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponRecordMapper.xml
index b5bd520..315a580 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponRecordMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponRecordMapper.xml
@@ -77,4 +77,11 @@
 			separator=",">#{item}</foreach>
   </select>
   
+  <select id="getCouponByUsingTimeOut" resultMap="BaseResultMap">
+ 	SELECT * FROM `yeshi_ec_user_system_coupon` cp
+	LEFT JOIN `yeshi_ec_user_system_coupon_record` rd ON rd.`ucr_user_coupon_id` = cp.`usc_id`
+	WHERE cp.`usc_uid` = #{uid} AND cp.`usc_state` = 2 AND rd.`ucr_state` = 0
+		  AND UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(cp.`usc_use_time`) > #{seconds} ;銆�
+  </select>
+  
 </mapper>

--
Gitblit v1.8.0