update 测试会员钱包流水导出

This commit is contained in:
YAS\29473
2025-08-15 13:22:20 +08:00
parent af92176bbf
commit c4055497a8
6 changed files with 172 additions and 20 deletions

View File

@@ -20,12 +20,12 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, member_id, wallet_code, `type`, sub_type, amount, category, related_order_code,
id, member_id, wallet_code, `type`, sub_type, amount, category, related_order_code,
before_amount, after_amount, remark, create_by, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
select
<include refid="Base_Column_List" />
from member_wallet_log
where id = #{id,jdbcType=INTEGER}
@@ -37,14 +37,14 @@
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into member_wallet_log (member_id, wallet_code, `type`,
sub_type, amount, category,
related_order_code, before_amount, after_amount,
insert into member_wallet_log (member_id, wallet_code, `type`,
sub_type, amount, category,
related_order_code, before_amount, after_amount,
remark, create_by, create_time
)
values (#{memberId,jdbcType=VARCHAR}, #{walletCode,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{subType,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{category,jdbcType=CHAR},
#{relatedOrderCode,jdbcType=VARCHAR}, #{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL},
values (#{memberId,jdbcType=VARCHAR}, #{walletCode,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{subType,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{category,jdbcType=CHAR},
#{relatedOrderCode,jdbcType=VARCHAR}, #{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL},
#{remark,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
@@ -355,14 +355,14 @@
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into member_wallet_log
(member_id, wallet_code, `type`, sub_type, amount, category, related_order_code,
(member_id, wallet_code, `type`, sub_type, amount, category, related_order_code,
before_amount, after_amount, remark, create_by, create_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.memberId,jdbcType=VARCHAR}, #{item.walletCode,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR},
#{item.subType,jdbcType=VARCHAR}, #{item.amount,jdbcType=DECIMAL}, #{item.category,jdbcType=CHAR},
#{item.relatedOrderCode,jdbcType=VARCHAR}, #{item.beforeAmount,jdbcType=DECIMAL},
#{item.afterAmount,jdbcType=DECIMAL}, #{item.remark,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
(#{item.memberId,jdbcType=VARCHAR}, #{item.walletCode,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR},
#{item.subType,jdbcType=VARCHAR}, #{item.amount,jdbcType=DECIMAL}, #{item.category,jdbcType=CHAR},
#{item.relatedOrderCode,jdbcType=VARCHAR}, #{item.beforeAmount,jdbcType=DECIMAL},
#{item.afterAmount,jdbcType=DECIMAL}, #{item.remark,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
@@ -404,7 +404,7 @@
#{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
</trim>
on duplicate key update
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
@@ -509,7 +509,7 @@
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
on duplicate key update
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
@@ -651,4 +651,26 @@
where related_order_code = #{orderCode,jdbcType=VARCHAR}
and type = #{type,jdbcType=VARCHAR}
</select>
</mapper>
<select id="getByMemberId" resultType="com.jsowell.pile.vo.MemberWalletLogVO2">
SELECT
member_id AS memberId,
type,
wallet_code AS walletCode,
sub_type AS subType,
create_by AS createBy,
amount,
create_time AS transactionTime,
create_time AS createTime,
category,
related_order_code AS relatedOrderCode,
before_amount AS beforeAmount,
after_amount AS afterAmount
FROM member_wallet_log
where
<if test="memberId != null and memberId != ''">
member_id = #{memberId,jdbcType=VARCHAR}
</if>
</select>
</mapper>