| | |
| | | <result property="reply" column="reply"/> |
| | | <result property="scriptScore" column="script_score"/> |
| | | <result property="scoreType" column="score_type"/> |
| | | <result property="prologue" column="prologue"/> |
| | | <result property="instruction" column="instruction"/> |
| | | <result property="conclusion" column="conclusion"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTemplateVo"> |
| | | select svyid, |
| | | categoryid, |
| | | instruction, |
| | | prologue, |
| | | conclusion, |
| | | value_type, |
| | | reply, |
| | | score_type, |
| | |
| | | resultMap="SvyLibTemplateResult"> |
| | | SELECT |
| | | a.svyid, |
| | | a.conclusion, |
| | | a.instruction, |
| | | a.prologue, |
| | | a.categoryid, |
| | | a.svycode, |
| | | a.svyname, |
| | |
| | | <if test="categoryid != null ">and a.categoryid = #{categoryid}</if> |
| | | <if test="svyid != null ">and a.svyid = #{svyid}</if> |
| | | <if test="svyname != null and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if> |
| | | <if test="description != null and description != ''">and b.icd10name like concat('%', #{description}, '%') |
| | | <if test="description != null and description != ''">and b.icd10name like concat('%', #{description}, '%') |
| | | </if> |
| | | </where> |
| | | order by a.create_time desc |
| | |
| | | <if test="reply != null">reply,</if> |
| | | <if test="scriptScore != null">script_score,</if> |
| | | <if test="scoreType != null">score_type,</if> |
| | | <if test="conclusion != null">conclusion,</if> |
| | | <if test="instruction != null">instruction,</if> |
| | | <if test="prologue != null">prologue,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="categoryid != null">#{categoryid},</if> |
| | |
| | | <if test="reply != null">#{reply},</if> |
| | | <if test="scriptScore != null">#{scriptScore},</if> |
| | | <if test="scoreType != null">#{scoreType},</if> |
| | | <if test="conclusion != null">#{conclusion},</if> |
| | | <if test="instruction != null">#{instruction},</if> |
| | | <if test="prologue != null">#{prologue},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="reply != null">reply = #{reply},</if> |
| | | <if test="scriptScore != null">script_score = #{scriptScore},</if> |
| | | <if test="scoreType != null">score_type = #{scoreType},</if> |
| | | <if test="conclusion != null">conclusion=#{conclusion},</if> |
| | | <if test="instruction != null">instruction=#{instruction},</if> |
| | | <if test="prologue != null">prologue=#{prologue},</if> |
| | | </trim> |
| | | where svyid = #{svyid} |
| | | </update> |