调整sys_user用户账号可为空

master
panqihua 2 years ago
parent e0a164e567
commit 4e30d3c6c2
  1. 8
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  2. 2
      sql/ttsbg.sql

@ -10,7 +10,6 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.Email; import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -98,7 +97,7 @@ public class SysUser extends BaseEntity
/** 账户余额 */ /** 账户余额 */
@Excel(name = "账户余额") @Excel(name = "账户余额")
private Long balance; private Float balance;
/** 推荐人ID */ /** 推荐人ID */
@Excel(name = "推荐人ID") @Excel(name = "推荐人ID")
@ -159,7 +158,6 @@ public class SysUser extends BaseEntity
} }
@Xss(message = "用户账号不能包含脚本字符") @Xss(message = "用户账号不能包含脚本字符")
@NotBlank(message = "用户账号不能为空")
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
public String getUserName() public String getUserName()
{ {
@ -323,12 +321,12 @@ public class SysUser extends BaseEntity
{ {
return wechatNickName; return wechatNickName;
} }
public void setBalance(Long balance) public void setBalance(Float balance)
{ {
this.balance = balance; this.balance = balance;
} }
public Long getBalance() public Float getBalance()
{ {
return balance; return balance;
} }

@ -7,3 +7,5 @@ alter table sys_user
alter table sys_user alter table sys_user
add constraint sys_user_sys_user_user_id_fk add constraint sys_user_sys_user_user_id_fk
foreign key (referrer_id) references sys_user (user_id); foreign key (referrer_id) references sys_user (user_id);
alter table sys_user
modify user_name varchar(30) null comment '用户账号';

Loading…
Cancel
Save