|
@@ -4,7 +4,8 @@ import java.util.List;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
|
-import cn.com.qmth.stmms.common.enums.TrialMode;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -20,12 +21,15 @@ import cn.com.qmth.stmms.biz.utils.AppLicenseUtil;
|
|
|
import cn.com.qmth.stmms.biz.utils.SolarHttpUtil;
|
|
|
import cn.com.qmth.stmms.common.enums.ConfigType;
|
|
|
import cn.com.qmth.stmms.common.enums.SystemAuthType;
|
|
|
+import cn.com.qmth.stmms.common.enums.TrialMode;
|
|
|
import cn.com.qmth.stmms.common.utils.AesUtils;
|
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
|
@Component
|
|
|
public class SystemCache {
|
|
|
|
|
|
+ protected static final Logger log = LoggerFactory.getLogger(SystemCache.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
private SystemAuthService authService;
|
|
|
|
|
@@ -171,7 +175,7 @@ public class SystemCache {
|
|
|
try {
|
|
|
expireTime = json.getJSONObject("control").getLong("expireTime");
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.warn("expireTime err:" + e.getMessage());
|
|
|
}
|
|
|
this.expireTime = expireTime;
|
|
|
}
|
|
@@ -182,7 +186,7 @@ public class SystemCache {
|
|
|
this.doubleTrack = json.getJSONObject("control").getJSONObject("custom")
|
|
|
.getBoolean("enable_double_track");
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.warn("doubleTrack err:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
this.groupDeleteWarn = false;
|
|
@@ -192,7 +196,7 @@ public class SystemCache {
|
|
|
this.groupDeleteWarn = json.getJSONObject("control").getJSONObject("custom")
|
|
|
.getBoolean("enable_group_delete_warn");
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.warn("groupDeleteWarn err:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -200,10 +204,10 @@ public class SystemCache {
|
|
|
if (json.has("control") && json.getJSONObject("control").has("custom")
|
|
|
&& json.getJSONObject("control").getJSONObject("custom").has("trial_mode")) {
|
|
|
try {
|
|
|
- this.trialMode = TrialMode.findByName(json.getJSONObject("control").getJSONObject("custom")
|
|
|
- .getString("trial_mode"));
|
|
|
+ this.trialMode = TrialMode
|
|
|
+ .findByName(json.getJSONObject("control").getJSONObject("custom").getString("trial_mode"));
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.warn("trialMode err:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -214,7 +218,7 @@ public class SystemCache {
|
|
|
this.yjsObjectiveEnable = json.getJSONObject("control").getJSONObject("custom")
|
|
|
.getBoolean("yjs_objective_enable");
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.warn("yjsObjectiveEnable err:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
} else {
|