|
@@ -33,12 +33,11 @@
|
|
WHERE
|
|
WHERE
|
|
mobile = #{mobile}
|
|
mobile = #{mobile}
|
|
</select>
|
|
</select>
|
|
- <select id="getCurrentCouponIds" resultType="java.lang.String">
|
|
|
|
- select group_concat(id)
|
|
|
|
|
|
+ <select id="getCurrentCouponIds" resultType="java.lang.Integer">
|
|
|
|
+ select id
|
|
from cm_hehe_coupon
|
|
from cm_hehe_coupon
|
|
where couponType = #{couponType} and if(startNowFlag = 1,true, NOW() <![CDATA[ >= ]]> startTime )
|
|
where couponType = #{couponType} and if(startNowFlag = 1,true, NOW() <![CDATA[ >= ]]> startTime )
|
|
and if(permanentFlag = 1,true,NOW() <![CDATA[ <= ]]> endTime) and delFlag = 0
|
|
and if(permanentFlag = 1,true,NOW() <![CDATA[ <= ]]> endTime) and delFlag = 0
|
|
- group by couponType
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="updateHeHeUser">
|
|
<update id="updateHeHeUser">
|
|
@@ -75,8 +74,8 @@
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertCouponShare">
|
|
<insert id="insertCouponShare">
|
|
- insert into cm_hehe_coupon_share (shareUserId, receiveUserId, shareCouponIds,createTime)
|
|
|
|
- values (#{shareUserId}, #{receiveUserId}, #{shareCouponIds},NOW())
|
|
|
|
|
|
+ insert into cm_hehe_coupon_share (shareUserId, receiveUserId, shareCouponId, type, createTime)
|
|
|
|
+ values (#{shareUserId}, #{receiveUserId}, #{shareCouponId}, 1, NOW())
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|