wangliang 2 жил өмнө
parent
commit
72c48ea921

+ 4 - 4
distributed-print/src/main/java/com/qmth/distributed/print/api/SysAdminSetController.java

@@ -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);
     }
 

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -148,7 +148,7 @@ public class SystemConstant {
      */
     public static final String ACCOUNT_SMS_VERIFY = "account.sms.verify";
     public static final String TEACHCLOUD_EXCHANGE_HOST_URL = "teachcloud.exchange.host.url";
-    public static final String SYNC_SERVICE_PATH = "sync.service.path";
+    public static final String SYNC_SERVICE_PATHS = "sync.service.paths";
     public static final String PDF_SIZE_LIST = "pdf.size.list";
 
     /**