修改提现

This commit is contained in:
韩鹏辉
2023-08-24 10:09:09 +08:00
parent f35c8cb2bc
commit d75ce709ea
9 changed files with 600 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
package com.chaozhanggui.dao.system.dao;
import com.chaozhanggui.dao.system.entity.GuserSet;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface GuserSetMapper {
int deleteByPrimaryKey(Integer id);
int insert(GuserSet record);
int insertSelective(GuserSet record);
GuserSet selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(GuserSet record);
int updateByPrimaryKey(GuserSet record);
List<GuserSet> selectByAppId(String appId);
}

View File

@@ -0,0 +1,21 @@
package com.chaozhanggui.dao.system.dao;
import com.chaozhanggui.dao.system.entity.TbPlussUserAccountFlow;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussUserAccountFlowMapper {
int deleteByPrimaryKey(Integer id);
int insert(TbPlussUserAccountFlow record);
int insertSelective(TbPlussUserAccountFlow record);
TbPlussUserAccountFlow selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(TbPlussUserAccountFlow record);
int updateByPrimaryKey(TbPlussUserAccountFlow record);
}

View File

@@ -0,0 +1,21 @@
package com.chaozhanggui.dao.system.dao;
import com.chaozhanggui.dao.system.entity.TbPlussUserAccount;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussUserAccountMapper {
int deleteByPrimaryKey(Integer userId);
int insert(TbPlussUserAccount record);
int insertSelective(TbPlussUserAccount record);
TbPlussUserAccount selectByPrimaryKey(Integer userId);
int updateByPrimaryKeySelective(TbPlussUserAccount record);
int updateByPrimaryKey(TbPlussUserAccount record);
}

View File

@@ -0,0 +1,37 @@
package com.chaozhanggui.dao.system.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class GuserSet implements Serializable {
private Integer id;
private String appId;
private String storeId;
private String storeCode;
private String storeName;
private String merchantName;
private String token;
private String ip;
private String nofiyUrl;
private String publicKey;
private String privateKey;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,25 @@
package com.chaozhanggui.dao.system.entity;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class TbPlussUserAccount implements Serializable {
private Integer userId;
private BigDecimal freezeBalance;
private BigDecimal balance;
private BigDecimal outBalance;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,29 @@
package com.chaozhanggui.dao.system.entity;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class TbPlussUserAccountFlow implements Serializable {
private Integer id;
private Integer userId;
private String bizCode;
private String bizName;
private BigDecimal amount;
private BigDecimal balance;
private String remark;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,195 @@
<?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.chaozhanggui.dao.system.dao.GuserSetMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.GuserSet">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="token" jdbcType="VARCHAR" property="token" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="nofiy_url" jdbcType="VARCHAR" property="nofiyUrl" />
<result column="public_key" jdbcType="VARCHAR" property="publicKey" />
<result column="private_key" jdbcType="VARCHAR" property="privateKey" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, app_id, store_id, store_code, store_name, merchant_name, token, ip, nofiy_url,
public_key, private_key, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from g_user_set
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from g_user_set
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.GuserSet">
insert into g_user_set (id, app_id, store_id,
store_code, store_name, merchant_name,
token, ip, nofiy_url,
public_key, private_key, create_time,
update_time)
values (#{id,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{storeCode,jdbcType=VARCHAR}, #{storeName,jdbcType=VARCHAR}, #{merchantName,jdbcType=VARCHAR},
#{token,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{nofiyUrl,jdbcType=VARCHAR},
#{publicKey,jdbcType=VARCHAR}, #{privateKey,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.GuserSet">
insert into g_user_set
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="appId != null">
app_id,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeCode != null">
store_code,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="merchantName != null">
merchant_name,
</if>
<if test="token != null">
token,
</if>
<if test="ip != null">
ip,
</if>
<if test="nofiyUrl != null">
nofiy_url,
</if>
<if test="publicKey != null">
public_key,
</if>
<if test="privateKey != null">
private_key,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=VARCHAR},
</if>
<if test="storeCode != null">
#{storeCode,jdbcType=VARCHAR},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="merchantName != null">
#{merchantName,jdbcType=VARCHAR},
</if>
<if test="token != null">
#{token,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="nofiyUrl != null">
#{nofiyUrl,jdbcType=VARCHAR},
</if>
<if test="publicKey != null">
#{publicKey,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
#{privateKey,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.GuserSet">
update g_user_set
<set>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if test="storeCode != null">
store_code = #{storeCode,jdbcType=VARCHAR},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="merchantName != null">
merchant_name = #{merchantName,jdbcType=VARCHAR},
</if>
<if test="token != null">
token = #{token,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="nofiyUrl != null">
nofiy_url = #{nofiyUrl,jdbcType=VARCHAR},
</if>
<if test="publicKey != null">
public_key = #{publicKey,jdbcType=VARCHAR},
</if>
<if test="privateKey != null">
private_key = #{privateKey,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.GuserSet">
update g_user_set
set app_id = #{appId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
store_code = #{storeCode,jdbcType=VARCHAR},
store_name = #{storeName,jdbcType=VARCHAR},
merchant_name = #{merchantName,jdbcType=VARCHAR},
token = #{token,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
nofiy_url = #{nofiyUrl,jdbcType=VARCHAR},
public_key = #{publicKey,jdbcType=VARCHAR},
private_key = #{privateKey,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByAppId" resultMap="BaseResultMap">
select * from g_user_set where 1=1
<if test="appId!=null and appId!=''">
app_id=#{appId}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,141 @@
<?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.chaozhanggui.dao.system.dao.TbPlussUserAccountFlowMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussUserAccountFlow">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="biz_code" jdbcType="VARCHAR" property="bizCode" />
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="balance" jdbcType="DECIMAL" property="balance" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, biz_code, biz_name, amount, balance, remark, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_pluss_user_account_flow
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_user_account_flow
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccountFlow">
insert into tb_pluss_user_account_flow (id, user_id, biz_code,
biz_name, amount, balance,
remark, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{bizCode,jdbcType=VARCHAR},
#{bizName,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{balance,jdbcType=DECIMAL},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccountFlow">
insert into tb_pluss_user_account_flow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="bizCode != null">
biz_code,
</if>
<if test="bizName != null">
biz_name,
</if>
<if test="amount != null">
amount,
</if>
<if test="balance != null">
balance,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="bizCode != null">
#{bizCode,jdbcType=VARCHAR},
</if>
<if test="bizName != null">
#{bizName,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="balance != null">
#{balance,jdbcType=DECIMAL},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccountFlow">
update tb_pluss_user_account_flow
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="bizCode != null">
biz_code = #{bizCode,jdbcType=VARCHAR},
</if>
<if test="bizName != null">
biz_name = #{bizName,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="balance != null">
balance = #{balance,jdbcType=DECIMAL},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccountFlow">
update tb_pluss_user_account_flow
set user_id = #{userId,jdbcType=INTEGER},
biz_code = #{bizCode,jdbcType=VARCHAR},
biz_name = #{bizName,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
balance = #{balance,jdbcType=DECIMAL},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,106 @@
<?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.chaozhanggui.dao.system.dao.TbPlussUserAccountMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussUserAccount">
<id column="user_id" jdbcType="INTEGER" property="userId" />
<result column="freeze_balance" jdbcType="DECIMAL" property="freezeBalance" />
<result column="balance" jdbcType="DECIMAL" property="balance" />
<result column="out_balance" jdbcType="DECIMAL" property="outBalance" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
user_id, freeze_balance, balance, out_balance, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_pluss_user_account
where user_id = #{userId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_user_account
where user_id = #{userId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccount">
insert into tb_pluss_user_account (user_id, freeze_balance, balance,
out_balance, create_time, update_time
)
values (#{userId,jdbcType=INTEGER}, #{freezeBalance,jdbcType=DECIMAL}, #{balance,jdbcType=DECIMAL},
#{outBalance,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccount">
insert into tb_pluss_user_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="freezeBalance != null">
freeze_balance,
</if>
<if test="balance != null">
balance,
</if>
<if test="outBalance != null">
out_balance,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="freezeBalance != null">
#{freezeBalance,jdbcType=DECIMAL},
</if>
<if test="balance != null">
#{balance,jdbcType=DECIMAL},
</if>
<if test="outBalance != null">
#{outBalance,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccount">
update tb_pluss_user_account
<set>
<if test="freezeBalance != null">
freeze_balance = #{freezeBalance,jdbcType=DECIMAL},
</if>
<if test="balance != null">
balance = #{balance,jdbcType=DECIMAL},
</if>
<if test="outBalance != null">
out_balance = #{outBalance,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where user_id = #{userId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserAccount">
update tb_pluss_user_account
set freeze_balance = #{freezeBalance,jdbcType=DECIMAL},
balance = #{balance,jdbcType=DECIMAL},
out_balance = #{outBalance,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_id = #{userId,jdbcType=INTEGER}
</update>
</mapper>