...
|
...
|
@@ -88,6 +88,20 @@ |
|
|
#{orderCode,jdbcType=BIGINT}, #{useTime,jdbcType=INTEGER}, #{startTime,jdbcType=INTEGER},
|
|
|
#{endTime,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{couponToken,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
<insert id="insertWhere" parameterType="com.yohoufo.dal.promotion.model.UserCoupon" >
|
|
|
insert into user_coupon (id, uid, coupon_id,
|
|
|
coupon_type, coupon_code, status,
|
|
|
order_code, use_time, start_time,
|
|
|
end_time, create_time,coupon_token)
|
|
|
select #{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{couponId,jdbcType=INTEGER},
|
|
|
#{couponType,jdbcType=INTEGER}, #{couponCode,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
|
|
#{orderCode,jdbcType=BIGINT}, #{useTime,jdbcType=INTEGER}, #{startTime,jdbcType=INTEGER},
|
|
|
#{endTime,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{couponToken,jdbcType=VARCHAR} from user_coupon
|
|
|
where not EXISTS (select 1 from user_coupon where uid=#{uid,jdbcType=INTEGER} and coupon_token=#{couponToken,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertSelective" parameterType="com.yohoufo.dal.promotion.model.UserCoupon" >
|
|
|
insert into user_coupon
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
...
|
...
|
|