he2802 1 rok temu
rodzic
commit
ec1769e617

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/alioss/service/impl/OssServiceImpl.java

@@ -219,7 +219,7 @@ public class OssServiceImpl implements OssService {
                 RandomFilename = "certificate" + "/" + prefixName + (Validator.isNotEmpty(prefixName) ? "" : (sdf.format(new Date()))) + "/" + now;
                 break;
             case 8:
-                RandomFilename = "question" + "/" + prefixName + (Validator.isNotEmpty(prefixName) ? "" : (sdf.format(new Date()))) + "/" + now;
+                RandomFilename = "question" + "/" + prefixName + (Validator.isNotEmpty(prefixName) ? "" : (sdf.format(new Date()))) + "/" + now+"img";
                 break;
             case 9:
                 RandomFilename = "wisdom" + "/" + prefixName + (Validator.isNotEmpty(prefixName) ? "" : (sdf.format(new Date()))) + "/" + now+ String.valueOf(random > 0 ? random : (-1) * random);

+ 5 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -2590,15 +2590,11 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
                                     e.printStackTrace();
                                 }
                                 imgUrl =  ossPath + "?x-oss-process=image/resize,w_" + wPx + ",h_" + HPx;
-                                if(type==5||nowPart==9){
+                                if(type==5||nowPart==9||nowPart==10||nowPart==8){
                                     //正文图片
-                                    if(!answerStatus){
-                                        qContent = qContent+"<br />" +"<p><img src=\"" + ossHost + "/" + imgUrl + "\"></p>";
-                                    }
-                                }
-                                if(answerStatus){
-                                    analysisContent=analysisContent+"<br />" +"<p><img src=\"" + ossHost + "/" + imgUrl + "\"></p>";
+                                    qContent = qContent+"<br />" +"<p><img src=\"" + ossHost + "/" + imgUrl + "\"></p>";
                                 }
+
                             }
                         }
                     }
@@ -2683,6 +2679,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
 
                     if(nowPart==8){
                         if(isNumStart((content))||content.indexOf("###")>-1||content.indexOf("章标题")>-1||content.indexOf("多项选择题")>-1){
+
                             if(Validator.isNotEmpty(qContent)&&!qContent.equals("")){
                                 String[] sList = qContent.split("【解析】");
                                 if (sList.length>1) {
@@ -4510,6 +4507,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
 
 
     private String dealImportAnswer(String Answer) {
+        Answer = Answer.trim();
         String[] itemArray = Answer.split("");
         List<String> list = new ArrayList<>();
         for (String v : itemArray) {