|
@@ -82,7 +82,7 @@ public class SysAdminSetController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "同步配置信息", response = SysAdminSetResult.class)})
|
|
|
@RequestMapping(value = "/sync/select", method = RequestMethod.POST)
|
|
|
public Result sysadminSyncSelect(@ApiParam(value = "学校id ", required = true) @RequestParam Long schoolId) {
|
|
|
- SysConfig sysConfigSyncServicePath = commonCacheService.addSysConfigCache(schoolId, SystemConstant.SYNC_SERVICE_PATH);
|
|
|
+ SysConfig sysConfigSyncServicePath = commonCacheService.addSysConfigCache(schoolId, SystemConstant.SYNC_SERVICE_PATHS);
|
|
|
String syncServicePath = null;
|
|
|
if (Objects.nonNull(sysConfigSyncServicePath)) {
|
|
|
syncServicePath = sysConfigSyncServicePath.getConfigValue();
|
|
@@ -106,9 +106,9 @@ public class SysAdminSetController {
|
|
|
}
|
|
|
Optional.ofNullable(sysAdminSetParam.getSyncServicePath()).orElseThrow(() -> ExceptionResultEnum.PARAMS_ERROR.exception("同步配置地址不能为空"));
|
|
|
|
|
|
- SysConfig sysConfigSyncServicePath = commonCacheService.addSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATH);
|
|
|
+ SysConfig sysConfigSyncServicePath = commonCacheService.addSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATHS);
|
|
|
if (Objects.isNull(sysConfigSyncServicePath)) {
|
|
|
- sysConfigSyncServicePath = new SysConfig(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATH, "同步配置地址", sysAdminSetParam.getSyncServicePath());
|
|
|
+ sysConfigSyncServicePath = new SysConfig(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATHS, "同步配置地址", 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));
|
|
@@ -129,7 +129,7 @@ public class SysAdminSetController {
|
|
|
}
|
|
|
sysConfigService.saveOrUpdate(sysConfigSyncServicePath);
|
|
|
|
|
|
- commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATH);
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATHS);
|
|
|
return ResultUtil.ok(true);
|
|
|
}
|
|
|
|