|
@@ -4,7 +4,7 @@
|
|
|
<resultMap id="BaseResultMap" type="cn.kdan.pdf.backend.core.model.Subscriptions">
|
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
|
|
|
- <result column="target_tpe" jdbcType="VARCHAR" property="targetTpe" />
|
|
|
+ <result column="target_type" jdbcType="VARCHAR" property="targetType" />
|
|
|
<result column="target_id" jdbcType="INTEGER" property="targetId" />
|
|
|
<result column="price" jdbcType="REAL" property="price" />
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
@@ -78,7 +78,7 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, member_id, target_tpe, target_id, price, `status`, start_date, end_date, created_at,
|
|
|
+ id, member_id, target_type, target_id, price, `status`, start_date, end_date, created_at,
|
|
|
updated_at, deleted_at, total_points, total_period, pricing_discount_id, payment,
|
|
|
member_referral_id
|
|
|
</sql>
|
|
@@ -113,13 +113,13 @@
|
|
|
</if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="cn.kdan.pdf.backend.core.model.Subscriptions">
|
|
|
- insert into subscriptions (id, member_id, target_tpe,
|
|
|
+ insert into subscriptions (id, member_id, target_type,
|
|
|
target_id, price, `status`,
|
|
|
start_date, end_date, created_at,
|
|
|
updated_at, deleted_at, total_points,
|
|
|
total_period, pricing_discount_id, payment,
|
|
|
member_referral_id)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{targetTpe,jdbcType=VARCHAR},
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR}, #{targetType,jdbcType=VARCHAR},
|
|
|
#{targetId,jdbcType=INTEGER}, #{price,jdbcType=REAL}, #{status,jdbcType=INTEGER},
|
|
|
#{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}, #{createdAt,jdbcType=TIMESTAMP},
|
|
|
#{updatedAt,jdbcType=TIMESTAMP}, #{deletedAt,jdbcType=TIMESTAMP}, #{totalPoints,jdbcType=INTEGER},
|
|
@@ -135,8 +135,8 @@
|
|
|
<if test="memberId != null">
|
|
|
member_id,
|
|
|
</if>
|
|
|
- <if test="targetTpe != null">
|
|
|
- target_tpe,
|
|
|
+ <if test="targetType != null">
|
|
|
+ target_type,
|
|
|
</if>
|
|
|
<if test="targetId != null">
|
|
|
target_id,
|
|
@@ -185,8 +185,8 @@
|
|
|
<if test="memberId != null">
|
|
|
#{memberId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="targetTpe != null">
|
|
|
- #{targetTpe,jdbcType=VARCHAR},
|
|
|
+ <if test="targetType != null">
|
|
|
+ #{targetType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="targetId != null">
|
|
|
#{targetId,jdbcType=INTEGER},
|
|
@@ -244,8 +244,8 @@
|
|
|
<if test="record.memberId != null">
|
|
|
member_id = #{record.memberId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.targetTpe != null">
|
|
|
- target_tpe = #{record.targetTpe,jdbcType=VARCHAR},
|
|
|
+ <if test="record.targetType != null">
|
|
|
+ target_type = #{record.targetType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="record.targetId != null">
|
|
|
target_id = #{record.targetId,jdbcType=INTEGER},
|
|
@@ -295,7 +295,7 @@
|
|
|
update subscriptions
|
|
|
set id = #{record.id,jdbcType=VARCHAR},
|
|
|
member_id = #{record.memberId,jdbcType=VARCHAR},
|
|
|
- target_tpe = #{record.targetTpe,jdbcType=VARCHAR},
|
|
|
+ target_type = #{record.targetType,jdbcType=VARCHAR},
|
|
|
target_id = #{record.targetId,jdbcType=INTEGER},
|
|
|
price = #{record.price,jdbcType=REAL},
|
|
|
`status` = #{record.status,jdbcType=INTEGER},
|
|
@@ -319,8 +319,8 @@
|
|
|
<if test="memberId != null">
|
|
|
member_id = #{memberId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="targetTpe != null">
|
|
|
- target_tpe = #{targetTpe,jdbcType=VARCHAR},
|
|
|
+ <if test="targetType != null">
|
|
|
+ target_type = #{targetType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="targetId != null">
|
|
|
target_id = #{targetId,jdbcType=INTEGER},
|
|
@@ -367,7 +367,7 @@
|
|
|
<update id="updateByPrimaryKey" parameterType="cn.kdan.pdf.backend.core.model.Subscriptions">
|
|
|
update subscriptions
|
|
|
set member_id = #{memberId,jdbcType=VARCHAR},
|
|
|
- target_tpe = #{targetTpe,jdbcType=VARCHAR},
|
|
|
+ target_type = #{targetType,jdbcType=VARCHAR},
|
|
|
target_id = #{targetId,jdbcType=INTEGER},
|
|
|
price = #{price,jdbcType=REAL},
|
|
|
`status` = #{status,jdbcType=INTEGER},
|