Browse Source

解析展示

master
yanyan 3 years ago
parent
commit
cf67e75aff
  1. 11
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/domain/QuestionAnswer.java
  2. 2
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/impl/SceneQuestionServiceImpl.java
  3. 7
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/resources/mapper/QuestionAnswerMapper.xml

11
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/domain/QuestionAnswer.java

@ -30,6 +30,9 @@ public class QuestionAnswer extends BaseDomain
/** 正确答案 */
private String correctAnswer;
/** 解析 */
private String analysis;
/** 是否正确(0:错误; 1:正确;) */
private Integer correct;
@ -95,4 +98,12 @@ public class QuestionAnswer extends BaseDomain
public void setAsk(String ask) {
this.ask = ask;
}
public String getAnalysis() {
return analysis;
}
public void setAnalysis(String analysis) {
this.analysis = analysis;
}
}

2
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/impl/SceneQuestionServiceImpl.java

@ -321,7 +321,7 @@ public class SceneQuestionServiceImpl implements ISceneQuestionService {
String newChannel = stringStringMap.get(channel).getKey();
String newAnalysis = stringStringMap.get(channel).getValue();
item.put("channel", StringUtils.isEmpty(newChannel) ? channel : channel + ":" + newChannel);
item.put("analysis", StringUtils.isNotEmpty(newChannel) && StringUtils.isNotEmpty(newAnalysis) ? channel + ":" + newChannel + ":" + newAnalysis : "");
item.put("analysis", StringUtils.isNotEmpty(newChannel) && StringUtils.isNotEmpty(newAnalysis) ? newAnalysis : "");
}
})
.collect(Collectors.toList());

7
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/resources/mapper/QuestionAnswerMapper.xml

@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="answer" column="answer" />
<result property="correctAnswer" column="correct_answer" />
<result property="correct" column="correct" />
<result property="analysis" column="analysis" />
<result property="creator" column="creator" />
<result property="createTime" column="create_time" />
<result property="updator" column="updator" />
@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQuestionAnswerVo">
select guid, question_fre_id, question_id, ask, answer, correct_answer, correct, creator, create_time, updator, update_time from question_answer
select guid, question_fre_id, question_id, ask, answer, analysis, correct_answer, correct, creator, create_time, updator, update_time from question_answer
</sql>
<select id="selectQuestionAnswerList" parameterType="QuestionAnswer" resultMap="QuestionAnswerResult">
@ -28,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="questionFreId != null and questionFreId != ''"> and question_fre_id = #{questionFreId}</if>
<if test="questionId != null and questionId != ''"> and question_id = #{questionId}</if>
<if test="answer != null and answer != ''"> and answer = #{answer}</if>
<if test="analysis != null and analysis != ''"> and analysis = #{analysis}</if>
<if test="correctAnswer != null and correctAnswer != ''"> and correct_answer = #{correctAnswer}</if>
<if test="correct != null "> and correct = #{correct}</if>
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
@ -50,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="answer != null and answer != ''">answer,</if>
<if test="correctAnswer != null and correctAnswer != ''">correct_answer,</if>
<if test="correct != null ">correct,</if>
<if test="analysis != null and analysis != ''">analysis,</if>
<if test="creator != null and creator != ''">creator,</if>
<if test="createTime != null ">create_time,</if>
<if test="updator != null and updator != ''">updator,</if>
@ -63,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="answer != null and answer != ''">#{answer},</if>
<if test="correctAnswer != null and correctAnswer != ''">#{correctAnswer},</if>
<if test="correct != null ">#{correct},</if>
<if test="analysis != null and analysis != ''">#{analysis},</if>
<if test="creator != null and creator != ''">#{creator},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="updator != null and updator != ''">#{updator},</if>
@ -79,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="answer != null and answer != ''">answer = #{answer},</if>
<if test="correctAnswer != null and correctAnswer != ''">correct_answer = #{correctAnswer},</if>
<if test="correct != null ">correct = #{correct},</if>
<if test="analysis != null and analysis != ''">analysis = #{analysis},</if>
<if test="creator != null and creator != ''">creator = #{creator},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="updator != null and updator != ''">updator = #{updator},</if>

Loading…
Cancel
Save