|
@@ -1,6 +1,7 @@
|
|
package com.qmth.distributed.print.api;
|
|
package com.qmth.distributed.print.api;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.distributed.print.business.backup.MySQLDatabaseBackup;
|
|
import com.qmth.distributed.print.business.backup.MySQLDatabaseBackup;
|
|
@@ -12,7 +13,6 @@ import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.entity.*;
|
|
import com.qmth.teachcloud.common.entity.*;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.service.*;
|
|
import com.qmth.teachcloud.common.service.*;
|
|
-import com.qmth.teachcloud.common.util.JacksonUtil;
|
|
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
@@ -83,7 +83,13 @@ public class SysAdminSetController {
|
|
SysConfig sysConfigSyncServicePath = commonCacheService.addSysConfigCache(schoolId, SystemConstant.SYNC_SERVICE_PATH);
|
|
SysConfig sysConfigSyncServicePath = commonCacheService.addSysConfigCache(schoolId, SystemConstant.SYNC_SERVICE_PATH);
|
|
String syncServicePath = null;
|
|
String syncServicePath = null;
|
|
if (Objects.nonNull(sysConfigSyncServicePath)) {
|
|
if (Objects.nonNull(sysConfigSyncServicePath)) {
|
|
- syncServicePath = JacksonUtil.parseJson(sysConfigSyncServicePath.getConfigValue());
|
|
|
|
|
|
+ syncServicePath = sysConfigSyncServicePath.getConfigValue();
|
|
|
|
+ } else {
|
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
|
+ jsonObject.put(SystemConstant.QUESTION, "");
|
|
|
|
+ jsonObject.put(SystemConstant.CLOUD_MARK, "");
|
|
|
|
+ jsonObject.put(SystemConstant.REPORT, "");
|
|
|
|
+ syncServicePath = jsonObject.toString();
|
|
}
|
|
}
|
|
return ResultUtil.ok(new SysAdminSetResult(schoolId, syncServicePath));
|
|
return ResultUtil.ok(new SysAdminSetResult(schoolId, syncServicePath));
|
|
}
|
|
}
|
|
@@ -106,7 +112,7 @@ public class SysAdminSetController {
|
|
}
|
|
}
|
|
sysConfigService.saveOrUpdate(sysConfigSyncServicePath);
|
|
sysConfigService.saveOrUpdate(sysConfigSyncServicePath);
|
|
|
|
|
|
- commonCacheService.removeSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATH);
|
|
|
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.SYNC_SERVICE_PATH);
|
|
return ResultUtil.ok(true);
|
|
return ResultUtil.ok(true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -130,7 +136,10 @@ public class SysAdminSetController {
|
|
if (Objects.nonNull(sysConfigPdfSize)) {
|
|
if (Objects.nonNull(sysConfigPdfSize)) {
|
|
pdfSize = Arrays.asList(sysConfigPdfSize.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(", "));
|
|
pdfSize = Arrays.asList(sysConfigPdfSize.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(", "));
|
|
}
|
|
}
|
|
- return ResultUtil.ok(new SysAdminSetResult(schoolId, CollectionUtils.isEmpty(pdfSize) ? new ArrayList<>() : pdfSize));
|
|
|
|
|
|
+ SysAdminSetResult sysAdminSetResult = new SysAdminSetResult();
|
|
|
|
+ sysAdminSetResult.setSchoolId(schoolId);
|
|
|
|
+ sysAdminSetResult.setPdfSize(CollectionUtils.isEmpty(pdfSize) ? new ArrayList<>() : pdfSize);
|
|
|
|
+ return ResultUtil.ok(sysAdminSetResult);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "试卷规格配置保存")
|
|
@ApiOperation(value = "试卷规格配置保存")
|
|
@@ -155,7 +164,7 @@ public class SysAdminSetController {
|
|
}
|
|
}
|
|
sysConfigService.saveOrUpdate(sysConfigPdfSize);
|
|
sysConfigService.saveOrUpdate(sysConfigPdfSize);
|
|
|
|
|
|
- commonCacheService.removeSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.PDF_SIZE_LIST);
|
|
|
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.PDF_SIZE_LIST);
|
|
return ResultUtil.ok(true);
|
|
return ResultUtil.ok(true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -197,8 +206,8 @@ public class SysAdminSetController {
|
|
sysConfigList.add(sysConfigTeachcloudExchangeSerivePath);
|
|
sysConfigList.add(sysConfigTeachcloudExchangeSerivePath);
|
|
sysConfigService.saveOrUpdateBatch(sysConfigList);
|
|
sysConfigService.saveOrUpdateBatch(sysConfigList);
|
|
|
|
|
|
- commonCacheService.removeSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.ACCOUNT_SMS_VERIFY);
|
|
|
|
- commonCacheService.removeSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.TEACHCLOUD_EXCHANGE_SERVICE_PATH);
|
|
|
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.ACCOUNT_SMS_VERIFY);
|
|
|
|
+ commonCacheService.updateSysConfigCache(sysAdminSetParam.getSchoolId(), SystemConstant.TEACHCLOUD_EXCHANGE_SERVICE_PATH);
|
|
return ResultUtil.ok(true);
|
|
return ResultUtil.ok(true);
|
|
}
|
|
}
|
|
|
|
|