|
@@ -336,6 +336,63 @@
|
|
|
</where>
|
|
|
</update>
|
|
|
|
|
|
+ <!-- 更新用户订单信息-->
|
|
|
+ <update id="updateCouponUserInfo" parameterType="com.platform.yijia.pojo.UserCoupon">
|
|
|
+ UPDATE coupon_user
|
|
|
+ <set>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="couponIsUsed != null">
|
|
|
+ coupon_is_used = #{couponIsUsed},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <where>
|
|
|
+ <if test="unionId !=null and unionId !=''">
|
|
|
+ union_id = #{unionId}
|
|
|
+ </if>
|
|
|
+ <if test="stationId !=null">
|
|
|
+ AND station_id = #{stationId}
|
|
|
+ </if>
|
|
|
+ <if test="couponIsUsed !=null and couponIsUsed !=''">
|
|
|
+ AND coupon_is_used = #{couponIsUsed}
|
|
|
+ </if>
|
|
|
+ <if test="couponNo !=null and couponNo !=''">
|
|
|
+ AND coupon_no = #{couponNo}
|
|
|
+ </if>
|
|
|
+ <if test="id !=null">
|
|
|
+ AND id = #{id}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--新增用户进入领取页面的次数-->
|
|
|
+ <insert id="addCouponVerificationRecord" parameterType="com.platform.yijia.pojo.CouponVerification" >
|
|
|
+ INSERT INTO coupon_verification_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="couponUserId !=null">
|
|
|
+ coupon_user_id,
|
|
|
+ </if>
|
|
|
+ <if test="verification !=null">
|
|
|
+ verification,
|
|
|
+ </if>
|
|
|
+ <if test="createTime !=null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="couponUserId !=null">
|
|
|
+ #{couponUserId},
|
|
|
+ </if>
|
|
|
+ <if test="verification !=null">
|
|
|
+ #{verification},
|
|
|
+ </if>
|
|
|
+ <if test="createTime !=null">
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
<!--新增用户进入领取页面的次数-->
|
|
|
<insert id="addCouponUserGiveCount" parameterType="com.platform.yijia.pojo.CouponUserGiveCount" >
|
|
|
INSERT INTO coupon_user_give_count
|
|
@@ -393,6 +450,9 @@
|
|
|
<if test="id !=null">
|
|
|
T1.id = #{id}
|
|
|
</if>
|
|
|
+ <if test="couponNo !=null">
|
|
|
+ T1.coupon_no = #{couponNo}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|