mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-18 00:38:33 +08:00
update 修改余额增加备注
This commit is contained in:
@@ -1,12 +1,9 @@
|
|||||||
package com.jsowell.pile.domain;
|
package com.jsowell.pile.domain;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员钱包流水表
|
* 会员钱包流水表
|
||||||
@@ -67,6 +64,11 @@ public class MemberWalletLog {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal afterAmount;
|
private BigDecimal afterAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,11 +5,9 @@ import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
|||||||
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
|
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
|
||||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Repository
|
|
||||||
public interface MemberWalletLogMapper {
|
public interface MemberWalletLogMapper {
|
||||||
/**
|
/**
|
||||||
* delete by primary key
|
* delete by primary key
|
||||||
|
|||||||
@@ -272,6 +272,11 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
log.info("修改用户余额-变更后本金余额不能为负数");
|
log.info("修改用户余额-变更后本金余额不能为负数");
|
||||||
throw new BusinessException("", "变更后本金余额不能为负数");
|
throw new BusinessException("", "变更后本金余额不能为负数");
|
||||||
}
|
}
|
||||||
|
String remark = "日期:" + DateUtils.getDateTime() +
|
||||||
|
", 操作人员Id:" + createBy +
|
||||||
|
", 变更用户本金金额:" + updatePrincipalBalance +
|
||||||
|
", 原金额:" + oldPrincipalBalance +
|
||||||
|
", 变更后金额:" + newPrincipalBalance;
|
||||||
// 记流水
|
// 记流水
|
||||||
logList.add(MemberWalletLog.builder()
|
logList.add(MemberWalletLog.builder()
|
||||||
.memberId(dto.getMemberId())
|
.memberId(dto.getMemberId())
|
||||||
@@ -283,6 +288,7 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
.relatedOrderCode(dto.getRelatedOrderCode())
|
.relatedOrderCode(dto.getRelatedOrderCode())
|
||||||
.beforeAmount(oldPrincipalBalance)
|
.beforeAmount(oldPrincipalBalance)
|
||||||
.afterAmount(newPrincipalBalance)
|
.afterAmount(newPrincipalBalance)
|
||||||
|
.remark(remark)
|
||||||
.createBy(createBy)
|
.createBy(createBy)
|
||||||
.createTime(DateUtils.getNowDate())
|
.createTime(DateUtils.getNowDate())
|
||||||
.build());
|
.build());
|
||||||
@@ -303,6 +309,11 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
log.info("修改用户余额-变更后赠送余额不能为负数");
|
log.info("修改用户余额-变更后赠送余额不能为负数");
|
||||||
throw new BusinessException("", "变更后赠送余额不能为负数");
|
throw new BusinessException("", "变更后赠送余额不能为负数");
|
||||||
}
|
}
|
||||||
|
String remark = "日期:" + DateUtils.getDateTime() +
|
||||||
|
", 操作人员Id:" + createBy +
|
||||||
|
", 变更用户赠送金额:" + updateGiftBalance +
|
||||||
|
", 原金额:" + oldGiftBalance +
|
||||||
|
", 变更后金额:" + newGiftBalance;
|
||||||
// 记流水
|
// 记流水
|
||||||
logList.add(MemberWalletLog.builder()
|
logList.add(MemberWalletLog.builder()
|
||||||
.memberId(dto.getMemberId())
|
.memberId(dto.getMemberId())
|
||||||
@@ -314,6 +325,7 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
.relatedOrderCode(dto.getRelatedOrderCode())
|
.relatedOrderCode(dto.getRelatedOrderCode())
|
||||||
.beforeAmount(oldGiftBalance)
|
.beforeAmount(oldGiftBalance)
|
||||||
.afterAmount(newGiftBalance)
|
.afterAmount(newGiftBalance)
|
||||||
|
.remark(remark)
|
||||||
.createBy(createBy)
|
.createBy(createBy)
|
||||||
.createTime(DateUtils.getNowDate())
|
.createTime(DateUtils.getNowDate())
|
||||||
.build());
|
.build());
|
||||||
|
|||||||
@@ -14,13 +14,14 @@
|
|||||||
<result column="related_order_code" jdbcType="VARCHAR" property="relatedOrderCode" />
|
<result column="related_order_code" jdbcType="VARCHAR" property="relatedOrderCode" />
|
||||||
<result column="before_amount" jdbcType="DECIMAL" property="beforeAmount" />
|
<result column="before_amount" jdbcType="DECIMAL" property="beforeAmount" />
|
||||||
<result column="after_amount" jdbcType="DECIMAL" property="afterAmount" />
|
<result column="after_amount" jdbcType="DECIMAL" property="afterAmount" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@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, create_by, create_time
|
before_amount, after_amount, remark, create_by, create_time
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
@@ -39,11 +40,13 @@
|
|||||||
insert into member_wallet_log (member_id, wallet_code, `type`,
|
insert into member_wallet_log (member_id, wallet_code, `type`,
|
||||||
sub_type, amount, category,
|
sub_type, amount, category,
|
||||||
related_order_code, before_amount, after_amount,
|
related_order_code, before_amount, after_amount,
|
||||||
create_by, create_time)
|
remark, create_by, create_time
|
||||||
|
)
|
||||||
values (#{memberId,jdbcType=VARCHAR}, #{walletCode,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
values (#{memberId,jdbcType=VARCHAR}, #{walletCode,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||||
#{subType,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{category,jdbcType=CHAR},
|
#{subType,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{category,jdbcType=CHAR},
|
||||||
#{relatedOrderCode,jdbcType=VARCHAR}, #{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL},
|
#{relatedOrderCode,jdbcType=VARCHAR}, #{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL},
|
||||||
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
|
#{remark,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
@@ -76,6 +79,9 @@
|
|||||||
<if test="afterAmount != null">
|
<if test="afterAmount != null">
|
||||||
after_amount,
|
after_amount,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
<if test="createBy != null">
|
<if test="createBy != null">
|
||||||
create_by,
|
create_by,
|
||||||
</if>
|
</if>
|
||||||
@@ -111,6 +117,9 @@
|
|||||||
<if test="afterAmount != null">
|
<if test="afterAmount != null">
|
||||||
#{afterAmount,jdbcType=DECIMAL},
|
#{afterAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="createBy != null">
|
<if test="createBy != null">
|
||||||
#{createBy,jdbcType=VARCHAR},
|
#{createBy,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -150,6 +159,9 @@
|
|||||||
<if test="afterAmount != null">
|
<if test="afterAmount != null">
|
||||||
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="createBy != null">
|
<if test="createBy != null">
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
create_by = #{createBy,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -171,6 +183,7 @@
|
|||||||
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
|
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
|
||||||
before_amount = #{beforeAmount,jdbcType=DECIMAL},
|
before_amount = #{beforeAmount,jdbcType=DECIMAL},
|
||||||
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
create_by = #{createBy,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
@@ -224,6 +237,11 @@
|
|||||||
when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL}
|
when id = #{item.id,jdbcType=INTEGER} then #{item.afterAmount,jdbcType=DECIMAL}
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
|
<trim prefix="remark = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.remark,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
<trim prefix="create_by = case" suffix="end,">
|
<trim prefix="create_by = case" suffix="end,">
|
||||||
<foreach collection="list" index="index" item="item">
|
<foreach collection="list" index="index" item="item">
|
||||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
|
||||||
@@ -244,14 +262,14 @@
|
|||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into member_wallet_log
|
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, create_by, create_time)
|
before_amount, after_amount, remark, create_by, create_time)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.memberId,jdbcType=VARCHAR}, #{item.walletCode,jdbcType=VARCHAR}, #{item.type,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.subType,jdbcType=VARCHAR}, #{item.amount,jdbcType=DECIMAL}, #{item.category,jdbcType=CHAR},
|
||||||
#{item.relatedOrderCode,jdbcType=VARCHAR}, #{item.beforeAmount,jdbcType=DECIMAL},
|
#{item.relatedOrderCode,jdbcType=VARCHAR}, #{item.beforeAmount,jdbcType=DECIMAL},
|
||||||
#{item.afterAmount,jdbcType=DECIMAL}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}
|
#{item.afterAmount,jdbcType=DECIMAL}, #{item.remark,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
|
||||||
)
|
#{item.createTime,jdbcType=TIMESTAMP})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog" useGeneratedKeys="true">
|
||||||
@@ -270,6 +288,7 @@
|
|||||||
related_order_code,
|
related_order_code,
|
||||||
before_amount,
|
before_amount,
|
||||||
after_amount,
|
after_amount,
|
||||||
|
remark,
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
</trim>
|
</trim>
|
||||||
@@ -287,6 +306,7 @@
|
|||||||
#{relatedOrderCode,jdbcType=VARCHAR},
|
#{relatedOrderCode,jdbcType=VARCHAR},
|
||||||
#{beforeAmount,jdbcType=DECIMAL},
|
#{beforeAmount,jdbcType=DECIMAL},
|
||||||
#{afterAmount,jdbcType=DECIMAL},
|
#{afterAmount,jdbcType=DECIMAL},
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
#{createBy,jdbcType=VARCHAR},
|
#{createBy,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
</trim>
|
</trim>
|
||||||
@@ -304,6 +324,7 @@
|
|||||||
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
|
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
|
||||||
before_amount = #{beforeAmount,jdbcType=DECIMAL},
|
before_amount = #{beforeAmount,jdbcType=DECIMAL},
|
||||||
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
create_by = #{createBy,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
</trim>
|
</trim>
|
||||||
@@ -342,6 +363,9 @@
|
|||||||
<if test="afterAmount != null">
|
<if test="afterAmount != null">
|
||||||
after_amount,
|
after_amount,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
<if test="createBy != null">
|
<if test="createBy != null">
|
||||||
create_by,
|
create_by,
|
||||||
</if>
|
</if>
|
||||||
@@ -381,6 +405,9 @@
|
|||||||
<if test="afterAmount != null">
|
<if test="afterAmount != null">
|
||||||
#{afterAmount,jdbcType=DECIMAL},
|
#{afterAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="createBy != null">
|
<if test="createBy != null">
|
||||||
#{createBy,jdbcType=VARCHAR},
|
#{createBy,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -420,6 +447,9 @@
|
|||||||
<if test="afterAmount != null">
|
<if test="afterAmount != null">
|
||||||
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
after_amount = #{afterAmount,jdbcType=DECIMAL},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="createBy != null">
|
<if test="createBy != null">
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
create_by = #{createBy,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user