社稷大典 初始化提交
parent
df0850d74b
commit
f1d7511218
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.logic.dao.root;
|
|||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||
import com.ljsd.jieling.logic.dao.Question;
|
||||
import com.ljsd.jieling.logic.dao.TimeControllerOfFunction;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
@ -20,16 +21,13 @@ public class GlobalSystemControl {
|
|||
private Map<String, Question> questionMap = new ConcurrentHashMap<>();
|
||||
|
||||
private int questId;//本服开启的问卷id
|
||||
private HashMap<Integer,Integer> activityOpenValue= new HashMap<>();
|
||||
|
||||
@Transient
|
||||
private boolean dirty = false;
|
||||
|
||||
public static GlobalSystemControl getGlobalSystemControl() throws Exception {
|
||||
GlobalSystemControl globalSystemControl = MongoUtil.getInstence().getMyMongoTemplate().findById(GameApplication.serverId, GlobalSystemControl.class);
|
||||
if (globalSystemControl == null) {
|
||||
globalSystemControl = new GlobalSystemControl(GameApplication.serverId);
|
||||
}
|
||||
return globalSystemControl;
|
||||
return GlobleSystemLogic.getInstence().getGlobalSystemControl();
|
||||
}
|
||||
|
||||
public GlobalSystemControl(int id) {
|
||||
|
@ -54,6 +52,15 @@ public class GlobalSystemControl {
|
|||
this.questId = questId;
|
||||
}
|
||||
|
||||
public HashMap<Integer, Integer> getActivityOpenValue() {
|
||||
this.dirty = true;
|
||||
return activityOpenValue;
|
||||
}
|
||||
|
||||
public void setActivityOpenValue(HashMap<Integer, Integer> activityOpenValue) {
|
||||
this.activityOpenValue = activityOpenValue;
|
||||
}
|
||||
|
||||
public Question getQuestionMap(String key) {
|
||||
return questionMap.get(key);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue