diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/MemberWalletLog.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/MemberWalletLog.java index 3b8ce7bb3..6baecf97e 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/domain/MemberWalletLog.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/MemberWalletLog.java @@ -27,6 +27,11 @@ public class MemberWalletLog { */ private String memberId; + /** + * 钱包编号 + */ + private String walletCode; + /** * 类型(1-进账;2-出账) */ diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/MemberWalletLogMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/MemberWalletLogMapper.java index 8349aadae..c90786445 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/MemberWalletLogMapper.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/MemberWalletLogMapper.java @@ -63,10 +63,10 @@ public interface MemberWalletLogMapper { int updateBatch(List list); - int updateBatchSelective(List list); - int batchInsert(@Param("list") List list); + int updateBatchSelective(List list); + /** * 查询用户账户余额变动信息 * diff --git a/jsowell-pile/src/main/resources/mapper/pile/MemberWalletLogMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/MemberWalletLogMapper.xml index e2c024b62..35f0f0fd0 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/MemberWalletLogMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/MemberWalletLogMapper.xml @@ -1,498 +1,433 @@ - - - - - - - - - - - - - - - - - - id, + + + + + + + + + + + + + + + + + + + id, member_id, wallet_code, `type`, sub_type, amount, category, related_order_code, + before_amount, after_amount, create_by, create_time + + + + + delete from member_wallet_log + where id = #{id,jdbcType=INTEGER} + + + + 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 into member_wallet_log + + member_id, + + + wallet_code, + + `type`, + + sub_type, + + amount, + + category, + + related_order_code, + + before_amount, + + after_amount, + + create_by, - create_time - - - - - delete - from member_wallet_log - where id = #{id,jdbcType=INTEGER} - - - - insert into member_wallet_log (member_id, `type`, sub_type, - amount, category, related_order_code, - before_amount, after_amount, create_by, - create_time) - values (#{memberId,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 into member_wallet_log - - - member_id, - - - `type`, - - - sub_type, - - - amount, - - - category, - - - related_order_code, - - - before_amount, - - - after_amount, - - - create_by, - - - create_time, - - - - - #{memberId,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}, - - - - - - update member_wallet_log - - - 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 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 member_wallet_log - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.type,jdbcType=VARCHAR} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.subType,jdbcType=VARCHAR} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.amount,jdbcType=DECIMAL} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.category,jdbcType=CHAR} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.relatedOrderCode,jdbcType=VARCHAR} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.beforeAmount,jdbcType=DECIMAL} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} - - - - where id in - - #{item.id,jdbcType=INTEGER} + + + create_time, + + + + + #{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}, + + + + + + update member_wallet_log + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + wallet_code = #{walletCode,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 member_wallet_log + set member_id = #{memberId,jdbcType=VARCHAR}, + wallet_code = #{walletCode,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 member_wallet_log + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR} - - - - update member_wallet_log - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.type,jdbcType=VARCHAR} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.subType,jdbcType=VARCHAR} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.amount,jdbcType=DECIMAL} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.category,jdbcType=CHAR} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.relatedOrderCode,jdbcType=VARCHAR} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.beforeAmount,jdbcType=DECIMAL} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} - - - - - - - when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} - - - - - where id in - - #{item.id,jdbcType=INTEGER} + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.walletCode,jdbcType=VARCHAR} - - - - insert into member_wallet_log - (member_id, `type`, sub_type, amount, category, related_order_code, before_amount, - after_amount, create_by) - values - - (#{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}) + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.type,jdbcType=VARCHAR} - - - - insert into member_wallet_log - - - id, - - member_id, - `type`, - sub_type, - amount, - category, - related_order_code, - before_amount, - after_amount, - create_by, - create_time, - - values - - - #{id,jdbcType=INTEGER}, - - #{memberId,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}, - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - 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}, - - - - - insert into member_wallet_log - - - id, - - - member_id, - - - `type`, - - - sub_type, - - - amount, - - - category, - - - related_order_code, - - - before_amount, - - - after_amount, - - - create_by, - - - create_time, - - - values - - - #{id,jdbcType=INTEGER}, - - - #{memberId,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}, - - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - - 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}, - - - + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.subType,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.amount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.category,jdbcType=CHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.relatedOrderCode,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.beforeAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + 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 + + (#{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.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP} + ) + + + + + insert into member_wallet_log + + + id, + + member_id, + wallet_code, + `type`, + sub_type, + amount, + category, + related_order_code, + before_amount, + after_amount, + create_by, + create_time, + + values + + + #{id,jdbcType=INTEGER}, + + #{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}, + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + member_id = #{memberId,jdbcType=VARCHAR}, + wallet_code = #{walletCode,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}, + + + + + insert into member_wallet_log + + + id, + + + member_id, + + + wallet_code, + + + `type`, + + + sub_type, + + + amount, + + + category, + + + related_order_code, + + + before_amount, + + + after_amount, + + + create_by, + + + create_time, + + + values + + + #{id,jdbcType=INTEGER}, + + + #{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}, + + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + + member_id = #{memberId,jdbcType=VARCHAR}, + + + wallet_code = #{walletCode,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}, + + + select - + from member_wallet_log where related_order_code = #{orderCode,jdbcType=VARCHAR} and type = #{type,jdbcType=VARCHAR}