From fb5a8918a7983bbdf83586f773884d3961bb3c6d Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期五, 16 八月 2019 17:50:56 +0800
Subject: [PATCH] 口令领取+消息

---
 fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponGiveRecordMapper.xml |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponGiveRecordMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponGiveRecordMapper.xml
index 57dec32..5f3dfc0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponGiveRecordMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponGiveRecordMapper.xml
@@ -6,45 +6,49 @@
     <id column="cgr_id" property="id" jdbcType="BIGINT"/>
     <result column="cgr_coupon_id" property="couponId" jdbcType="BIGINT"/>
     <result column="cgr_give_uid" property="giveUid" jdbcType="BIGINT"/>
-    <result column="cgr_receive_uid" property="receiveUid" jdbcType="BIGINT"/>
     <result column="cgr_give_time" property="giveTime" jdbcType="TIMESTAMP"/>
+    <result column="cgr_end_time" property="endTime" jdbcType="TIMESTAMP"/>
+    <result column="cgr_receive_uid" property="receiveUid" jdbcType="BIGINT"/>
     <result column="cgr_receive_time" property="receiveTime" jdbcType="TIMESTAMP"/>
   </resultMap>
-  <sql id="Base_Column_List">cgr_id,cgr_coupon_id,cgr_give_uid,cgr_receive_uid,cgr_give_time,cgr_receive_time</sql>
+  <sql id="Base_Column_List">cgr_id,cgr_coupon_id,cgr_give_uid,cgr_give_time,cgr_end_time,cgr_receive_uid,cgr_receive_time</sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
     <include refid="Base_Column_List"/>from yeshi_ec_user_system_coupon_give_record where cgr_id = #{id,jdbcType=BIGINT}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_system_coupon_give_record where cgr_id = #{id,jdbcType=BIGINT}</delete>
-  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_system_coupon_give_record (cgr_id,cgr_coupon_id,cgr_give_uid,cgr_receive_uid,cgr_give_time,cgr_receive_time) values (#{id,jdbcType=BIGINT},#{couponId,jdbcType=BIGINT},#{giveUid,jdbcType=BIGINT},#{receiveUid,jdbcType=BIGINT},#{giveTime,jdbcType=TIMESTAMP},#{receiveTime,jdbcType=TIMESTAMP})</insert>
+  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_system_coupon_give_record (cgr_id,cgr_coupon_id,cgr_give_uid,cgr_give_time,cgr_end_time,cgr_receive_uid,cgr_receive_time) values (#{id,jdbcType=BIGINT},#{couponId,jdbcType=BIGINT},#{giveUid,jdbcType=BIGINT},#{giveTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{receiveUid,jdbcType=BIGINT},#{receiveTime,jdbcType=TIMESTAMP})</insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_system_coupon_give_record
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">cgr_id,</if>
       <if test="couponId != null">cgr_coupon_id,</if>
       <if test="giveUid != null">cgr_give_uid,</if>
-      <if test="receiveUid != null">cgr_receive_uid,</if>
       <if test="giveTime != null">cgr_give_time,</if>
+      <if test="endTime != null">cgr_end_time,</if>
+      <if test="receiveUid != null">cgr_receive_uid,</if>
       <if test="receiveTime != null">cgr_receive_time,</if>
     </trim>values
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">#{id,jdbcType=BIGINT},</if>
       <if test="couponId != null">#{couponId,jdbcType=BIGINT},</if>
       <if test="giveUid != null">#{giveUid,jdbcType=BIGINT},</if>
-      <if test="receiveUid != null">#{receiveUid,jdbcType=BIGINT},</if>
       <if test="giveTime != null">#{giveTime,jdbcType=TIMESTAMP},</if>
+      <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
+      <if test="receiveUid != null">#{receiveUid,jdbcType=BIGINT},</if>
       <if test="receiveTime != null">#{receiveTime,jdbcType=TIMESTAMP},</if>
     </trim>
   </insert>
-  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord">update yeshi_ec_user_system_coupon_give_record set cgr_coupon_id = #{couponId,jdbcType=BIGINT},cgr_give_uid = #{giveUid,jdbcType=BIGINT},cgr_receive_uid = #{receiveUid,jdbcType=BIGINT},cgr_give_time = #{giveTime,jdbcType=TIMESTAMP},cgr_receive_time = #{receiveTime,jdbcType=TIMESTAMP} where cgr_id = #{id,jdbcType=BIGINT}</update>
+  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord">update yeshi_ec_user_system_coupon_give_record set cgr_coupon_id = #{couponId,jdbcType=BIGINT},cgr_give_uid = #{giveUid,jdbcType=BIGINT},cgr_give_time = #{giveTime,jdbcType=TIMESTAMP},cgr_end_time = #{endTime,jdbcType=TIMESTAMP},cgr_receive_uid = #{receiveUid,jdbcType=BIGINT},cgr_receive_time = #{receiveTime,jdbcType=TIMESTAMP} where cgr_id = #{id,jdbcType=BIGINT}</update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord">update yeshi_ec_user_system_coupon_give_record
     <set>
       <if test="couponId != null">cgr_coupon_id=#{couponId,jdbcType=BIGINT},</if>
       <if test="giveUid != null">cgr_give_uid=#{giveUid,jdbcType=BIGINT},</if>
-      <if test="receiveUid != null">cgr_receive_uid=#{receiveUid,jdbcType=BIGINT},</if>
       <if test="giveTime != null">cgr_give_time=#{giveTime,jdbcType=TIMESTAMP},</if>
+      <if test="endTime != null">cgr_end_time=#{endTime,jdbcType=TIMESTAMP},</if>
+      <if test="receiveUid != null">cgr_receive_uid=#{receiveUid,jdbcType=BIGINT},</if>
       <if test="receiveTime != null">cgr_receive_time=#{receiveTime,jdbcType=TIMESTAMP},</if>
     </set> where cgr_id = #{id,jdbcType=BIGINT}
   </update>
-  <select id="getRecordByUidAndCouponId">
+   <select id="getRecordByUidAndCouponId">
     SELECT * FROM yeshi_ec_user_system_coupon_give_record
 	WHERE cgr_give_uid = #{uid} AND  cgr_coupon_id = #{couponId}
 	LIMIT 1 

--
Gitblit v1.8.0