|
@@ -9,11 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="userId" column="user_id" />
|
|
|
<result property="cardId" column="card_id" />
|
|
|
<result property="cardName" column="card_name" />
|
|
|
- <result property="price" column="price" />
|
|
|
- <result property="paymentTime" column="payment_time" />
|
|
|
- <result property="refundTime" column="refund_time" />
|
|
|
+ <result property="time" column="time" />
|
|
|
<result property="paymentWay" column="payment_way" />
|
|
|
- <result property="state" column="state" />
|
|
|
+ <result property="type" column="type" />
|
|
|
<result property="notes" column="notes" />
|
|
|
<result property="version" column="version" />
|
|
|
<result property="createBy" column="create_by" />
|
|
@@ -23,14 +21,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="userName" column="username" />
|
|
|
<result property="realName" column="real_name" />
|
|
|
<result property="mobile" column="mobile" />
|
|
|
+ <result property="cardType" column="card_type" />
|
|
|
+ <result property="totalNumber" column="total_number" />
|
|
|
+ <result property="memberPrice" column="member_price" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectCardPurchaseRecordVo">
|
|
|
- select a.id, a.user_id, a.card_id, a.card_name, a.price, a.payment_time, a.refund_time, a.payment_way, a.state, a.notes, a.version, a.create_by, a.create_time, a.update_by, a.update_time from card_purchase_record a
|
|
|
+ select a.id, a.user_id, a.card_id, a.card_name,a.card_type, a.total_number, a.member_price, a.time, a.payment_way, a.type, a.notes, a.version, a.create_by, a.create_time, a.update_by, a.update_time from card_purchase_record a
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectCardPurchaseRecordList" parameterType="CardPurchaseRecord" resultMap="CardPurchaseRecordResult">
|
|
|
- select a.id, a.user_id, a.card_id, a.card_name, a.price, a.payment_time, a.refund_time, a.payment_way, a.state, a.notes, a.version, a.create_by, a.create_time, a.update_by, a.update_time,
|
|
|
+ select a.id, a.user_id, a.card_id, a.card_name,a.card_type, a.total_number, a.member_price, a.time, a.payment_way, a.type, a.notes, a.version, a.create_by, a.create_time, a.update_by, a.update_time,
|
|
|
b.username,b.real_name,b.mobile
|
|
|
from card_purchase_record a
|
|
|
left join sys_member b on a.user_id = b.id
|
|
@@ -38,11 +39,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
|
|
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
|
|
|
<if test="cardName != null and cardName != ''"> and card_name like concat('%', #{cardName}, '%')</if>
|
|
|
- <if test="price != null "> and price = #{price}</if>
|
|
|
- <if test="paymentTime != null "> and payment_time = #{paymentTime}</if>
|
|
|
- <if test="refundTime != null "> and refund_time = #{refundTime}</if>
|
|
|
+ <if test="memberPrice != null "> and member_price = #{memberPrice}</if>
|
|
|
+ <if test="time != null "> and time = #{time}</if>
|
|
|
<if test="paymentWay != null and paymentWay != ''"> and payment_way = #{paymentWay}</if>
|
|
|
- <if test="state != null and state != ''"> and state = #{state}</if>
|
|
|
+ <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
<if test="notes != null and notes != ''"> and notes = #{notes}</if>
|
|
|
<if test="version != null and version != ''"> and version = #{version}</if>
|
|
|
<if test="realName != null and realName != ''"> and b.real_name like concat('%', #{realName}, '%')</if>
|
|
@@ -56,18 +56,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
- <insert id="insertCardPurchaseRecord" parameterType="CardPurchaseRecord">
|
|
|
+ <insert id="insertCardPurchaseRecord" parameterType="CardPurchaseRecord" keyProperty="id" useGeneratedKeys="true">
|
|
|
insert into card_purchase_record
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">id,</if>
|
|
|
<if test="userId != null">user_id,</if>
|
|
|
<if test="cardId != null">card_id,</if>
|
|
|
<if test="cardName != null">card_name,</if>
|
|
|
- <if test="price != null">price,</if>
|
|
|
- <if test="paymentTime != null">payment_time,</if>
|
|
|
- <if test="refundTime != null">refund_time,</if>
|
|
|
+ <if test="cardType != null">card_type,</if>
|
|
|
+ <if test="totalNumber != null">total_number,</if>
|
|
|
+ <if test="originalPrice != null">original_price,</if>
|
|
|
+ <if test="memberPrice != null">member_price,</if>
|
|
|
+ <if test="point != null">point,</if>
|
|
|
+ <if test="time != null">time,</if>
|
|
|
<if test="paymentWay != null">payment_way,</if>
|
|
|
- <if test="state != null">state,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
<if test="notes != null">notes,</if>
|
|
|
<if test="version != null">version,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
@@ -80,11 +83,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
<if test="cardId != null">#{cardId},</if>
|
|
|
<if test="cardName != null">#{cardName},</if>
|
|
|
- <if test="price != null">#{price},</if>
|
|
|
- <if test="paymentTime != null">#{paymentTime},</if>
|
|
|
- <if test="refundTime != null">#{refundTime},</if>
|
|
|
+ <if test="cardType != null">#{cardType},</if>
|
|
|
+ <if test="totalNumber != null">#{totalNumber},</if>
|
|
|
+ <if test="originalPrice != null">#{originalPrice},</if>
|
|
|
+ <if test="memberPrice != null">#{memberPrice},</if>
|
|
|
+ <if test="point != null">#{point},</if>
|
|
|
+ <if test="time != null">#{time},</if>
|
|
|
<if test="paymentWay != null">#{paymentWay},</if>
|
|
|
- <if test="state != null">#{state},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
<if test="notes != null">#{notes},</if>
|
|
|
<if test="version != null">#{version},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
@@ -100,11 +106,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="cardId != null">card_id = #{cardId},</if>
|
|
|
<if test="cardName != null">card_name = #{cardName},</if>
|
|
|
- <if test="price != null">price = #{price},</if>
|
|
|
- <if test="paymentTime != null">payment_time = #{paymentTime},</if>
|
|
|
- <if test="refundTime != null">refund_time = #{refundTime},</if>
|
|
|
+ <if test="cardType != null">card_type = #{cardType},</if>
|
|
|
+ <if test="totalNumber != null">total_number = #{totalNumber},</if>
|
|
|
+ <if test="memberPrice != null">member_price = #{memberPrice},</if>
|
|
|
+ <if test="time != null">time = #{time},</if>
|
|
|
<if test="paymentWay != null">payment_way = #{paymentWay},</if>
|
|
|
- <if test="state != null">state = #{state},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
<if test="notes != null">notes = #{notes},</if>
|
|
|
<if test="version != null">version = #{version},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|