|
@@ -6,12 +6,13 @@
|
|
|
<resultMap id="BaseResultMap" type="com.diagbot.entity.QuestionInfo">
|
|
|
<id column="id" property="id" />
|
|
|
<result column="name" property="name" />
|
|
|
- <result column="show_name" property="showName" />
|
|
|
+ <result column="tag_name" property="tagName" />
|
|
|
<result column="sex_type" property="sexType" />
|
|
|
<result column="age_begin" property="ageBegin" />
|
|
|
<result column="age_end" property="ageEnd" />
|
|
|
<result column="type" property="type" />
|
|
|
<result column="control_type" property="controlType" />
|
|
|
+ <result column="input_format" property="inputFormat" />
|
|
|
<result column="sub_type" property="subType" />
|
|
|
<result column="is_group" property="isGroup" />
|
|
|
<result column="add_line" property="addLine" />
|
|
@@ -52,4 +53,20 @@
|
|
|
order by m.order_no
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getByQuestionRelation" parameterType="java.util.Map" resultMap="BaseResultMap">
|
|
|
+ select t.* from icss_question_info t, icss_question_relation r
|
|
|
+ where t.is_deleted = 'N' and r.is_deleted = 'N' and r.sibling_question = t.id
|
|
|
+ and r.curent_question = #{id}
|
|
|
+ <if test="sexType != null">
|
|
|
+ and t.sex_type in (3, #{sexType})
|
|
|
+ </if>
|
|
|
+ <if test="age != null">
|
|
|
+ <![CDATA[ and t.age_begin <= #{age} ]]>
|
|
|
+ <![CDATA[ and t.age_end >= #{age} ]]>
|
|
|
+ </if>
|
|
|
+ order by r.order_no
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|