|
@@ -1054,6 +1054,10 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
bo.setPublishStatus(1);
|
|
|
bo.setBusinessList(businessList);
|
|
|
bo.setCreateTime(nowTime);
|
|
|
+ answerQuestion = content.replace("正确答案:", "");
|
|
|
+ if (Validator.isEmpty(answerQuestion)) {
|
|
|
+ throw new CustomException("正确答案错误");
|
|
|
+ }
|
|
|
if(type==1){
|
|
|
list1.add(bo);
|
|
|
}
|
|
@@ -1229,10 +1233,6 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
if(nowPart!=7){
|
|
|
strContent = "";
|
|
|
}
|
|
|
- answerQuestion = content.replace("正确答案:", "");
|
|
|
- if (Validator.isEmpty(answerQuestion)) {
|
|
|
- throw new CustomException("正确答案错误");
|
|
|
- }
|
|
|
nowPart = 7;
|
|
|
if (isOption) {
|
|
|
//选择题
|
|
@@ -1259,15 +1259,15 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
}
|
|
|
else if (content.startsWith("解题思路")||(nowPart==8&&!isLineStart(content))) {
|
|
|
nowPart = 8;
|
|
|
- analysisContent = analysisContent + content +"<br />";
|
|
|
+ analysisContent = analysisContent + "<br />"+ content +"<br />";
|
|
|
}
|
|
|
else if (content.startsWith("考查考点")||(nowPart==9&&!isLineStart(content))) {
|
|
|
nowPart = 9;
|
|
|
- analysisContent = analysisContent + content +"<br />";
|
|
|
+ analysisContent = analysisContent + "<br />"+ content +"<br />";
|
|
|
}
|
|
|
else if (content.startsWith("老师解答")||(nowPart==10&&!isLineStart(content))) {
|
|
|
nowPart = 10;
|
|
|
- analysisContent = analysisContent + content +"<br />";
|
|
|
+ analysisContent = analysisContent + "<br />"+ content +"<br />";
|
|
|
}
|
|
|
}
|
|
|
//遍历正文
|
|
@@ -1432,6 +1432,9 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
bo.setPublishStatus(1);
|
|
|
bo.setBusinessList(businessList);
|
|
|
bo.setCreateTime(nowTime);
|
|
|
+ if (Validator.isEmpty(answerQuestion)) {
|
|
|
+ throw new CustomException("正确答案错误");
|
|
|
+ }
|
|
|
if(type==1){
|
|
|
list1.add(bo);
|
|
|
}
|
|
@@ -1608,9 +1611,6 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
strContent = "";
|
|
|
}
|
|
|
answerQuestion = content.replace("正确答案:", "");
|
|
|
- if (Validator.isEmpty(answerQuestion)) {
|
|
|
- throw new CustomException("正确答案错误");
|
|
|
- }
|
|
|
nowPart = 7;
|
|
|
if (isOption) {
|
|
|
//选择题
|
|
@@ -1637,15 +1637,15 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
|
|
|
}
|
|
|
else if (content.startsWith("解题思路")||(nowPart==8&&!isLineStart(content))) {
|
|
|
nowPart = 8;
|
|
|
- analysisContent = analysisContent + content +"<br />";
|
|
|
+ analysisContent = analysisContent + "<br />"+ content +"<br />";
|
|
|
}
|
|
|
else if (content.startsWith("考查考点")||(nowPart==9&&!isLineStart(content))) {
|
|
|
nowPart = 9;
|
|
|
- analysisContent = analysisContent + content +"<br />";
|
|
|
+ analysisContent = analysisContent + "<br />"+ content +"<br />";
|
|
|
}
|
|
|
else if (content.startsWith("老师解答")||(nowPart==10&&!isLineStart(content))) {
|
|
|
nowPart = 10;
|
|
|
- analysisContent = analysisContent + content +"<br />";
|
|
|
+ analysisContent = analysisContent + "<br />"+ content +"<br />";
|
|
|
}
|
|
|
}
|
|
|
//遍历正文
|