Bläddra i källkod

问答新增问答类型

wjj 1 vecka sedan
förälder
incheckning
52b2ff3d30

+ 1 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsQuestionAndAnswerServiceImpl.java

@@ -77,6 +77,7 @@ public class FsQuestionAndAnswerServiceImpl extends ServiceImpl<FsQuestionAndAns
         List<AnswerVO> answerVOS = JSON.parseArray(fsQuestionAndAnswer.getJsonInfo(), AnswerVO.class);
         vo.setAnswers(answerVOS);
         vo.setId(fsQuestionAndAnswer.getId());
+        vo.setType(fsQuestionAndAnswer.getType());
         redisCache.setCacheObject(cacheKey, vo, (int) CACHE_EXPIRE_TIME, TimeUnit.SECONDS);
         return vo;
     }

+ 3 - 0
fs-service/src/main/java/com/fs/his/vo/FsQuestionAndAnswerVO.java

@@ -12,4 +12,7 @@ public class FsQuestionAndAnswerVO {
     private String questionName;
 
     private List<AnswerVO> answers;
+
+    /** 问答类型 1-信息采集 2-套餐包问答数据 */
+    private Integer type;
 }

+ 6 - 1
fs-service/src/main/resources/mapper/his/FsQuestionAndAnswerMapper.xml

@@ -10,16 +10,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="questionName"    column="question_name"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="type"    column="type"    />
     </resultMap>
 
     <sql id="selectFsQuestionAndAnswerVo">
-        select id,question_name ,json_info, create_time, update_time from fs_question_and_answer
+        select id,question_name ,json_info, create_time, update_time,type from fs_question_and_answer
     </sql>
 
     <select id="selectFsQuestionAndAnswerList" parameterType="FsQuestionAndAnswer" resultMap="FsQuestionAndAnswerResult">
         <include refid="selectFsQuestionAndAnswerVo"/>
         <where>  
             <if test="jsonInfo != null  and jsonInfo != ''"> and json_info = #{jsonInfo}</if>
+            <if test="type != null"> and type = #{type}</if>
         </where>
     </select>
     
@@ -36,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="questionName != null">question_name,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="type != null">type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -43,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="questionName != null">#{questionName},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="type != null">#{type},</if>
          </trim>
     </insert>
 
@@ -53,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="questionName != null">question_name = #{questionName},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="type != null">update_time = #{type},</if>
         </trim>
         where id = #{id}
     </update>