漏提交SGlobalSystemConfig;
parent
1efd3bd58d
commit
d84b58ac5b
|
@ -0,0 +1,125 @@
|
||||||
|
package com.ljsd.jieling.config;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||||
|
import com.ljsd.jieling.logic.STableManager;
|
||||||
|
import com.ljsd.jieling.logic.Table;
|
||||||
|
import com.ljsd.jieling.util.TimeUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Table(name ="GlobalSystemConfig")
|
||||||
|
public class SGlobalSystemConfig implements BaseConfig {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int[] openRules;
|
||||||
|
|
||||||
|
private String systemOpen;
|
||||||
|
|
||||||
|
private String systemEnd;
|
||||||
|
|
||||||
|
private String seasonOpen;
|
||||||
|
|
||||||
|
private String seasonEnd;
|
||||||
|
|
||||||
|
private int seasonInterval;
|
||||||
|
|
||||||
|
|
||||||
|
private long systemOpenLong;
|
||||||
|
|
||||||
|
private long systemEndLong;
|
||||||
|
|
||||||
|
private long seasonOpenLong;
|
||||||
|
|
||||||
|
private long seasonEndLong;
|
||||||
|
|
||||||
|
|
||||||
|
private static Map<Integer,SGlobalSystemConfig> sGlobalSystemConfigMap;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
Map<Integer,SGlobalSystemConfig> sGlobalSystemConfigMapTmp = new HashMap<>();
|
||||||
|
Map<Integer, SGlobalSystemConfig> config = STableManager.getConfig(SGlobalSystemConfig.class);
|
||||||
|
for(SGlobalSystemConfig sGlobalSystemConfig : config.values()){
|
||||||
|
|
||||||
|
/* sGlobalSystemConfig.setSeasonOpenLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonOpen(), "YYYYMMdd hh:mm:ss"));
|
||||||
|
sGlobalSystemConfig.setSeasonEndLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonEnd(), "YYYYMMdd hh:mm:ss"));
|
||||||
|
|
||||||
|
sGlobalSystemConfig.setSystemOpenLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSystemOpen(), "YYYYMMdd hh:mm:ss"));
|
||||||
|
sGlobalSystemConfig.setSystemEndLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSystemEnd(), "YYYYMMdd hh:mm:ss"));*/
|
||||||
|
}
|
||||||
|
sGlobalSystemConfigMap = config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SGlobalSystemConfig getsGlobalSystemConfigByFunctionId(FunctionIdEnum workShop) {
|
||||||
|
return sGlobalSystemConfigMap.get(workShop.getFunctionId());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<Integer, SGlobalSystemConfig> getsGlobalSystemConfigMap() {
|
||||||
|
return sGlobalSystemConfigMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getOpenRules() {
|
||||||
|
return openRules;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSystemOpen() {
|
||||||
|
return systemOpen;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSystemEnd() {
|
||||||
|
return systemEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSeasonOpen() {
|
||||||
|
return seasonOpen;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getSeasonEnd() {
|
||||||
|
return seasonEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSeasonInterval() {
|
||||||
|
return seasonInterval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public long getSystemOpenLong() {
|
||||||
|
return systemOpenLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSystemOpenLong(long systemOpenLong) {
|
||||||
|
this.systemOpenLong = systemOpenLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSystemEndLong() {
|
||||||
|
return systemEndLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSystemEndLong(long systemEndLong) {
|
||||||
|
this.systemEndLong = systemEndLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSeasonOpenLong() {
|
||||||
|
return seasonOpenLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeasonOpenLong(long seasonOpenLong) {
|
||||||
|
this.seasonOpenLong = seasonOpenLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getSeasonEndLong() {
|
||||||
|
return seasonEndLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeasonEndLong(long seasonEndLong) {
|
||||||
|
this.seasonEndLong = seasonEndLong;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue