mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-07 11:29:58 +08:00
update 订单退款明细
This commit is contained in:
@@ -1,63 +1,64 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 会员钱包流水表
|
||||
*/
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MemberWalletLog {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private String memberId;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private String memberId;
|
||||
|
||||
/**
|
||||
* 类型(1-进账;2-出账)
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 类型(1-进账;2-出账)
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 子类型(10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款)
|
||||
*/
|
||||
private String subType;
|
||||
/**
|
||||
* 子类型(10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款)
|
||||
*/
|
||||
private String subType;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 余额类型(1-本金,2-赠送)
|
||||
*/
|
||||
private String category;
|
||||
/**
|
||||
* 余额类型(1-本金,2-赠送)
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 关联订单编号
|
||||
*/
|
||||
private String relatedOrderCode;
|
||||
/**
|
||||
* 关联订单
|
||||
*/
|
||||
private String relatedOrderCode;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -1,40 +1,75 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
|
||||
import com.jsowell.pile.domain.MemberWalletLog;
|
||||
import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface MemberWalletLogMapper {
|
||||
// int deleteByPrimaryKey(Integer id);
|
||||
/**
|
||||
* delete by primary key
|
||||
*
|
||||
* @param id primaryKey
|
||||
* @return deleteCount
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
// int insert(MemberWalletLog record);
|
||||
/**
|
||||
* insert record to table
|
||||
*
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insert(MemberWalletLog record);
|
||||
|
||||
// int insertSelective(MemberWalletLog record);
|
||||
/**
|
||||
* insert record to table selective
|
||||
*
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insertSelective(MemberWalletLog record);
|
||||
|
||||
// MemberWalletLog selectByPrimaryKey(Integer id);
|
||||
/**
|
||||
* select by primary key
|
||||
*
|
||||
* @param id primary key
|
||||
* @return object by primary key
|
||||
*/
|
||||
MemberWalletLog selectByPrimaryKey(Integer id);
|
||||
|
||||
// int updateByPrimaryKeySelective(MemberWalletLog record);
|
||||
/**
|
||||
* update record selective
|
||||
*
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKeySelective(MemberWalletLog record);
|
||||
|
||||
// int updateByPrimaryKey(MemberWalletLog record);
|
||||
/**
|
||||
* update record
|
||||
*
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKey(MemberWalletLog record);
|
||||
|
||||
void batchInsert(@Param("list") List<MemberWalletLog> logList);
|
||||
|
||||
/**
|
||||
* 查询用户账户余额变动信息
|
||||
*
|
||||
* @param memberId 会员id
|
||||
* @param type 1-进账;2-出账 不传查全部
|
||||
* @param type 1-进账;2-出账 不传查全部
|
||||
*/
|
||||
List<MemberWalletLogVO> getMemberBalanceChanges(@Param("memberId") String memberId, @Param("type") String type);
|
||||
|
||||
/**
|
||||
* 小程序查询会员余额明细
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@@ -42,6 +77,7 @@ public interface MemberWalletLogMapper {
|
||||
|
||||
/**
|
||||
* 批量查询用户可退款金额
|
||||
*
|
||||
* @param memberIds
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
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);
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(MemberWalletLog record);
|
||||
|
||||
int insertSelective(MemberWalletLog record);
|
||||
|
||||
MemberWalletLog selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(MemberWalletLog record);
|
||||
|
||||
int updateByPrimaryKey(MemberWalletLog record);
|
||||
|
||||
}
|
||||
|
||||
@@ -13,34 +13,34 @@ public class MemberWalletLogServiceImpl implements IMemberWalletLogService {
|
||||
@Resource
|
||||
private MemberWalletLogMapper memberWalletLogMapper;
|
||||
|
||||
// @Override
|
||||
// public int deleteByPrimaryKey(Integer id) {
|
||||
// return memberWalletLogMapper.deleteByPrimaryKey(id);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int insert(MemberWalletLog record) {
|
||||
// return memberWalletLogMapper.insert(record);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int insertSelective(MemberWalletLog record) {
|
||||
// return memberWalletLogMapper.insertSelective(record);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public MemberWalletLog selectByPrimaryKey(Integer id) {
|
||||
// return memberWalletLogMapper.selectByPrimaryKey(id);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int updateByPrimaryKeySelective(MemberWalletLog record) {
|
||||
// return memberWalletLogMapper.updateByPrimaryKeySelective(record);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int updateByPrimaryKey(MemberWalletLog record) {
|
||||
// return memberWalletLogMapper.updateByPrimaryKey(record);
|
||||
// }
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return memberWalletLogMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(MemberWalletLog record) {
|
||||
return memberWalletLogMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(MemberWalletLog record) {
|
||||
return memberWalletLogMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MemberWalletLog selectByPrimaryKey(Integer id) {
|
||||
return memberWalletLogMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(MemberWalletLog record) {
|
||||
return memberWalletLogMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(MemberWalletLog record) {
|
||||
return memberWalletLogMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +1,145 @@
|
||||
<?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">
|
||||
<mapper namespace="com.jsowell.pile.mapper.MemberWalletLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.MemberWalletLog">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table member_wallet_log-->
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="member_id" jdbcType="VARCHAR" property="memberId"/>
|
||||
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||
<result column="sub_type" jdbcType="VARCHAR" property="subType"/>
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount"/>
|
||||
<result column="category" jdbcType="CHAR" property="category"/>
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id,
|
||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.MemberWalletLog">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table member_wallet_log-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="sub_type" jdbcType="VARCHAR" property="subType" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="category" jdbcType="CHAR" property="category" />
|
||||
<result column="related_order_code" jdbcType="VARCHAR" property="relatedOrderCode" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, member_id, `type`, sub_type, amount, category, related_order_code, 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, `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,
|
||||
</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="createBy != null">
|
||||
create_by,
|
||||
create_time
|
||||
</sql>
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<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="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="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},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<insert id="batchInsert">
|
||||
insert into member_wallet_log (member_id, `type`,
|
||||
@@ -81,7 +197,7 @@
|
||||
where
|
||||
<if test="list != null and list.size() != 0">
|
||||
member_id in
|
||||
<foreach collection="list" item="memberId" open="(" separator="," close=")">
|
||||
<foreach close=")" collection="list" item="memberId" open="(" separator=",">
|
||||
#{memberId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user