|
@@ -89,9 +89,9 @@ public class SysAdminSetController {
|
|
|
syncServicePath = sysConfigSyncServicePath.getConfigValue();
|
|
|
} else {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put(SystemConstant.QUESTION, "");
|
|
|
- jsonObject.put(SystemConstant.CLOUD_MARK, "");
|
|
|
- jsonObject.put(SystemConstant.REPORT, "");
|
|
|
+ jsonObject.put(SystemConstant.QUESTION_HOST_URL, "");
|
|
|
+ jsonObject.put(SystemConstant.CLOUDMARK_HOST_URL, "");
|
|
|
+ jsonObject.put(SystemConstant.TEACHCLOUD_REPORT_HOST_URL, "");
|
|
|
syncServicePath = jsonObject.toString();
|
|
|
}
|
|
|
return ResultUtil.ok(new SysAdminSetResult(schoolId, syncServicePath));
|
|
@@ -110,6 +110,21 @@ public class SysAdminSetController {
|
|
|
SysConfig sysConfigSyncServicePath = commonCacheService.addSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATH);
|
|
|
if (Objects.isNull(sysConfigSyncServicePath)) {
|
|
|
sysConfigSyncServicePath = new SysConfig(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATH, "同步配置地址", sysAdminSetParam.getSyncServicePath());
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(sysConfigSyncServicePath.getConfigValue());
|
|
|
+ SysConfig sysConfigQuestionHostUrl = commonCacheService.addSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.QUESTION_HOST_URL);
|
|
|
+ sysConfigQuestionHostUrl.setConfigValue(jsonObject.getString(SystemConstant.QUESTION_HOST_URL));
|
|
|
+
|
|
|
+ SysConfig sysConfigCloudmarkHostUrl = commonCacheService.addSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
+ sysConfigCloudmarkHostUrl.setConfigValue(jsonObject.getString(SystemConstant.CLOUDMARK_HOST_URL));
|
|
|
+
|
|
|
+ SysConfig sysConfigTeachcloudReportHostUrl = commonCacheService.addSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.TEACHCLOUD_REPORT_HOST_URL);
|
|
|
+ sysConfigQuestionHostUrl.setConfigValue(jsonObject.getString(SystemConstant.TEACHCLOUD_REPORT_HOST_URL));
|
|
|
+
|
|
|
+ sysConfigService.saveOrUpdateBatch(Arrays.asList(sysConfigQuestionHostUrl, sysConfigCloudmarkHostUrl, sysConfigTeachcloudReportHostUrl));
|
|
|
+
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.QUESTION_HOST_URL);
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.TEACHCLOUD_REPORT_HOST_URL);
|
|
|
} else {
|
|
|
sysConfigSyncServicePath.setConfigValue(sysAdminSetParam.getSyncServicePath());
|
|
|
}
|