This commit is contained in:
parent
436a07bcf4
commit
1e2ed4d305
@ -7,18 +7,17 @@ import club.joylink.rtss.vo.client.org.OrgVO;
|
|||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 账户对象
|
* 账户对象
|
||||||
@ -28,6 +27,7 @@ import java.util.List;
|
|||||||
@Setter
|
@Setter
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
public class AccountVO implements Serializable {
|
public class AccountVO implements Serializable {
|
||||||
|
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ -129,6 +129,11 @@ public class AccountVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
//单位信息
|
//单位信息
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
|
||||||
@ -163,6 +168,7 @@ public class AccountVO implements Serializable {
|
|||||||
this.email = account.getEmail();
|
this.email = account.getEmail();
|
||||||
this.status = account.getStatus();
|
this.status = account.getStatus();
|
||||||
this.createTime = account.getCreateTime();
|
this.createTime = account.getCreateTime();
|
||||||
|
this.updateTime = account.getUpdateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AccountVO system() {
|
public static AccountVO system() {
|
||||||
@ -219,7 +225,8 @@ public class AccountVO implements Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "UserVO [id=" + id + ", name=" + name + ", nickname=" + nickname + ", mobile=" + mobile + ", email=" + email + ", nationcode="
|
return "UserVO [id=" + id + ", name=" + name + ", nickname=" + nickname + ", mobile=" + mobile
|
||||||
|
+ ", email=" + email + ", nationcode="
|
||||||
+ nationcode + ", wxId=" + wxId + "]";
|
+ nationcode + ", wxId=" + wxId + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,7 +276,8 @@ public class AccountVO implements Serializable {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean isAdmin() {
|
public boolean isAdmin() {
|
||||||
return !CollectionUtils.isEmpty(this.roles)
|
return !CollectionUtils.isEmpty(this.roles)
|
||||||
&& (this.roles.contains(BusinessConsts.ROLE_04) || this.roles.contains(BusinessConsts.ROLE_05));
|
&& (this.roles.contains(BusinessConsts.ROLE_04) || this.roles.contains(
|
||||||
|
BusinessConsts.ROLE_05));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user