|
@@ -0,0 +1,44 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.diagbot.mapper.QuestionInfoMapper">
|
|
|
+
|
|
|
+ <!-- 通用查询映射结果 -->
|
|
|
+ <resultMap id="BaseResultMap" type="com.diagbot.entity.QuestionInfo">
|
|
|
+ <id column="id" property="id" />
|
|
|
+ <result column="is_deleted" property="isDeleted" />
|
|
|
+ <result column="gmt_create" property="gmtCreate" />
|
|
|
+ <result column="gmt_modified" property="gmtModified" />
|
|
|
+ <result column="creator" property="creator" />
|
|
|
+ <result column="modifier" property="modifier" />
|
|
|
+ <result column="name" property="name" />
|
|
|
+ <result column="show_name" property="showName" />
|
|
|
+ <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="sub_type" property="subType" />
|
|
|
+ <result column="is_group" property="isGroup" />
|
|
|
+ <result column="add_line" property="addLine" />
|
|
|
+ <result column="label_prefix" property="labelPrefix" />
|
|
|
+ <result column="label_suffix" property="labelSuffix" />
|
|
|
+ <result column="min_value" property="minValue" />
|
|
|
+ <result column="max_value" property="maxValue" />
|
|
|
+ <result column="judge_type" property="judgeType" />
|
|
|
+ <result column="tag_questions" property="tagQuestions" />
|
|
|
+ <result column="copy_type" property="copyType" />
|
|
|
+ <result column="remark" property="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="getByParam" parameterType="java.util.Map" resultMap="BaseResultMap">
|
|
|
+ select * from icss_question_info where is_deleted = 'N'
|
|
|
+ and id = #{id}
|
|
|
+ <if test="sexType != null">
|
|
|
+ and sex_type in (3, #{sexType})
|
|
|
+ </if>
|
|
|
+ <if test="age != null">
|
|
|
+ <![CDATA[ and age_begin <= #{age} ]]>
|
|
|
+ <![CDATA[ and age_end >= #{age} ]]>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|