@@ -376,7 +376,14 @@ public class SysController {
throw ExceptionResultEnum.SCHOOL_NO_DATA.exception();
}
Map<String, String> map = new HashMap<>();
- map.put(SystemConstant.LOGO, basicSchool.getLogo());
+ if (Objects.nonNull(basicSchool.getLogo()) && (!basicSchool.getLogo().startsWith("http") || !basicSchool.getLogo().startsWith("https"))) {
+ String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
+ String filePath = SystemConstant.getLocalFilePath(hostUrl, basicSchool.getLogo());
+ String url = hostUrl + File.separator + filePath;
+ map.put(SystemConstant.LOGO, url);
+ } else {
+ map.put(SystemConstant.LOGO, basicSchool.getLogo());
+ }
map.put("name", basicSchool.getName());
return ResultUtil.ok(map);
} else {
@@ -61,7 +61,7 @@ com.qmth.fss.private.config=oss://key:secret@teachcloud-print-dev-private.oss-ap
com.qmth.fss.private.server=https://oss-file.qmth.com.cn/teachcloud-print-dev-private
#\u7CFB\u7EDF\u914D\u7F6E
-sys.config.oss=false
+sys.config.oss=true
sys.config.attachmentType=.xlsx,.xls,.doc,.docx,.pdf,.jpg,.jpeg,.png,.html,.zip,.mp3,.wav,.dll,.exe,.ftl,.bpmn,.xml
sys.config.attachmentLength=100
sys.config.attachmentSize=200
@@ -160,8 +160,8 @@ sync.config.groupCountUrl=/api/exam/mark_group/count
sync.config.groupDeleteUrl=/api/exam/mark_group/delete
sync.config.markerSaveUrl=/api/exam/marker/save
-#com.qmth.solar.access-key=274f823e5f59410f8b3bb6edcd8e2b6e
-#com.qmth.solar.access-secret=y7AO6W0TOdTF8HpWBwGHbp3wfIHsmUKr
+com.qmth.solar.access-key=274f823e5f59410f8b3bb6edcd8e2b6e
+com.qmth.solar.access-secret=y7AO6W0TOdTF8HpWBwGHbp3wfIHsmUKr
#com.qmth.solar.license=/Volumes/extend/\u542F\u660E/\u5206\u5E03\u5F0F\u5370\u5237/\u5206\u5E03\u5F0F\u5370\u5237&\u6559\u7814\u5206\u6790v3.1.0/tc-dev-wl.lic
sms.config.smsNormalCode=qmth
@@ -11,6 +11,7 @@ import com.qmth.teachcloud.common.enums.TFCustomTypeEnum;
import com.qmth.teachcloud.common.service.CommonCacheService;
import com.qmth.teachcloud.common.util.Base64Util;
import com.qmth.teachcloud.common.util.ServletUtil;
+import org.apache.commons.io.IOUtils;
import org.springframework.cglib.beans.BeanMap;
import java.io.*;
@@ -566,7 +567,7 @@ public class SystemConstant {
try {
byte[] b = Base64Util.decode(imgBase64);
out = new FileOutputStream(filePath);
- out.write(b);
+ IOUtils.write(b, out);
} catch (Exception e) {
e.printStackTrace();
} finally {
@@ -30,6 +30,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
+import java.io.File;
import java.security.NoSuchAlgorithmException;
import java.util.*;
import java.util.stream.Collectors;
@@ -230,7 +231,14 @@ public class SysController {