|
@@ -11,6 +11,7 @@ import com.qmth.teachcloud.common.enums.TaskResultEnum;
|
|
import com.qmth.teachcloud.common.enums.TaskStatusEnum;
|
|
import com.qmth.teachcloud.common.enums.TaskStatusEnum;
|
|
import com.qmth.teachcloud.common.enums.TaskTypeEnum;
|
|
import com.qmth.teachcloud.common.enums.TaskTypeEnum;
|
|
import com.qmth.teachcloud.common.enums.UploadFileEnum;
|
|
import com.qmth.teachcloud.common.enums.UploadFileEnum;
|
|
|
|
+import com.qmth.teachcloud.common.service.CommonCacheService;
|
|
import com.qmth.teachcloud.common.service.SysConfigService;
|
|
import com.qmth.teachcloud.common.service.SysConfigService;
|
|
import com.qmth.teachcloud.common.service.TBTaskService;
|
|
import com.qmth.teachcloud.common.service.TBTaskService;
|
|
import com.qmth.teachcloud.common.util.FileStoreUtil;
|
|
import com.qmth.teachcloud.common.util.FileStoreUtil;
|
|
@@ -113,10 +114,10 @@ public abstract class AsyncImportTaskTemplete {
|
|
path = path.replaceAll("\\\\", "/");
|
|
path = path.replaceAll("\\\\", "/");
|
|
String type = (String) jsonObject.get(SystemConstant.TYPE);
|
|
String type = (String) jsonObject.get(SystemConstant.TYPE);
|
|
|
|
|
|
- String charset = SystemConstant.CHARSET_GB2312;
|
|
|
|
- SysConfigService sysConfigService = SpringContextHolder.getBean(SysConfigService.class);
|
|
|
|
- if (sysConfigService != null) {
|
|
|
|
- SysConfig sysConfig = sysConfigService.getByKey("sys.txt.charset");
|
|
|
|
|
|
+ String charset = SystemConstant.CHARSET_GBK;
|
|
|
|
+ CommonCacheService commonCacheService = SpringContextHolder.getBean(CommonCacheService.class);
|
|
|
|
+ if (commonCacheService != null) {
|
|
|
|
+ SysConfig sysConfig = commonCacheService.txtCharsetCache();
|
|
if (sysConfig != null && StringUtils.isNotBlank(sysConfig.getConfigValue())) {
|
|
if (sysConfig != null && StringUtils.isNotBlank(sysConfig.getConfigValue())) {
|
|
charset = sysConfig.getConfigValue();
|
|
charset = sysConfig.getConfigValue();
|
|
}
|
|
}
|