|
|
@@ -9,6 +9,8 @@ import com.uas.kanban.util.CollectionUtils;
|
|
|
import com.uas.kanban.util.ObjectUtils;
|
|
|
import org.mongodb.morphia.annotations.Embedded;
|
|
|
import org.mongodb.morphia.annotations.Entity;
|
|
|
+import org.mongodb.morphia.annotations.Index;
|
|
|
+import org.mongodb.morphia.annotations.Indexes;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -19,6 +21,7 @@ import java.util.List;
|
|
|
* @since 2017/10/18 15:58
|
|
|
*/
|
|
|
@Entity
|
|
|
+@Indexes(@Index(value = "name, userCode", unique = true))
|
|
|
public class PanelInstance extends BaseEntity {
|
|
|
|
|
|
/**
|
|
|
@@ -29,7 +32,9 @@ public class PanelInstance extends BaseEntity {
|
|
|
* 默认刷新频率为 5 s
|
|
|
*/
|
|
|
public static final double DEFAULT_REFRESH_FREQUENCY = 5;
|
|
|
+
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
/**
|
|
|
* 名称
|
|
|
*/
|
|
|
@@ -77,8 +82,6 @@ public class PanelInstance extends BaseEntity {
|
|
|
|
|
|
@Override
|
|
|
public void init() {
|
|
|
- User user = SystemSession.checkUser();
|
|
|
- userCode = user.getCode();
|
|
|
if (refreshFrequency == null) {
|
|
|
refreshFrequency = DEFAULT_REFRESH_FREQUENCY;
|
|
|
}
|