wangliang 1 rok pred
rodič
commit
fd22f0215e

+ 3 - 3
themis-admin/src/main/resources/application.properties

@@ -21,7 +21,7 @@ spring.application.name=themis-admin
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
-db.name=themis_v1.1
+db.name=themis_release
 db.username=root
 db.password=123456789
 
@@ -120,8 +120,8 @@ rocketmq.producer.enable-msg-trace=true
 #\u81EA\u5B9A\u4E49\u7684\u6D88\u606F\u8F68\u8FF9\u4E3B\u9898
 #rocketmq.producer.customized-trace-topic=my-trace-topic
 
-com.qmth.solar.access-key=8134f6aae0134770b8618913705d3667
-com.qmth.solar.access-secret=s1NENpvc8Jq5evcE0B7GfLmoQOvwmlCy
+com.qmth.solar.access-key=0de21ea8c3f041819af866a160f38b12
+com.qmth.solar.access-secret=Ly3AxTF2Mbek8vcTmZiKa8zDDKUej4n2
 #com.qmth.solar.license=/Volumes/extend/\u542F\u660E/\u77E5\u5B66\u77E5\u8003/\u897F\u4EA4\u5927\u6FC0\u6D3B\u6587\u4EF6/tc-xjtu.lic
 
 #\u65E0\u9700\u9274\u6743\u7684url

+ 11 - 9
themis-business/src/main/java/com/qmth/themis/business/templete/impl/TaskExamPaperImportTemplete.java

@@ -28,7 +28,6 @@ import com.qmth.themis.common.exception.BusinessException;
 import com.qmth.themis.common.util.FileUtil;
 import com.qmth.themis.common.util.Result;
 import com.qmth.themis.common.util.ResultUtil;
-import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -37,7 +36,10 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
-import java.io.*;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.nio.charset.StandardCharsets;
 import java.util.*;
@@ -549,13 +551,13 @@ public class TaskExamPaperImportTemplete implements TaskImportTemplete {
         if (("image".equals(type) || "audio".equals(type)) && StringUtils.isNotBlank(value) && !value.toLowerCase()
                 .startsWith("https://") && !value.toLowerCase().startsWith("http://")) {
             if ("image".equals(type) && value.contains("data:image")) {
-                String suff = value.substring(11, value.indexOf(";"));
-                byte[] bytes = Base64.decodeBase64(value.substring(value.indexOf(",") + 1));
-                String filePath =
-                        "upload" + File.separator + DateUtil.format(new Date(), Constants.DATE_PATTERN) + File.separator + SystemConstant.getNanoId() + "." + suff;
-                String md5 = BinaryUtil.toBase64String(BinaryUtil.calculateMd5(bytes));
-                ossUtil.upload(true, filePath, new ByteArrayInputStream(bytes), md5);
-                blockInfo.put("value", ossUtil.getAliYunOssPublicDomain().getPublicUrl() + "/" + filePath);
+//                String suff = value.substring(11, value.indexOf(";"));
+//                byte[] bytes = Base64.decodeBase64(value.substring(value.indexOf(",") + 1));
+//                String filePath =
+//                        "upload" + File.separator + DateUtil.format(new Date(), Constants.DATE_PATTERN) + File.separator + SystemConstant.getNanoId() + "." + suff;
+//                String md5 = BinaryUtil.toBase64String(BinaryUtil.calculateMd5(bytes));
+//                ossUtil.upload(true, filePath, new ByteArrayInputStream(bytes), md5);
+                blockInfo.put("value", value);
             } else {
                 String suff = value.substring(value.indexOf("."));
                 String filePath =

+ 3 - 3
themis-exam/src/main/resources/application.properties

@@ -13,7 +13,7 @@ spring.application.name=themis-exam
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
-db.name=themis_v1.1
+db.name=themis_release
 db.username=root
 db.password=123456789
 
@@ -98,5 +98,5 @@ sys.config.oss=true
 #sys.config.serverUpload=/Users/king/git/themis-files/
 #spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
 
-com.qmth.solar.access-key=8134f6aae0134770b8618913705d3667
-com.qmth.solar.access-secret=s1NENpvc8Jq5evcE0B7GfLmoQOvwmlCy
+com.qmth.solar.access-key=0de21ea8c3f041819af866a160f38b12
+com.qmth.solar.access-secret=Ly3AxTF2Mbek8vcTmZiKa8zDDKUej4n2

+ 1 - 1
themis-task/src/main/resources/application.properties

@@ -13,7 +13,7 @@ spring.application.name=themis-task
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
-db.name=themis_v1.1
+db.name=themis_release
 db.username=root
 db.password=123456789