|
|
@@ -1,6 +1,9 @@
|
|
|
package com.uas.sso.entity;
|
|
|
|
|
|
-import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
+import com.alibaba.fastjson.annotation.JSONField;
|
|
|
+import com.fasterxml.jackson.annotation.JsonTypeId;
|
|
|
+import org.codehaus.jackson.annotate.JsonIgnore;
|
|
|
+
|
|
|
import java.io.Serializable;
|
|
|
import java.sql.Timestamp;
|
|
|
import java.util.HashSet;
|
|
|
@@ -186,7 +189,6 @@ public class User implements Serializable {
|
|
|
/**
|
|
|
* 用户登录记录
|
|
|
*/
|
|
|
- @JsonIgnore
|
|
|
@OneToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
|
|
|
@JoinColumn(name = "record_id")
|
|
|
private UserRecord userRecord;
|
|
|
@@ -194,12 +196,10 @@ public class User implements Serializable {
|
|
|
/**
|
|
|
* 密保问题
|
|
|
*/
|
|
|
- @JsonIgnore
|
|
|
@OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.REMOVE})
|
|
|
@JoinColumn(name = "useruu", nullable = false)
|
|
|
private List<UserQuestion> questions;
|
|
|
|
|
|
- @JsonIgnore
|
|
|
@ManyToMany(mappedBy = "users")
|
|
|
private Set<Userspace> userSpaces = new HashSet<>();
|
|
|
|
|
|
@@ -406,6 +406,8 @@ public class User implements Serializable {
|
|
|
this.lock = lock;
|
|
|
}
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
+ @JSONField(serialize = false)
|
|
|
public UserRecord getUserRecord() {
|
|
|
return userRecord;
|
|
|
}
|
|
|
@@ -414,6 +416,8 @@ public class User implements Serializable {
|
|
|
this.userRecord = userRecord;
|
|
|
}
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
+ @JSONField(serialize = false)
|
|
|
public List<UserQuestion> getQuestions() {
|
|
|
return questions;
|
|
|
}
|
|
|
@@ -422,6 +426,8 @@ public class User implements Serializable {
|
|
|
this.questions = questions;
|
|
|
}
|
|
|
|
|
|
+ @JsonIgnore
|
|
|
+ @JSONField(serialize = false)
|
|
|
public Set<Userspace> getUserSpaces() {
|
|
|
return userSpaces;
|
|
|
}
|