新增钱包编号字段

This commit is contained in:
2023-11-08 15:58:24 +08:00
parent 714f3e41d7
commit 968e48ba18
3 changed files with 423 additions and 483 deletions

View File

@@ -27,6 +27,11 @@ public class MemberWalletLog {
*/ */
private String memberId; private String memberId;
/**
* 钱包编号
*/
private String walletCode;
/** /**
* 类型1-进账2-出账) * 类型1-进账2-出账)
*/ */

View File

@@ -63,10 +63,10 @@ public interface MemberWalletLogMapper {
int updateBatch(List<MemberWalletLog> list); int updateBatch(List<MemberWalletLog> list);
int updateBatchSelective(List<MemberWalletLog> list);
int batchInsert(@Param("list") List<MemberWalletLog> list); int batchInsert(@Param("list") List<MemberWalletLog> list);
int updateBatchSelective(List<MemberWalletLog> list);
/** /**
* 查询用户账户余额变动信息 * 查询用户账户余额变动信息
* *

View File

@@ -1,498 +1,433 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsowell.pile.mapper.MemberWalletLogMapper"> <mapper namespace="com.jsowell.pile.mapper.MemberWalletLogMapper">
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.MemberWalletLog"> <resultMap id="BaseResultMap" type="com.jsowell.pile.domain.MemberWalletLog">
<!--@mbg.generated--> <!--@mbg.generated-->
<!--@Table member_wallet_log--> <!--@Table member_wallet_log-->
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id" />
<result column="member_id" jdbcType="VARCHAR" property="memberId"/> <result column="member_id" jdbcType="VARCHAR" property="memberId" />
<result column="type" jdbcType="VARCHAR" property="type"/> <result column="wallet_code" jdbcType="VARCHAR" property="walletCode" />
<result column="sub_type" jdbcType="VARCHAR" property="subType"/> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="amount" jdbcType="DECIMAL" property="amount"/> <result column="sub_type" jdbcType="VARCHAR" property="subType" />
<result column="category" jdbcType="CHAR" property="category"/> <result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="related_order_code" jdbcType="VARCHAR" property="relatedOrderCode"/> <result column="category" jdbcType="CHAR" property="category" />
<result column="before_amount" jdbcType="DECIMAL" property="beforeAmount"/> <result column="related_order_code" jdbcType="VARCHAR" property="relatedOrderCode" />
<result column="after_amount" jdbcType="DECIMAL" property="afterAmount"/> <result column="before_amount" jdbcType="DECIMAL" property="beforeAmount" />
<result column="create_by" jdbcType="VARCHAR" property="createBy"/> <result column="after_amount" jdbcType="DECIMAL" property="afterAmount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_by" jdbcType="VARCHAR" property="createBy" />
</resultMap> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<sql id="Base_Column_List"> </resultMap>
<!--@mbg.generated--> <sql id="Base_Column_List">
id, <!--@mbg.generated-->
id, member_id, wallet_code, `type`, sub_type, amount, category, related_order_code,
before_amount, after_amount, create_by, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from member_wallet_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from member_wallet_log
where id = #{id,jdbcType=INTEGER}
</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,
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},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into member_wallet_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="memberId != null">
member_id, member_id,
</if>
<if test="walletCode != null">
wallet_code,
</if>
<if test="type != null">
`type`, `type`,
</if>
<if test="subType != null">
sub_type, sub_type,
</if>
<if test="amount != null">
amount, amount,
</if>
<if test="category != null">
category, category,
</if>
<if test="relatedOrderCode != null">
related_order_code, related_order_code,
</if>
<if test="beforeAmount != null">
before_amount, before_amount,
</if>
<if test="afterAmount != null">
after_amount, after_amount,
</if>
<if test="createBy != null">
create_by, create_by,
create_time </if>
</sql> <if test="createTime != null">
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> create_time,
<!--@mbg.generated--> </if>
select </trim>
<include refid="Base_Column_List"/> <trim prefix="values (" suffix=")" suffixOverrides=",">
from member_wallet_log <if test="memberId != null">
where id = #{id,jdbcType=INTEGER} #{memberId,jdbcType=VARCHAR},
</select> </if>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <if test="walletCode != null">
<!--@mbg.generated--> #{walletCode,jdbcType=VARCHAR},
delete </if>
from member_wallet_log <if test="type != null">
where id = #{id,jdbcType=INTEGER} #{type,jdbcType=VARCHAR},
</delete> </if>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" <if test="subType != null">
useGeneratedKeys="true"> #{subType,jdbcType=VARCHAR},
<!--@mbg.generated--> </if>
insert into member_wallet_log (member_id, `type`, sub_type, <if test="amount != null">
amount, category, related_order_code, #{amount,jdbcType=DECIMAL},
before_amount, after_amount, create_by, </if>
create_time) <if test="category != null">
values (#{memberId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR}, #{category,jdbcType=CHAR},
#{amount,jdbcType=DECIMAL}, #{category,jdbcType=CHAR}, #{relatedOrderCode,jdbcType=VARCHAR}, </if>
#{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR}, <if test="relatedOrderCode != null">
#{createTime,jdbcType=TIMESTAMP}) #{relatedOrderCode,jdbcType=VARCHAR},
</insert> </if>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" <if test="beforeAmount != null">
useGeneratedKeys="true"> #{beforeAmount,jdbcType=DECIMAL},
<!--@mbg.generated--> </if>
insert into member_wallet_log <if test="afterAmount != null">
<trim prefix="(" suffix=")" suffixOverrides=","> #{afterAmount,jdbcType=DECIMAL},
<if test="memberId != null"> </if>
member_id, <if test="createBy != null">
</if> #{createBy,jdbcType=VARCHAR},
<if test="type != null"> </if>
`type`, <if test="createTime != null">
</if> #{createTime,jdbcType=TIMESTAMP},
<if test="subType != null"> </if>
sub_type, </trim>
</if> </insert>
<if test="amount != null"> <update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.MemberWalletLog">
amount, <!--@mbg.generated-->
</if> update member_wallet_log
<if test="category != null"> <set>
category, <if test="memberId != null">
</if> member_id = #{memberId,jdbcType=VARCHAR},
<if test="relatedOrderCode != null"> </if>
related_order_code, <if test="walletCode != null">
</if> wallet_code = #{walletCode,jdbcType=VARCHAR},
<if test="beforeAmount != null"> </if>
before_amount, <if test="type != null">
</if> `type` = #{type,jdbcType=VARCHAR},
<if test="afterAmount != null"> </if>
after_amount, <if test="subType != null">
</if> sub_type = #{subType,jdbcType=VARCHAR},
<if test="createBy != null"> </if>
create_by, <if test="amount != null">
</if> amount = #{amount,jdbcType=DECIMAL},
<if test="createTime != null"> </if>
create_time, <if test="category != null">
</if> category = #{category,jdbcType=CHAR},
</trim> </if>
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test="relatedOrderCode != null">
<if test="memberId != null"> related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
#{memberId,jdbcType=VARCHAR}, </if>
</if> <if test="beforeAmount != null">
<if test="type != null"> before_amount = #{beforeAmount,jdbcType=DECIMAL},
#{type,jdbcType=VARCHAR}, </if>
</if> <if test="afterAmount != null">
<if test="subType != null"> after_amount = #{afterAmount,jdbcType=DECIMAL},
#{subType,jdbcType=VARCHAR}, </if>
</if> <if test="createBy != null">
<if test="amount != null"> create_by = #{createBy,jdbcType=VARCHAR},
#{amount,jdbcType=DECIMAL}, </if>
</if> <if test="createTime != null">
<if test="category != null"> create_time = #{createTime,jdbcType=TIMESTAMP},
#{category,jdbcType=CHAR}, </if>
</if> </set>
<if test="relatedOrderCode != null"> where id = #{id,jdbcType=INTEGER}
#{relatedOrderCode,jdbcType=VARCHAR}, </update>
</if> <update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.MemberWalletLog">
<if test="beforeAmount != null"> <!--@mbg.generated-->
#{beforeAmount,jdbcType=DECIMAL}, update member_wallet_log
</if> set member_id = #{memberId,jdbcType=VARCHAR},
<if test="afterAmount != null"> wallet_code = #{walletCode,jdbcType=VARCHAR},
#{afterAmount,jdbcType=DECIMAL}, `type` = #{type,jdbcType=VARCHAR},
</if> sub_type = #{subType,jdbcType=VARCHAR},
<if test="createBy != null"> amount = #{amount,jdbcType=DECIMAL},
#{createBy,jdbcType=VARCHAR}, category = #{category,jdbcType=CHAR},
</if> related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
<if test="createTime != null"> before_amount = #{beforeAmount,jdbcType=DECIMAL},
#{createTime,jdbcType=TIMESTAMP}, after_amount = #{afterAmount,jdbcType=DECIMAL},
</if> create_by = #{createBy,jdbcType=VARCHAR},
</trim> create_time = #{createTime,jdbcType=TIMESTAMP}
</insert> where id = #{id,jdbcType=INTEGER}
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.MemberWalletLog"> </update>
<!--@mbg.generated--> <update id="updateBatch" parameterType="java.util.List">
update member_wallet_log <!--@mbg.generated-->
<set> update member_wallet_log
<if test="memberId != null"> <trim prefix="set" suffixOverrides=",">
member_id = #{memberId,jdbcType=VARCHAR}, <trim prefix="member_id = case" suffix="end,">
</if> <foreach collection="list" index="index" item="item">
<if test="type != null"> when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
`type` = #{type,jdbcType=VARCHAR},
</if>
<if test="subType != null">
sub_type = #{subType,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="category != null">
category = #{category,jdbcType=CHAR},
</if>
<if test="relatedOrderCode != null">
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
</if>
<if test="beforeAmount != null">
before_amount = #{beforeAmount,jdbcType=DECIMAL},
</if>
<if test="afterAmount != null">
after_amount = #{afterAmount,jdbcType=DECIMAL},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.MemberWalletLog">
<!--@mbg.generated-->
update member_wallet_log
set member_id = #{memberId,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
sub_type = #{subType,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
category = #{category,jdbcType=CHAR},
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
before_amount = #{beforeAmount,jdbcType=DECIMAL},
after_amount = #{afterAmount,jdbcType=DECIMAL},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update member_wallet_log
<trim prefix="set" suffixOverrides=",">
<trim prefix="member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="`type` = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.type,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="sub_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.subType,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.amount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="category = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.category,jdbcType=CHAR}
</foreach>
</trim>
<trim prefix="related_order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.relatedOrderCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="before_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.beforeAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="after_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="create_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="create_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=INTEGER}
</foreach> </foreach>
</update> </trim>
<update id="updateBatchSelective" parameterType="java.util.List"> <trim prefix="wallet_code = case" suffix="end,">
<!--@mbg.generated--> <foreach collection="list" index="index" item="item">
update member_wallet_log when id = #{item.id,jdbcType=INTEGER} then #{item.walletCode,jdbcType=VARCHAR}
<trim prefix="set" suffixOverrides=",">
<trim prefix="member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.memberId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="`type` = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.type != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.type,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="sub_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.subType != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.subType,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.amount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.amount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="category = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.category != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.category,jdbcType=CHAR}
</if>
</foreach>
</trim>
<trim prefix="related_order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.relatedOrderCode != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.relatedOrderCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="before_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.beforeAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.beforeAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="after_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.afterAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="create_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.createBy != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="create_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.createTime != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=INTEGER}
</foreach> </foreach>
</update> </trim>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> <trim prefix="`type` = case" suffix="end,">
<!--@mbg.generated--> <foreach collection="list" index="index" item="item">
insert into member_wallet_log when id = #{item.id,jdbcType=INTEGER} then #{item.type,jdbcType=VARCHAR}
(member_id, `type`, sub_type, amount, category, related_order_code, before_amount,
after_amount, create_by)
values
<foreach collection="list" item="item" separator=",">
(#{item.memberId,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.createBy,jdbcType=VARCHAR})
</foreach> </foreach>
</insert> </trim>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" <trim prefix="sub_type = case" suffix="end,">
useGeneratedKeys="true"> <foreach collection="list" index="index" item="item">
<!--@mbg.generated--> when id = #{item.id,jdbcType=INTEGER} then #{item.subType,jdbcType=VARCHAR}
insert into member_wallet_log </foreach>
<trim prefix="(" suffix=")" suffixOverrides=","> </trim>
<if test="id != null"> <trim prefix="amount = case" suffix="end,">
id, <foreach collection="list" index="index" item="item">
</if> when id = #{item.id,jdbcType=INTEGER} then #{item.amount,jdbcType=DECIMAL}
member_id, </foreach>
`type`, </trim>
sub_type, <trim prefix="category = case" suffix="end,">
amount, <foreach collection="list" index="index" item="item">
category, when id = #{item.id,jdbcType=INTEGER} then #{item.category,jdbcType=CHAR}
related_order_code, </foreach>
before_amount, </trim>
after_amount, <trim prefix="related_order_code = case" suffix="end,">
create_by, <foreach collection="list" index="index" item="item">
create_time, when id = #{item.id,jdbcType=INTEGER} then #{item.relatedOrderCode,jdbcType=VARCHAR}
</trim> </foreach>
values </trim>
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="before_amount = case" suffix="end,">
<if test="id != null"> <foreach collection="list" index="index" item="item">
#{id,jdbcType=INTEGER}, when id = #{item.id,jdbcType=INTEGER} then #{item.beforeAmount,jdbcType=DECIMAL}
</if> </foreach>
#{memberId,jdbcType=VARCHAR}, </trim>
#{type,jdbcType=VARCHAR}, <trim prefix="after_amount = case" suffix="end,">
#{subType,jdbcType=VARCHAR}, <foreach collection="list" index="index" item="item">
#{amount,jdbcType=DECIMAL}, when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL}
#{category,jdbcType=CHAR}, </foreach>
#{relatedOrderCode,jdbcType=VARCHAR}, </trim>
#{beforeAmount,jdbcType=DECIMAL}, <trim prefix="create_by = case" suffix="end,">
#{afterAmount,jdbcType=DECIMAL}, <foreach collection="list" index="index" item="item">
#{createBy,jdbcType=VARCHAR}, when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
#{createTime,jdbcType=TIMESTAMP}, </foreach>
</trim> </trim>
on duplicate key update <trim prefix="create_time = case" suffix="end,">
<trim suffixOverrides=","> <foreach collection="list" index="index" item="item">
<if test="id != null"> when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
id = #{id,jdbcType=INTEGER}, </foreach>
</if> </trim>
member_id = #{memberId,jdbcType=VARCHAR}, </trim>
`type` = #{type,jdbcType=VARCHAR}, where id in
sub_type = #{subType,jdbcType=VARCHAR}, <foreach close=")" collection="list" item="item" open="(" separator=", ">
amount = #{amount,jdbcType=DECIMAL}, #{item.id,jdbcType=INTEGER}
category = #{category,jdbcType=CHAR}, </foreach>
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR}, </update>
before_amount = #{beforeAmount,jdbcType=DECIMAL}, <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
after_amount = #{afterAmount,jdbcType=DECIMAL}, <!--@mbg.generated-->
create_by = #{createBy,jdbcType=VARCHAR}, insert into member_wallet_log
create_time = #{createTime,jdbcType=TIMESTAMP}, (member_id, wallet_code, `type`, sub_type, amount, category, related_order_code,
</trim> before_amount, after_amount, create_by, create_time)
</insert> values
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" <foreach collection="list" item="item" separator=",">
parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true"> (#{item.memberId,jdbcType=VARCHAR}, #{item.walletCode,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR},
<!--@mbg.generated--> #{item.subType,jdbcType=VARCHAR}, #{item.amount,jdbcType=DECIMAL}, #{item.category,jdbcType=CHAR},
insert into member_wallet_log #{item.relatedOrderCode,jdbcType=VARCHAR}, #{item.beforeAmount,jdbcType=DECIMAL},
<trim prefix="(" suffix=")" suffixOverrides=","> #{item.afterAmount,jdbcType=DECIMAL}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}
<if test="id != null"> )
id, </foreach>
</if> </insert>
<if test="memberId != null"> <insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
member_id, <!--@mbg.generated-->
</if> insert into member_wallet_log
<if test="type != null"> <trim prefix="(" suffix=")" suffixOverrides=",">
`type`, <if test="id != null">
</if> id,
<if test="subType != null"> </if>
sub_type, member_id,
</if> wallet_code,
<if test="amount != null"> `type`,
amount, sub_type,
</if> amount,
<if test="category != null"> category,
category, related_order_code,
</if> before_amount,
<if test="relatedOrderCode != null"> after_amount,
related_order_code, create_by,
</if> create_time,
<if test="beforeAmount != null"> </trim>
before_amount, values
</if> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="afterAmount != null"> <if test="id != null">
after_amount, #{id,jdbcType=INTEGER},
</if> </if>
<if test="createBy != null"> #{memberId,jdbcType=VARCHAR},
create_by, #{walletCode,jdbcType=VARCHAR},
</if> #{type,jdbcType=VARCHAR},
<if test="createTime != null"> #{subType,jdbcType=VARCHAR},
create_time, #{amount,jdbcType=DECIMAL},
</if> #{category,jdbcType=CHAR},
</trim> #{relatedOrderCode,jdbcType=VARCHAR},
values #{beforeAmount,jdbcType=DECIMAL},
<trim prefix="(" suffix=")" suffixOverrides=","> #{afterAmount,jdbcType=DECIMAL},
<if test="id != null"> #{createBy,jdbcType=VARCHAR},
#{id,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
</if> </trim>
<if test="memberId != null"> on duplicate key update
#{memberId,jdbcType=VARCHAR}, <trim suffixOverrides=",">
</if> <if test="id != null">
<if test="type != null"> id = #{id,jdbcType=INTEGER},
#{type,jdbcType=VARCHAR}, </if>
</if> member_id = #{memberId,jdbcType=VARCHAR},
<if test="subType != null"> wallet_code = #{walletCode,jdbcType=VARCHAR},
#{subType,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR},
</if> sub_type = #{subType,jdbcType=VARCHAR},
<if test="amount != null"> amount = #{amount,jdbcType=DECIMAL},
#{amount,jdbcType=DECIMAL}, category = #{category,jdbcType=CHAR},
</if> related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
<if test="category != null"> before_amount = #{beforeAmount,jdbcType=DECIMAL},
#{category,jdbcType=CHAR}, after_amount = #{afterAmount,jdbcType=DECIMAL},
</if> create_by = #{createBy,jdbcType=VARCHAR},
<if test="relatedOrderCode != null"> create_time = #{createTime,jdbcType=TIMESTAMP},
#{relatedOrderCode,jdbcType=VARCHAR}, </trim>
</if> </insert>
<if test="beforeAmount != null"> <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
#{beforeAmount,jdbcType=DECIMAL}, <!--@mbg.generated-->
</if> insert into member_wallet_log
<if test="afterAmount != null"> <trim prefix="(" suffix=")" suffixOverrides=",">
#{afterAmount,jdbcType=DECIMAL}, <if test="id != null">
</if> id,
<if test="createBy != null"> </if>
#{createBy,jdbcType=VARCHAR}, <if test="memberId != null">
</if> member_id,
<if test="createTime != null"> </if>
#{createTime,jdbcType=TIMESTAMP}, <if test="walletCode != null">
</if> wallet_code,
</trim> </if>
on duplicate key update <if test="type != null">
<trim suffixOverrides=","> `type`,
<if test="id != null"> </if>
id = #{id,jdbcType=INTEGER}, <if test="subType != null">
</if> sub_type,
<if test="memberId != null"> </if>
member_id = #{memberId,jdbcType=VARCHAR}, <if test="amount != null">
</if> amount,
<if test="type != null"> </if>
`type` = #{type,jdbcType=VARCHAR}, <if test="category != null">
</if> category,
<if test="subType != null"> </if>
sub_type = #{subType,jdbcType=VARCHAR}, <if test="relatedOrderCode != null">
</if> related_order_code,
<if test="amount != null"> </if>
amount = #{amount,jdbcType=DECIMAL}, <if test="beforeAmount != null">
</if> before_amount,
<if test="category != null"> </if>
category = #{category,jdbcType=CHAR}, <if test="afterAmount != null">
</if> after_amount,
<if test="relatedOrderCode != null"> </if>
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR}, <if test="createBy != null">
</if> create_by,
<if test="beforeAmount != null"> </if>
before_amount = #{beforeAmount,jdbcType=DECIMAL}, <if test="createTime != null">
</if> create_time,
<if test="afterAmount != null"> </if>
after_amount = #{afterAmount,jdbcType=DECIMAL}, </trim>
</if> values
<if test="createBy != null"> <trim prefix="(" suffix=")" suffixOverrides=",">
create_by = #{createBy,jdbcType=VARCHAR}, <if test="id != null">
</if> #{id,jdbcType=INTEGER},
<if test="createTime != null"> </if>
create_time = #{createTime,jdbcType=TIMESTAMP}, <if test="memberId != null">
</if> #{memberId,jdbcType=VARCHAR},
</trim> </if>
</insert> <if test="walletCode != null">
#{walletCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="subType != null">
#{subType,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="category != null">
#{category,jdbcType=CHAR},
</if>
<if test="relatedOrderCode != null">
#{relatedOrderCode,jdbcType=VARCHAR},
</if>
<if test="beforeAmount != null">
#{beforeAmount,jdbcType=DECIMAL},
</if>
<if test="afterAmount != null">
#{afterAmount,jdbcType=DECIMAL},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="walletCode != null">
wallet_code = #{walletCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR},
</if>
<if test="subType != null">
sub_type = #{subType,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="category != null">
category = #{category,jdbcType=CHAR},
</if>
<if test="relatedOrderCode != null">
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
</if>
<if test="beforeAmount != null">
before_amount = #{beforeAmount,jdbcType=DECIMAL},
</if>
<if test="afterAmount != null">
after_amount = #{afterAmount,jdbcType=DECIMAL},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="getMemberBalanceChanges" resultType="com.jsowell.pile.vo.uniapp.MemberWalletLogVO"> <select id="getMemberBalanceChanges" resultType="com.jsowell.pile.vo.uniapp.MemberWalletLogVO">
SELECT t1.member_id as memberId, SELECT t1.member_id as memberId,
@@ -547,7 +482,7 @@
<select id="getOrderRecord" resultMap="BaseResultMap"> <select id="getOrderRecord" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List" />
from member_wallet_log from member_wallet_log
where related_order_code = #{orderCode,jdbcType=VARCHAR} where related_order_code = #{orderCode,jdbcType=VARCHAR}
and type = #{type,jdbcType=VARCHAR} and type = #{type,jdbcType=VARCHAR}