From 0ca8b1bab8c500742050867a8350e6287284da09 Mon Sep 17 00:00:00 2001 From: pikaqiudeshujia Date: Sat, 11 May 2024 11:02:02 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E6=96=B0=E5=A2=9E=E8=A1=A8tb=5Fbank?= =?UTF-8?q?,tb=5Fuser=5Fbank,tb=5Fwithdraw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/luoo/user/dao/TbBankDao.java | 16 +++++ .../java/com/luoo/user/dao/TbUserBankDao.java | 16 +++++ .../java/com/luoo/user/dao/TbWithdrawDao.java | 16 +++++ .../main/java/com/luoo/user/pojo/TbBank.java | 29 +++++++++ .../java/com/luoo/user/pojo/TbUserBank.java | 64 +++++++++++++++++++ .../java/com/luoo/user/pojo/TbWithdraw.java | 52 +++++++++++++++ .../java/com/luoo/user/pojo/UserProcess.java | 10 +++ luoo_user/src/main/resources/sql/20240511.sql | 40 ++++++++++++ 8 files changed, 243 insertions(+) create mode 100644 luoo_user/src/main/java/com/luoo/user/dao/TbBankDao.java create mode 100644 luoo_user/src/main/java/com/luoo/user/dao/TbUserBankDao.java create mode 100644 luoo_user/src/main/java/com/luoo/user/dao/TbWithdrawDao.java create mode 100644 luoo_user/src/main/java/com/luoo/user/pojo/TbBank.java create mode 100644 luoo_user/src/main/java/com/luoo/user/pojo/TbUserBank.java create mode 100644 luoo_user/src/main/java/com/luoo/user/pojo/TbWithdraw.java create mode 100644 luoo_user/src/main/resources/sql/20240511.sql diff --git a/luoo_user/src/main/java/com/luoo/user/dao/TbBankDao.java b/luoo_user/src/main/java/com/luoo/user/dao/TbBankDao.java new file mode 100644 index 0000000..28fc047 --- /dev/null +++ b/luoo_user/src/main/java/com/luoo/user/dao/TbBankDao.java @@ -0,0 +1,16 @@ +package com.luoo.user.dao; + +import com.luoo.user.pojo.TbBank; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; + +/** + * @Author: yawei.huang + * @Package: com.luoo.user.dao + * @Project: luoo_parent + * @Date: 2024/5/11 10:59 + * @Filename: TbBankDao + * @Describe: + */ +public interface TbBankDao extends JpaRepository, JpaSpecificationExecutor { +} diff --git a/luoo_user/src/main/java/com/luoo/user/dao/TbUserBankDao.java b/luoo_user/src/main/java/com/luoo/user/dao/TbUserBankDao.java new file mode 100644 index 0000000..3599db7 --- /dev/null +++ b/luoo_user/src/main/java/com/luoo/user/dao/TbUserBankDao.java @@ -0,0 +1,16 @@ +package com.luoo.user.dao; + +import com.luoo.user.pojo.TbUserBank; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; + +/** + * @Author: yawei.huang + * @Package: com.luoo.user.dao + * @Project: luoo_parent + * @Date: 2024/5/11 10:59 + * @Filename: TbUserBankDao + * @Describe: + */ +public interface TbUserBankDao extends JpaRepository, JpaSpecificationExecutor { +} diff --git a/luoo_user/src/main/java/com/luoo/user/dao/TbWithdrawDao.java b/luoo_user/src/main/java/com/luoo/user/dao/TbWithdrawDao.java new file mode 100644 index 0000000..233f4f0 --- /dev/null +++ b/luoo_user/src/main/java/com/luoo/user/dao/TbWithdrawDao.java @@ -0,0 +1,16 @@ +package com.luoo.user.dao; + +import com.luoo.user.pojo.TbWithdraw; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; + +/** + * @Author: yawei.huang + * @Package: com.luoo.user.dao + * @Project: luoo_parent + * @Date: 2024/5/11 11:00 + * @Filename: TbWithdrawDao + * @Describe: + */ +public interface TbWithdrawDao extends JpaRepository, JpaSpecificationExecutor { +} diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/TbBank.java b/luoo_user/src/main/java/com/luoo/user/pojo/TbBank.java new file mode 100644 index 0000000..52ccfe3 --- /dev/null +++ b/luoo_user/src/main/java/com/luoo/user/pojo/TbBank.java @@ -0,0 +1,29 @@ +package com.luoo.user.pojo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.*; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; + +@Builder +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +@ToString +@Entity +@Table(name = "tb_bank") +public class TbBank implements Serializable { + @Id + private String id; + + @ApiModelProperty(value = "银行名称") + private String name; + + @ApiModelProperty(value = "银行logo") + private String logo; + +} \ No newline at end of file diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/TbUserBank.java b/luoo_user/src/main/java/com/luoo/user/pojo/TbUserBank.java new file mode 100644 index 0000000..0bae552 --- /dev/null +++ b/luoo_user/src/main/java/com/luoo/user/pojo/TbUserBank.java @@ -0,0 +1,64 @@ +package com.luoo.user.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.time.Instant; + +@Builder +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +@ToString +@Entity +@Table(name = "tb_user_bank") +public class TbUserBank implements Serializable { + @Id + private String id; + + @ApiModelProperty(value = "银行卡号") + private String bankCard; + + @ApiModelProperty(value = "银行id") + private String bankId; + + @ApiModelProperty(value = "银行名称") + private String bankName; + + @ApiModelProperty(value = "手机号") + private String phone; + + @ApiModelProperty(value = "用户id") + private String userId; + + @ApiModelProperty(value = "状态 1-绑定 2-解绑") + private Integer state; + + @ApiModelProperty(value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @CreatedDate + private Instant createTime; + + @ApiModelProperty(value = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @LastModifiedDate + private Instant updateTime; + + @ApiModelProperty(value = "创建人") + private String createUser; + + @ApiModelProperty(value = "修改人") + private String updateUser; + +} \ No newline at end of file diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/TbWithdraw.java b/luoo_user/src/main/java/com/luoo/user/pojo/TbWithdraw.java new file mode 100644 index 0000000..ba94a70 --- /dev/null +++ b/luoo_user/src/main/java/com/luoo/user/pojo/TbWithdraw.java @@ -0,0 +1,52 @@ +package com.luoo.user.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.Instant; + +@Builder +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +@ToString +@Entity +@Table(name = "tb_withdraw") +public class TbWithdraw implements Serializable { + @Id + private String id; + + @ApiModelProperty(value = "提现状态 1-已发起 2-已完成 3-提现失败") + private Integer state; + + @ApiModelProperty(value = "提现金额") + private BigDecimal amount; + + @ApiModelProperty(value = "用户id") + private String userId; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @CreatedDate + private Instant createTime; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @LastModifiedDate + private Instant updateTime; + + private String createUser; + + private String updateUser; + +} \ No newline at end of file diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java b/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java index 3829005..84410bd 100644 --- a/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java +++ b/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java @@ -1,7 +1,11 @@ package com.luoo.user.pojo; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.*; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.Entity; import javax.persistence.Id; @@ -42,9 +46,15 @@ public class UserProcess implements Serializable { @ApiModelProperty("拒绝理由") private String content; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty("创建时间") + @CreatedDate private Date createTime; @ApiModelProperty("修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @LastModifiedDate private Date modifyTime; } diff --git a/luoo_user/src/main/resources/sql/20240511.sql b/luoo_user/src/main/resources/sql/20240511.sql new file mode 100644 index 0000000..6238012 --- /dev/null +++ b/luoo_user/src/main/resources/sql/20240511.sql @@ -0,0 +1,40 @@ +create table tb_bank +( + id varchar(20) not null comment 'id' + primary key, + name varchar(255) null comment '银行名称', + logo varchar(255) null comment '银行logo' +) + comment '常见银行及其logo显示'; + +create table tb_user_bank +( + id varchar(20) not null comment 'id' + primary key, + bank_card varchar(50) null comment '银行卡号', + bank_id varchar(20) null comment '银行表id', + bank_name varchar(255) null comment '银行名称', + phone varchar(50) null comment '手机号', + user_id varchar(20) not null comment '用户id', + state int null comment '状态 1-绑定 2-解绑', + create_time datetime null comment '创建时间', + update_time datetime null comment '修改时间', + create_user varchar(20) null comment '创建人', + update_user varchar(20) null comment '修改人' +) + comment '用户绑定银行卡'; + +create table tb_withdraw +( + id varchar(20) not null + primary key, + state int null comment '提现状态 1-已发起 2-已完成 3-提现失败', + amount decimal(10, 2) null comment '提现金额', + user_id varchar(20) null comment '用户id', + create_time datetime null comment '创建时间', + update_time datetime null comment '修改时间', + create_user varchar(20) null comment '创建人', + update_user varchar(20) null comment '修改人' +) + comment '提现记录表'; +