diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java index eddc336..e442570 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java @@ -10,7 +10,6 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; import java.util.Date; import java.util.List; @@ -98,7 +97,7 @@ public class SysUser extends BaseEntity /** 账户余额 */ @Excel(name = "账户余额") - private Long balance; + private Float balance; /** 推荐人ID */ @Excel(name = "推荐人ID") @@ -159,7 +158,6 @@ public class SysUser extends BaseEntity } @Xss(message = "用户账号不能包含脚本字符") - @NotBlank(message = "用户账号不能为空") @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") public String getUserName() { @@ -323,12 +321,12 @@ public class SysUser extends BaseEntity { return wechatNickName; } - public void setBalance(Long balance) + public void setBalance(Float balance) { this.balance = balance; } - public Long getBalance() + public Float getBalance() { return balance; } diff --git a/sql/ttsbg.sql b/sql/ttsbg.sql index 8543506..255dd18 100644 --- a/sql/ttsbg.sql +++ b/sql/ttsbg.sql @@ -7,3 +7,5 @@ alter table sys_user alter table sys_user add constraint sys_user_sys_user_user_id_fk foreign key (referrer_id) references sys_user (user_id); +alter table sys_user + modify user_name varchar(30) null comment '用户账号';