新增钱包编号字段,钱包归属运营商字段

This commit is contained in:
2023-11-08 16:00:03 +08:00
parent 3a66b4b540
commit 29ca0d6e9c
3 changed files with 116 additions and 55 deletions

View File

@@ -1,56 +1,67 @@
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 MemberWalletInfo {
/**
* 主键
*/
* 主键
*/
private Integer id;
/**
* 会员id
*/
* 会员id
*/
private String memberId;
/**
* 本金余额
*/
* 钱包归属运营商id
*/
private String merchantId;
/**
* 钱包编号
*/
private String walletCode;
/**
* 本金余额
*/
private BigDecimal principalBalance;
/**
* 赠送余额
*/
* 赠送余额
*/
private BigDecimal giftBalance;
/**
* 版本号
*/
* 版本号
*/
private Integer version;
private String createBy;
private LocalDateTime createTime;
private Date createTime;
private String updateBy;
private LocalDateTime updateTime;
private Date updateTime;
/**
* 删除标识(0-正常;1-删除)
*/
* 删除标识(0-正常;1-删除)
*/
private String delFlag;
}

View File

@@ -1,21 +1,55 @@
package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.MemberWalletInfo;
import org.springframework.stereotype.Repository;
@Repository
public interface MemberWalletInfoMapper {
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
int deleteByPrimaryKey(Integer id);
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
int insert(MemberWalletInfo record);
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
int insertSelective(MemberWalletInfo record);
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
MemberWalletInfo selectByPrimaryKey(Integer id);
MemberWalletInfo selectByMemberId(String memberId);
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
int updateByPrimaryKeySelective(MemberWalletInfo record);
/**
* update record
*
* @param record the updated record
* @return update count
*/
int updateByPrimaryKey(MemberWalletInfo record);
MemberWalletInfo selectByMemberId(String memberId);
}

View File

@@ -6,6 +6,8 @@
<!--@Table member_wallet_info-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="wallet_code" jdbcType="VARCHAR" property="walletCode" />
<result column="principal_balance" jdbcType="DECIMAL" property="principalBalance" />
<result column="gift_balance" jdbcType="DECIMAL" property="giftBalance" />
<result column="version" jdbcType="INTEGER" property="version" />
@@ -17,8 +19,8 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, member_id, principal_balance, gift_balance, version, create_by, create_time,
update_by, update_time, del_flag
id, member_id, merchant_id, wallet_code, principal_balance, gift_balance, version,
create_by, create_time, update_by, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -32,27 +34,30 @@
delete from member_wallet_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.jsowell.pile.domain.MemberWalletInfo">
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into member_wallet_info (id, member_id, principal_balance,
gift_balance, version, create_by,
create_time, update_by, update_time,
del_flag)
values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=VARCHAR}, #{principalBalance,jdbcType=DECIMAL},
#{giftBalance,jdbcType=DECIMAL}, #{version,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=CHAR})
insert into member_wallet_info (member_id, merchant_id, wallet_code,
principal_balance, gift_balance, version,
create_by, create_time, update_by,
update_time, del_flag)
values (#{memberId,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{walletCode,jdbcType=VARCHAR},
#{principalBalance,jdbcType=DECIMAL}, #{giftBalance,jdbcType=DECIMAL}, #{version,jdbcType=INTEGER},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=CHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.MemberWalletInfo">
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.MemberWalletInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into member_wallet_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="memberId != null and memberId != ''">
<if test="memberId != null">
member_id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="walletCode != null">
wallet_code,
</if>
<if test="principalBalance != null">
principal_balance,
</if>
@@ -62,29 +67,32 @@
<if test="version != null">
version,
</if>
<if test="createBy != null and createBy != ''">
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null and updateBy != ''">
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="delFlag != null and delFlag != ''">
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="memberId != null and memberId != ''">
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="walletCode != null">
#{walletCode,jdbcType=VARCHAR},
</if>
<if test="principalBalance != null">
#{principalBalance,jdbcType=DECIMAL},
</if>
@@ -94,19 +102,19 @@
<if test="version != null">
#{version,jdbcType=INTEGER},
</if>
<if test="createBy != null and createBy != ''">
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null and updateBy != ''">
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null and delFlag != ''">
<if test="delFlag != null">
#{delFlag,jdbcType=CHAR},
</if>
</trim>
@@ -115,9 +123,15 @@
<!--@mbg.generated-->
update member_wallet_info
<set>
<if test="memberId != null and memberId != ''">
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="walletCode != null">
wallet_code = #{walletCode,jdbcType=VARCHAR},
</if>
<if test="principalBalance != null">
principal_balance = #{principalBalance,jdbcType=DECIMAL},
</if>
@@ -127,19 +141,19 @@
<if test="version != null">
version = #{version,jdbcType=INTEGER},
</if>
<if test="createBy != null and createBy != ''">
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null and updateBy != ''">
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="delFlag != null and delFlag != ''">
<if test="delFlag != null">
del_flag = #{delFlag,jdbcType=CHAR},
</if>
</set>
@@ -149,6 +163,8 @@
<!--@mbg.generated-->
update member_wallet_info
set member_id = #{memberId,jdbcType=VARCHAR},
merchant_id = #{merchantId,jdbcType=VARCHAR},
wallet_code = #{walletCode,jdbcType=VARCHAR},
principal_balance = #{principalBalance,jdbcType=DECIMAL},
gift_balance = #{giftBalance,jdbcType=DECIMAL},
version = #{version,jdbcType=INTEGER},