|
@@ -11,6 +11,8 @@
|
|
|
<result column="coupon_id" jdbcType="INTEGER" property="couponId" />
|
|
<result column="coupon_id" jdbcType="INTEGER" property="couponId" />
|
|
|
<result column="status" jdbcType="SMALLINT" property="status" />
|
|
<result column="status" jdbcType="SMALLINT" property="status" />
|
|
|
<result column="used_time" jdbcType="TIMESTAMP" property="usedTime" />
|
|
<result column="used_time" jdbcType="TIMESTAMP" property="usedTime" />
|
|
|
|
|
+ <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
|
|
|
+ <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
|
|
<result column="order_id" jdbcType="INTEGER" property="orderId" />
|
|
<result column="order_id" jdbcType="INTEGER" property="orderId" />
|
|
|
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
|
|
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
@@ -87,7 +89,8 @@
|
|
|
WARNING - @mbg.generated
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
-->
|
|
-->
|
|
|
- id, user_id, coupon_id, `status`, used_time, order_id, add_time, update_time, deleted
|
|
|
|
|
|
|
+ id, user_id, coupon_id, `status`, used_time, start_time, end_time, order_id, add_time,
|
|
|
|
|
+ update_time, deleted
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallCouponUserExample" resultMap="BaseResultMap">
|
|
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallCouponUserExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
<!--
|
|
@@ -124,8 +127,8 @@
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
- id, user_id, coupon_id, `status`, used_time, order_id, add_time, update_time, deleted
|
|
|
|
|
-
|
|
|
|
|
|
|
+ id, user_id, coupon_id, `status`, used_time, start_time, end_time, order_id, add_time,
|
|
|
|
|
+ update_time, deleted
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
from litemall_coupon_user
|
|
from litemall_coupon_user
|
|
@@ -184,8 +187,8 @@
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
- id, user_id, coupon_id, `status`, used_time, order_id, add_time, update_time, deleted
|
|
|
|
|
-
|
|
|
|
|
|
|
+ id, user_id, coupon_id, `status`, used_time, start_time, end_time, order_id, add_time,
|
|
|
|
|
+ update_time, deleted
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
from litemall_coupon_user
|
|
from litemall_coupon_user
|
|
@@ -218,11 +221,13 @@
|
|
|
SELECT LAST_INSERT_ID()
|
|
SELECT LAST_INSERT_ID()
|
|
|
</selectKey>
|
|
</selectKey>
|
|
|
insert into litemall_coupon_user (user_id, coupon_id, `status`,
|
|
insert into litemall_coupon_user (user_id, coupon_id, `status`,
|
|
|
- used_time, order_id, add_time,
|
|
|
|
|
- update_time, deleted)
|
|
|
|
|
|
|
+ used_time, start_time, end_time,
|
|
|
|
|
+ order_id, add_time, update_time,
|
|
|
|
|
+ deleted)
|
|
|
values (#{userId,jdbcType=INTEGER}, #{couponId,jdbcType=INTEGER}, #{status,jdbcType=SMALLINT},
|
|
values (#{userId,jdbcType=INTEGER}, #{couponId,jdbcType=INTEGER}, #{status,jdbcType=SMALLINT},
|
|
|
- #{usedTime,jdbcType=TIMESTAMP}, #{orderId,jdbcType=INTEGER}, #{addTime,jdbcType=TIMESTAMP},
|
|
|
|
|
- #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT})
|
|
|
|
|
|
|
+ #{usedTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{orderId,jdbcType=INTEGER}, #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ #{deleted,jdbcType=BIT})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallCouponUser">
|
|
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallCouponUser">
|
|
|
<!--
|
|
<!--
|
|
@@ -246,6 +251,12 @@
|
|
|
<if test="usedTime != null">
|
|
<if test="usedTime != null">
|
|
|
used_time,
|
|
used_time,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ start_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ end_time,
|
|
|
|
|
+ </if>
|
|
|
<if test="orderId != null">
|
|
<if test="orderId != null">
|
|
|
order_id,
|
|
order_id,
|
|
|
</if>
|
|
</if>
|
|
@@ -272,6 +283,12 @@
|
|
|
<if test="usedTime != null">
|
|
<if test="usedTime != null">
|
|
|
#{usedTime,jdbcType=TIMESTAMP},
|
|
#{usedTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
<if test="orderId != null">
|
|
<if test="orderId != null">
|
|
|
#{orderId,jdbcType=INTEGER},
|
|
#{orderId,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
@@ -318,6 +335,12 @@
|
|
|
<if test="record.usedTime != null">
|
|
<if test="record.usedTime != null">
|
|
|
used_time = #{record.usedTime,jdbcType=TIMESTAMP},
|
|
used_time = #{record.usedTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="record.startTime != null">
|
|
|
|
|
+ start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.endTime != null">
|
|
|
|
|
+ end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
<if test="record.orderId != null">
|
|
<if test="record.orderId != null">
|
|
|
order_id = #{record.orderId,jdbcType=INTEGER},
|
|
order_id = #{record.orderId,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
@@ -346,6 +369,8 @@
|
|
|
coupon_id = #{record.couponId,jdbcType=INTEGER},
|
|
coupon_id = #{record.couponId,jdbcType=INTEGER},
|
|
|
`status` = #{record.status,jdbcType=SMALLINT},
|
|
`status` = #{record.status,jdbcType=SMALLINT},
|
|
|
used_time = #{record.usedTime,jdbcType=TIMESTAMP},
|
|
used_time = #{record.usedTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
|
|
order_id = #{record.orderId,jdbcType=INTEGER},
|
|
order_id = #{record.orderId,jdbcType=INTEGER},
|
|
|
add_time = #{record.addTime,jdbcType=TIMESTAMP},
|
|
add_time = #{record.addTime,jdbcType=TIMESTAMP},
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
@@ -373,6 +398,12 @@
|
|
|
<if test="usedTime != null">
|
|
<if test="usedTime != null">
|
|
|
used_time = #{usedTime,jdbcType=TIMESTAMP},
|
|
used_time = #{usedTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="startTime != null">
|
|
|
|
|
+ start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
<if test="orderId != null">
|
|
<if test="orderId != null">
|
|
|
order_id = #{orderId,jdbcType=INTEGER},
|
|
order_id = #{orderId,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
@@ -398,6 +429,8 @@
|
|
|
coupon_id = #{couponId,jdbcType=INTEGER},
|
|
coupon_id = #{couponId,jdbcType=INTEGER},
|
|
|
`status` = #{status,jdbcType=SMALLINT},
|
|
`status` = #{status,jdbcType=SMALLINT},
|
|
|
used_time = #{usedTime,jdbcType=TIMESTAMP},
|
|
used_time = #{usedTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
order_id = #{orderId,jdbcType=INTEGER},
|
|
order_id = #{orderId,jdbcType=INTEGER},
|
|
|
add_time = #{addTime,jdbcType=TIMESTAMP},
|
|
add_time = #{addTime,jdbcType=TIMESTAMP},
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
@@ -435,8 +468,8 @@
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</when>
|
|
</when>
|
|
|
<otherwise>
|
|
<otherwise>
|
|
|
- id, user_id, coupon_id, `status`, used_time, order_id, add_time, update_time, deleted
|
|
|
|
|
-
|
|
|
|
|
|
|
+ id, user_id, coupon_id, `status`, used_time, start_time, end_time, order_id, add_time,
|
|
|
|
|
+ update_time, deleted
|
|
|
</otherwise>
|
|
</otherwise>
|
|
|
</choose>
|
|
</choose>
|
|
|
from litemall_coupon_user
|
|
from litemall_coupon_user
|