Commit 35de3b5c authored by licc's avatar licc

添加用户充值类

parent e7acaa69
package cn.wisenergy.mapper;
import cn.wisenergy.model.app.UserRecharge;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 充币表 Mapper 接口
* </p>
*
* @author chenqi
* @since 2021-06-15
* @author 86187
*/
public interface UserRechargeMapper extends BaseMapper<UserRecharge> {
public interface UserRechargeMapper extends BaseMapper<UserRechargeMapper> {
}
<?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="cn.wisenergy.mapper.UserRechargeMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="cn.wisenergy.model.app.UserRecharge">
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="currency_id" property="currencyId" />
<result column="name" property="name" />
<result column="type" property="type" />
<result column="receive_addr" property="receiveAddr" />
<result column="from_addr" property="fromAddr" />
<result column="amount" property="amount" />
<result column="hash" property="hash" />
<result column="detail" property="detail" />
<result column="payer" property="payer" />
<result column="bank_name" property="bankName" />
<result column="bank_real_name" property="bankRealName" />
<result column="bank_card" property="bankCard" />
<result column="method" property="method" />
<result column="operate" property="operate" />
<result column="operate_at" property="operateAt" />
<result column="note" property="note" />
<result column="status" property="status" />
<result column="created_at" property="createdAt" />
<result column="updated_at" property="updatedAt" />
<mapper namespace="cn.wisenergy.mapper.UserRechargeMapper">
<resultMap id="userMap" type="cn.wisenergy.model.app.UserRecharge">
<id column="id" property="id"/>
<result column="user_id" property="userId"/>
<result column="currency_id" property="currencyId"/>
<result column="name" property="name"/>
<result column="type" property="type"/>
<result column="receive_addr" property="receiveAddr"/>
<result column="from_addr" property="fromAddr"/>
<result column="amount" property="amount"/>
<result column="hash" property="hash"/>
<result column="detail" property="detail"/>
<result column="payer" property="payer"/>
<result column="bank_name" property="bankName"/>
<result column="bank_real_name" property="bankRealName"/>
<result column="bank_card" property="bankCard"/>
<result column="method" property="method"/>
<result column="operate" property="operate"/>
<result column="operate_at" property="operateAt"/>
<result column="note" property="note"/>
<result column="status" property="status"/>
<result column="created_at" property="createdAt"/>
<result column="updated_at" property="updatedAt"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, user_id, currency_id, name, type, receive_addr, from_addr, amount, hash, detail, payer, bank_name, bank_real_name, bank_card, method, operate, operate_at, note, status, created_at, updated_at
<sql id="table">
user_recharge
</sql>
<sql id="cols_all">
id,
<include refid="cols_exclude_id"/>
</sql>
<sql id="cols_exclude_id">
user_id, currency_id, `name`, `type`, receive_addr, from_addr, amount, hash, detail, payer, bank_name,
bank_real_name, bank_card, method, operate, operate_at, note, status, created_at, updated_at
</sql>
<sql id="vals">
#{userId},#{currencyId},#{name},#{type},#{receiveAddr},#{fromAddr},#{amount},#{hash},#{detail},#{payer},
#{bankName},#{bankRealName},#{bankCard},#{method},#{operate},#{operateAt},#{note},#{status},now(),now()
</sql>
<sql id="updateCondition">
<if test="userId != null">user_id = #{userId},</if>
<if test="currencyId != null">currency_id =#{currencyId},</if>
<if test="name != null">`name` =#{name},</if>
<if test="type != null">`type` =#{type},</if>
<if test="receiveAddr != null">receive_addr =#{receiveAddr},</if>
<if test="fromAddr != null">from_addr = #{fromAddr},</if>
<if test="amount != null">amount =#{amount},</if>
<if test="hash != null">hash =#{hash},</if>
<if test="detail != null">detail =#{detail},</if>
<if test="payer != null">payer = #{payer},</if>
<if test="token != null">token = #{token},</if>
<if test="hash != null">hash =#{hash},</if>
<if test="bankName != null">bank_name =#{bankName},</if>
<if test="bankRealName != null">bank_real_name =#{bankRealName},</if>
<if test="bankCard != null">bank_card =#{bankCard},</if>
<if test="method != null">method = #{method},</if>
<if test="operate != null">operate =#{operate},</if>
<if test="operateAt != null">operate_at =#{operateAt},</if>
<if test="note != null">note =#{note},</if>
<if test="status != null">status = #{status},</if>
update_time =now()
</sql>
<sql id="criteria">
<if test="id != null">id = #{id}</if>
<if test="userId != null">and user_id = #{userId}</if>
<if test="currencyId != null">and currency_id =#{currencyId}</if>
<if test="name != null">and `name` =#{name}</if>
<if test="type != null">and `type` =#{type}</if>
<if test="receiveAddr != null">and receive_addr =#{receiveAddr}</if>
<if test="fromAddr != null">and from_addr = #{fromAddr}</if>
<if test="amount != null">and amount =#{amount}</if>
<if test="hash != null">and hash =#{hash}</if>
<if test="detail != null">and detail =#{detail}</if>
<if test="payer != null">and payer = #{payer}</if>
<if test="token != null">and token = #{token}</if>
<if test="hash != null">and hash =#{hash}</if>
<if test="bankName != null">and bank_name =#{bankName}</if>
<if test="bankRealName != null">and bank_real_name =#{bankRealName}</if>
<if test="bankCard != null">and bank_card =#{bankCard}</if>
<if test="method != null">and method = #{method}</if>
<if test="operate != null">and operate =#{operate}</if>
<if test="operateAt != null">and operate_at =#{operateAt}</if>
<if test="note != null">and note =#{note}</if>
<if test="status != null">and status = #{status}</if>
<if test="createdAt != null">and created_at &gt;= #{createdAt}</if>
<if test="updatedAt != null">and #{updatedAt} &gt;= updated_at</if>
</sql>
</mapper>
......@@ -36,7 +36,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, withdraws_sn, user_id, currency_id, name, type, hash, from, to, bank_name, bank_branch, bank_real_name, bank_card, amount, fee, actual, status, user_ip, user_addr, user_device, review, review_name, review_ip, review_addr, receipt, remark, created_at, updated_at
id, withdraws_sn, user_id, currency_id, `name`, `type`, hash, `from`, `to`, bank_name, bank_branch, bank_real_name, bank_card, amount, fee, actual, status, user_ip, user_addr, user_device, review, review_name, review_ip, review_addr, receipt, remark, created_at, updated_at
</sql>
</mapper>
package cn.wisenergy.model.app;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 充币表
* </p>
*
* @author chenqi
* @since 2021-06-15
* @author 86187
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user_recharge")
@ApiModel(value="UserRecharge对象", description="充币表")
public class UserRecharge implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(name = "id", value = "用户主键id")
@TableId(value = "id", type = IdType.AUTO)
public class UserRecharge {
/**
* 主键id
*/
private Long id;
@ApiModelProperty(name = "userId", value = "会员id")
/**
* 会员id
*/
private Integer userId;
@ApiModelProperty(name = "currencyId", value = "币种id")
/**
* 币种id
*/
private Integer currencyId;
@ApiModelProperty(name = "name", value = "币种名称")
/**
* 币种名称
*/
private String name;
@ApiModelProperty(name = "type", value = "0 ERC20")
/**
* 0 ERC20
*/
private Integer type;
@ApiModelProperty(name = "receiveAddr", value = "转入地址")
/**
* 转入地址
*/
private String receiveAddr;
@ApiModelProperty(name = "fromAddr", value = "转出地址")
/**
* 转出地址
*/
private String fromAddr;
@ApiModelProperty(name = "amount", value = "转入金额")
/**
* 转入金额
*/
private BigDecimal amount;
@ApiModelProperty(name = "hash", value = "交易hash地址")
/**
* 交易hash地址
*/
private String hash;
@ApiModelProperty(name = "detail", value = "详细信息")
/**
* 详细信息
*/
private String detail;
@ApiModelProperty(name = "payer", value = "打款人姓名")
/**
* 打款人姓名
*/
private String payer;
@ApiModelProperty(name = "bankName", value = "收款银行")
/**
* 收款银行
*/
private String bankName;
@ApiModelProperty(name = "bankRealName", value = "收款人")
/**
* 收款人
*/
private String bankRealName;
@ApiModelProperty(name = "bankCard", value = "收款卡号")
/**
* 收款银行卡
*/
private String bankCard;
@ApiModelProperty(name = "method", value = "打款方式")
/**
* 打款方式
*/
private String method;
@ApiModelProperty(name = "operate", value = "审核人")
/**
* 审核人
*/
private String operate;
@ApiModelProperty(name = "operateAt", value = "审核时间")
/**
* 审核时间
*/
private Date operateAt;
@ApiModelProperty(name = "note", value = "备注")
/**
* 备注
*/
private String note;
@ApiModelProperty(name = "status", value = "状态 0 待处理 1 充值成功 2 充值失败")
/**
* 状态 0 待处理 1 充值成功 2 充值失败
*/
private Integer status;
private Date createdAt;
private Date updatedAt;
}
......@@ -19,7 +19,7 @@ public interface UserService {
* @param userId 用户id
* @return 用户信息
*/
Users getById(Integer userId);
Users getById(Long userId);
......
......@@ -22,7 +22,7 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, Users> implements
private UsersMapper usersMapper;
@Override
public Users getById(Integer userId) {
public Users getById(Long userId) {
return null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment