mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 05:28:03 +08:00
后管充值本金
This commit is contained in:
@@ -123,7 +123,7 @@ public class OrderService {
|
|||||||
private IPileMerchantInfoService pileMerchantInfoService;
|
private IPileMerchantInfoService pileMerchantInfoService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IMemberWalletLogService memberWalletLogService;
|
private MemberWalletLogService memberWalletLogService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ClearingBillInfoService clearingBillInfoService;
|
private ClearingBillInfoService clearingBillInfoService;
|
||||||
|
|||||||
@@ -52,6 +52,16 @@ public class MemberWalletLog {
|
|||||||
*/
|
*/
|
||||||
private String relatedOrderCode;
|
private String relatedOrderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前金额
|
||||||
|
*/
|
||||||
|
private BigDecimal beforeAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后金额
|
||||||
|
*/
|
||||||
|
private BigDecimal afterAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -27,6 +25,10 @@ public interface MemberWalletLogMapper {
|
|||||||
*/
|
*/
|
||||||
int insert(MemberWalletLog record);
|
int insert(MemberWalletLog record);
|
||||||
|
|
||||||
|
int insertOrUpdate(MemberWalletLog record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(MemberWalletLog record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* insert record to table selective
|
* insert record to table selective
|
||||||
*
|
*
|
||||||
@@ -59,7 +61,11 @@ public interface MemberWalletLogMapper {
|
|||||||
*/
|
*/
|
||||||
int updateByPrimaryKey(MemberWalletLog record);
|
int updateByPrimaryKey(MemberWalletLog record);
|
||||||
|
|
||||||
void batchInsert(@Param("list") List<MemberWalletLog> logList);
|
int updateBatch(List<MemberWalletLog> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<MemberWalletLog> list);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<MemberWalletLog> list);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户账户余额变动信息
|
* 查询用户账户余额变动信息
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.jsowell.pile.service;
|
|
||||||
|
|
||||||
import com.jsowell.pile.domain.MemberWalletLog;
|
|
||||||
|
|
||||||
public interface IMemberWalletLogService {
|
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(MemberWalletLog record);
|
|
||||||
|
|
||||||
int insertSelective(MemberWalletLog record);
|
|
||||||
|
|
||||||
MemberWalletLog selectByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(MemberWalletLog record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(MemberWalletLog record);
|
|
||||||
|
|
||||||
MemberWalletLog getOrderRecord(String orderCode, String type);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.MemberWalletLog;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MemberWalletLogService {
|
||||||
|
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(MemberWalletLog record);
|
||||||
|
|
||||||
|
int insertSelective(MemberWalletLog record);
|
||||||
|
|
||||||
|
MemberWalletLog selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(MemberWalletLog record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(MemberWalletLog record);
|
||||||
|
|
||||||
|
int insertOrUpdate(MemberWalletLog record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(MemberWalletLog record);
|
||||||
|
|
||||||
|
int updateBatch(List<MemberWalletLog> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<MemberWalletLog> list);
|
||||||
|
|
||||||
|
int batchInsert(List<MemberWalletLog> list);
|
||||||
|
|
||||||
|
MemberWalletLog getOrderRecord(String orderCode, String type);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -212,6 +212,8 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
.amount(updatePrincipalBalance)
|
.amount(updatePrincipalBalance)
|
||||||
.category("1")
|
.category("1")
|
||||||
.relatedOrderCode(dto.getRelatedOrderCode())
|
.relatedOrderCode(dto.getRelatedOrderCode())
|
||||||
|
.beforeAmount(oldPrincipalBalance)
|
||||||
|
.afterAmount(newPrincipalBalance)
|
||||||
.createBy(dto.getMemberId())
|
.createBy(dto.getMemberId())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
@@ -239,6 +241,8 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
.amount(updateGiftBalance)
|
.amount(updateGiftBalance)
|
||||||
.category("2")
|
.category("2")
|
||||||
.relatedOrderCode(dto.getRelatedOrderCode())
|
.relatedOrderCode(dto.getRelatedOrderCode())
|
||||||
|
.beforeAmount(oldGiftBalance)
|
||||||
|
.afterAmount(newGiftBalance)
|
||||||
.createBy(dto.getMemberId())
|
.createBy(dto.getMemberId())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,14 @@ package com.jsowell.pile.service.impl;
|
|||||||
|
|
||||||
import com.jsowell.pile.domain.MemberWalletLog;
|
import com.jsowell.pile.domain.MemberWalletLog;
|
||||||
import com.jsowell.pile.mapper.MemberWalletLogMapper;
|
import com.jsowell.pile.mapper.MemberWalletLogMapper;
|
||||||
import com.jsowell.pile.service.IMemberWalletLogService;
|
import com.jsowell.pile.service.MemberWalletLogService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class MemberWalletLogServiceImpl implements IMemberWalletLogService {
|
public class MemberWalletLogServiceImpl implements MemberWalletLogService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MemberWalletLogMapper memberWalletLogMapper;
|
private MemberWalletLogMapper memberWalletLogMapper;
|
||||||
@@ -48,4 +49,29 @@ public class MemberWalletLogServiceImpl implements IMemberWalletLogService {
|
|||||||
return memberWalletLogMapper.getOrderRecord(orderCode, type);
|
return memberWalletLogMapper.getOrderRecord(orderCode, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOrUpdate(MemberWalletLog record) {
|
||||||
|
return memberWalletLogMapper.insertOrUpdate(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOrUpdateSelective(MemberWalletLog record) {
|
||||||
|
return memberWalletLogMapper.insertOrUpdateSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateBatch(List<MemberWalletLog> list) {
|
||||||
|
return memberWalletLogMapper.updateBatch(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateBatchSelective(List<MemberWalletLog> list) {
|
||||||
|
return memberWalletLogMapper.updateBatchSelective(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchInsert(List<MemberWalletLog> list) {
|
||||||
|
return memberWalletLogMapper.batchInsert(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,156 +1,499 @@
|
|||||||
<?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="type" jdbcType="VARCHAR" property="type"/>
|
||||||
<result column="sub_type" jdbcType="VARCHAR" property="subType" />
|
<result column="sub_type" jdbcType="VARCHAR" property="subType"/>
|
||||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
<result column="amount" jdbcType="DECIMAL" property="amount"/>
|
||||||
<result column="category" jdbcType="CHAR" property="category" />
|
<result column="category" jdbcType="CHAR" property="category"/>
|
||||||
<result column="related_order_code" jdbcType="VARCHAR" property="relatedOrderCode" />
|
<result column="related_order_code" jdbcType="VARCHAR" property="relatedOrderCode"/>
|
||||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
<result column="before_amount" jdbcType="DECIMAL" property="beforeAmount"/>
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="after_amount" jdbcType="DECIMAL" property="afterAmount"/>
|
||||||
</resultMap>
|
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||||||
<sql id="Base_Column_List">
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<!--@mbg.generated-->
|
</resultMap>
|
||||||
id, member_id, `type`, sub_type, amount, category, related_order_code, create_by,
|
<sql id="Base_Column_List">
|
||||||
create_time
|
<!--@mbg.generated-->
|
||||||
</sql>
|
id,
|
||||||
<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, `type`, sub_type,
|
|
||||||
amount, category, related_order_code,
|
|
||||||
create_by, create_time)
|
|
||||||
values (#{memberId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
|
|
||||||
#{amount,jdbcType=DECIMAL}, #{category,jdbcType=CHAR}, #{relatedOrderCode,jdbcType=VARCHAR},
|
|
||||||
#{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="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>
|
before_amount,
|
||||||
<if test="createBy != null">
|
after_amount,
|
||||||
create_by,
|
create_by,
|
||||||
</if>
|
create_time
|
||||||
<if test="createTime != null">
|
</sql>
|
||||||
create_time,
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
</if>
|
<!--@mbg.generated-->
|
||||||
</trim>
|
select
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<include refid="Base_Column_List"/>
|
||||||
<if test="memberId != null">
|
from member_wallet_log
|
||||||
#{memberId,jdbcType=VARCHAR},
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</if>
|
</select>
|
||||||
<if test="type != null">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
#{type,jdbcType=VARCHAR},
|
<!--@mbg.generated-->
|
||||||
</if>
|
delete
|
||||||
<if test="subType != null">
|
from member_wallet_log
|
||||||
#{subType,jdbcType=VARCHAR},
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</if>
|
</delete>
|
||||||
<if test="amount != null">
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog"
|
||||||
#{amount,jdbcType=DECIMAL},
|
useGeneratedKeys="true">
|
||||||
</if>
|
<!--@mbg.generated-->
|
||||||
<if test="category != null">
|
insert into member_wallet_log (member_id, `type`, sub_type,
|
||||||
#{category,jdbcType=CHAR},
|
amount, category, related_order_code,
|
||||||
</if>
|
before_amount, after_amount, create_by,
|
||||||
<if test="relatedOrderCode != null">
|
create_time)
|
||||||
#{relatedOrderCode,jdbcType=VARCHAR},
|
values (#{memberId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
|
||||||
</if>
|
#{amount,jdbcType=DECIMAL}, #{category,jdbcType=CHAR}, #{relatedOrderCode,jdbcType=VARCHAR},
|
||||||
<if test="createBy != null">
|
#{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR},
|
||||||
#{createBy,jdbcType=VARCHAR},
|
#{createTime,jdbcType=TIMESTAMP})
|
||||||
</if>
|
</insert>
|
||||||
<if test="createTime != null">
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletLog"
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
useGeneratedKeys="true">
|
||||||
</if>
|
<!--@mbg.generated-->
|
||||||
</trim>
|
insert into member_wallet_log
|
||||||
</insert>
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.MemberWalletLog">
|
<if test="memberId != null">
|
||||||
<!--@mbg.generated-->
|
member_id,
|
||||||
update member_wallet_log
|
</if>
|
||||||
<set>
|
<if test="type != null">
|
||||||
<if test="memberId != null">
|
`type`,
|
||||||
member_id = #{memberId,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="subType != null">
|
||||||
<if test="type != null">
|
sub_type,
|
||||||
`type` = #{type,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="amount != null">
|
||||||
<if test="subType != null">
|
amount,
|
||||||
sub_type = #{subType,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="category != null">
|
||||||
<if test="amount != null">
|
category,
|
||||||
amount = #{amount,jdbcType=DECIMAL},
|
</if>
|
||||||
</if>
|
<if test="relatedOrderCode != null">
|
||||||
<if test="category != null">
|
related_order_code,
|
||||||
category = #{category,jdbcType=CHAR},
|
</if>
|
||||||
</if>
|
<if test="beforeAmount != null">
|
||||||
<if test="relatedOrderCode != null">
|
before_amount,
|
||||||
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="afterAmount != null">
|
||||||
<if test="createBy != null">
|
after_amount,
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
</if>
|
||||||
</if>
|
<if test="createBy != null">
|
||||||
<if test="createTime != null">
|
create_by,
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
||||||
</if>
|
<if test="createTime != null">
|
||||||
</set>
|
create_time,
|
||||||
where id = #{id,jdbcType=INTEGER}
|
</if>
|
||||||
</update>
|
</trim>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.MemberWalletLog">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<!--@mbg.generated-->
|
<if test="memberId != null">
|
||||||
update member_wallet_log
|
#{memberId,jdbcType=VARCHAR},
|
||||||
set member_id = #{memberId,jdbcType=VARCHAR},
|
</if>
|
||||||
`type` = #{type,jdbcType=VARCHAR},
|
<if test="type != null">
|
||||||
sub_type = #{subType,jdbcType=VARCHAR},
|
#{type,jdbcType=VARCHAR},
|
||||||
amount = #{amount,jdbcType=DECIMAL},
|
</if>
|
||||||
category = #{category,jdbcType=CHAR},
|
<if test="subType != null">
|
||||||
related_order_code = #{relatedOrderCode,jdbcType=VARCHAR},
|
#{subType,jdbcType=VARCHAR},
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
</if>
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
<if test="amount != null">
|
||||||
where id = #{id,jdbcType=INTEGER}
|
#{amount,jdbcType=DECIMAL},
|
||||||
</update>
|
</if>
|
||||||
|
<if test="category != null">
|
||||||
<insert id="batchInsert">
|
#{category,jdbcType=CHAR},
|
||||||
insert into member_wallet_log (member_id, `type`,
|
</if>
|
||||||
sub_type, amount, category, related_order_code, create_by)
|
<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>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.MemberWalletLog">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update member_wallet_log
|
||||||
|
<set>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id = #{memberId,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>
|
||||||
|
</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>
|
||||||
|
</update>
|
||||||
|
<update id="updateBatchSelective" 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">
|
||||||
|
<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>
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into member_wallet_log
|
||||||
|
(member_id, `type`, sub_type, amount, category, related_order_code, before_amount,
|
||||||
|
after_amount, create_by, create_time)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.memberId,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, #{item.subType,jdbcType=VARCHAR},
|
(#{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.amount,jdbcType=DECIMAL}, #{item.category,jdbcType=CHAR}, #{item.relatedOrderCode,jdbcType=VARCHAR},
|
||||||
#{item.createBy,jdbcType=VARCHAR})
|
#{item.beforeAmount,jdbcType=DECIMAL}, #{item.afterAmount,jdbcType=DECIMAL},
|
||||||
|
#{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">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into member_wallet_log
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
member_id,
|
||||||
|
`type`,
|
||||||
|
sub_type,
|
||||||
|
amount,
|
||||||
|
category,
|
||||||
|
related_order_code,
|
||||||
|
before_amount,
|
||||||
|
after_amount,
|
||||||
|
create_by,
|
||||||
|
create_time,
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
#{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},
|
||||||
|
</trim>
|
||||||
|
on duplicate key update
|
||||||
|
<trim suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id = #{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
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},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<insert id="insertOrUpdateSelective" 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="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id,
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
`type`,
|
||||||
|
</if>
|
||||||
|
<if test="subType != null">
|
||||||
|
sub_type,
|
||||||
|
</if>
|
||||||
|
<if test="amount != null">
|
||||||
|
amount,
|
||||||
|
</if>
|
||||||
|
<if test="category != null">
|
||||||
|
category,
|
||||||
|
</if>
|
||||||
|
<if test="relatedOrderCode != null">
|
||||||
|
related_order_code,
|
||||||
|
</if>
|
||||||
|
<if test="beforeAmount != null">
|
||||||
|
before_amount,
|
||||||
|
</if>
|
||||||
|
<if test="afterAmount != null">
|
||||||
|
after_amount,
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">
|
||||||
|
create_by,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
values
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="memberId != null">
|
||||||
|
#{memberId,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="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,
|
||||||
@@ -189,25 +532,23 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getMemberRefundAmount" resultType="com.jsowell.pile.vo.uniapp.MemberBalanceVO">
|
<select id="getMemberRefundAmount" resultType="com.jsowell.pile.vo.uniapp.MemberBalanceVO">
|
||||||
select
|
select member_id as memberId,
|
||||||
member_id as memberId,
|
principal_balance as principalAmount
|
||||||
principal_balance as principalAmount
|
from member_wallet_info
|
||||||
from
|
|
||||||
member_wallet_info
|
|
||||||
where
|
where
|
||||||
<if test="list != null and list.size() != 0">
|
<if test="list != null and list.size() != 0">
|
||||||
member_id in
|
member_id in
|
||||||
<foreach close=")" collection="list" item="memberId" open="(" separator=",">
|
<foreach close=")" collection="list" item="memberId" open="(" separator=",">
|
||||||
#{memberId,jdbcType=VARCHAR}
|
#{memberId,jdbcType=VARCHAR}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<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}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user