|
@@ -12,12 +12,22 @@ import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.experimental.Accessors;
|
|
import lombok.experimental.Accessors;
|
|
import org.jeecg.common.aspect.annotation.Dict;
|
|
import org.jeecg.common.aspect.annotation.Dict;
|
|
|
|
+import org.jeecg.common.util.MinioUtil;
|
|
|
|
+import org.jeecg.config.oss.MinioConfig;
|
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
|
+import org.springframework.boot.autoconfigure.web.ServerProperties;
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
|
|
+import org.yaml.snakeyaml.Yaml;
|
|
|
|
|
|
|
|
+import java.io.InputStream;
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
|
|
+import java.nio.file.Files;
|
|
|
|
+import java.nio.file.Paths;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Description: question
|
|
* @Description: question
|
|
@@ -138,12 +148,27 @@ public class Question implements Serializable {
|
|
*/
|
|
*/
|
|
@TableField(exist = false)
|
|
@TableField(exist = false)
|
|
private Integer questionNum;
|
|
private Integer questionNum;
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 子题目列表
|
|
* 子题目列表
|
|
*/
|
|
*/
|
|
@TableField(exist = false)
|
|
@TableField(exist = false)
|
|
private List<Question> subQuestionList;
|
|
private List<Question> subQuestionList;
|
|
|
|
+
|
|
|
|
+ //适配所有指定存储路径
|
|
|
|
+ public void setContent(String content) {
|
|
|
|
+ String MinioUrl=MinioUtil.getMinioUrl();
|
|
|
|
+ MinioUrl=MinioUrl.substring(0, MinioUrl.indexOf(":", MinioUrl.indexOf(":") + 1))+":8080/";
|
|
|
|
+ //所有地址都替换成标识符
|
|
|
|
+ if (content.contains(MinioUrl)){
|
|
|
|
+ content= content.replace(MinioUrl,"{{{agreement:ip:prot}}}");
|
|
|
|
+ }
|
|
|
|
+ //所有标识符都替换成地址
|
|
|
|
+ else if (content.contains("{{{agreement:ip:prot}}}")){
|
|
|
|
+ content= content.replace("{{{agreement:ip:prot}}}",MinioUrl);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.content = content;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|