| | |
| | | <mapper namespace="com.smartor.mapper.SvyLibScriptOptionMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.SvyLibScriptOption" id="SvyLibScriptOptionResult"> |
| | | <result property="optionid" column="optionid"/> |
| | | <result property="id" column="id"/> |
| | | <result property="topicid" column="topicid"/> |
| | | <result property="picturePath" column="picture_path"/> |
| | | <result property="svyid" column="svyid"/> |
| | | <result property="topictype" column="topictype"/> |
| | | <result property="optioncode" column="optioncode"/> |
| | | <result property="optioncontent" column="optioncontent"/> |
| | | <result property="isexistdetail" column="isexistdetail"/> |
| | | <result property="detailismandatory" column="detailismandatory"/> |
| | | <result property="isexceptionitem" column="isexceptionitem"/> |
| | | <result property="isabnormal" column="isabnormal"/> |
| | | <result property="istrack" column="istrack"/> |
| | | <result property="score" column="score"/> |
| | | <result property="prompt" column="prompt"/> |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="appendflag" column="appendflag"/> |
| | | <result property="appenddesc" column="appenddesc"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibScriptOptionVo"> |
| | | select optionid, |
| | | select id, |
| | | topicid, |
| | | svyid, |
| | | picture_path, |
| | | appendflag, |
| | | appenddesc, |
| | | topictype, |
| | | optioncode, |
| | | optioncontent, |
| | | isexistdetail, |
| | | detailismandatory, |
| | | isexceptionitem, |
| | | isabnormal, |
| | | istrack, |
| | | score, |
| | | prompt, |
| | |
| | | <if test="optioncontent != null and optioncontent != ''">and optioncontent = #{optioncontent}</if> |
| | | <if test="isexistdetail != null ">and isexistdetail = #{isexistdetail}</if> |
| | | <if test="detailismandatory != null ">and detailismandatory = #{detailismandatory}</if> |
| | | <if test="isexceptionitem != null ">and isexceptionitem = #{isexceptionitem}</if> |
| | | <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if> |
| | | <if test="istrack != null ">and istrack = #{istrack}</if> |
| | | <if test="score != null ">and score = #{score}</if> |
| | | <if test="prompt != null and prompt != ''">and prompt = #{prompt}</if> |
| | |
| | | <if test="oldid != null ">and oldid = #{oldid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="appendflag != null">and appendflag = #{appendflag}</if> |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="picturePath != null">and picture_path = #{picturePath}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibScriptOptionByOptionid" parameterType="Long" resultMap="SvyLibScriptOptionResult"> |
| | | <include refid="selectSvyLibScriptOptionVo"/> |
| | | where optionid = #{optionid} |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertSvyLibScriptOption" parameterType="com.smartor.domain.SvyLibScriptOption" useGeneratedKeys="true" |
| | | keyProperty="optionid"> |
| | | keyProperty="id"> |
| | | insert into svy_lib_ScriptOption |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="topicid != null">topicid,</if> |
| | |
| | | <if test="optioncontent != null">optioncontent,</if> |
| | | <if test="isexistdetail != null">isexistdetail,</if> |
| | | <if test="detailismandatory != null">detailismandatory,</if> |
| | | <if test="isexceptionitem != null">isexceptionitem,</if> |
| | | <if test="isabnormal != null">isabnormal,</if> |
| | | <if test="istrack != null">istrack,</if> |
| | | <if test="score != null">score,</if> |
| | | <if test="prompt != null">prompt,</if> |
| | |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="appendflag != null">appendflag,</if> |
| | | <if test="appenddesc != null">appenddesc,</if> |
| | | <if test="picturePath != null">picture_path,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="topicid != null">#{topicid},</if> |
| | |
| | | <if test="optioncontent != null">#{optioncontent},</if> |
| | | <if test="isexistdetail != null">#{isexistdetail},</if> |
| | | <if test="detailismandatory != null">#{detailismandatory},</if> |
| | | <if test="isexceptionitem != null">#{isexceptionitem},</if> |
| | | <if test="isabnormal != null">#{isabnormal},</if> |
| | | <if test="istrack != null">#{istrack},</if> |
| | | <if test="score != null">#{score},</if> |
| | | <if test="prompt != null">#{prompt},</if> |
| | |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="appendflag != null">#{appendflag},</if> |
| | | <if test="appenddesc != null">#{appenddesc},</if> |
| | | <if test="picturePath != null">#{picturePath},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="optioncontent != null">optioncontent = #{optioncontent},</if> |
| | | <if test="isexistdetail != null">isexistdetail = #{isexistdetail},</if> |
| | | <if test="detailismandatory != null">detailismandatory = #{detailismandatory},</if> |
| | | <if test="isexceptionitem != null">isexceptionitem = #{isexceptionitem},</if> |
| | | <if test="isabnormal != null">isabnormal = #{isabnormal},</if> |
| | | <if test="istrack != null">istrack = #{istrack},</if> |
| | | <if test="score != null">score = #{score},</if> |
| | | <if test="prompt != null">prompt = #{prompt},</if> |
| | |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="appendflag != null">appendflag = #{appendflag},</if> |
| | | <if test="appenddesc != null">appenddesc = #{appenddesc},</if> |
| | | <if test="picturePath != null">picture_path = #{picturePath},</if> |
| | | </trim> |
| | | where optionid = #{optionid} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteSvyLibScriptOptionByOptionid" parameterType="Long"> |
| | | update svy_lib_ScriptOption |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag = 1 |
| | | del_flag = 1 |
| | | </trim> |
| | | where optionid = #{optionid} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteSvyLibScriptOptionByOptionids" parameterType="String"> |
| | | delete from svy_lib_ScriptOption where optionid in |
| | | <foreach item="optionid" collection="array" open="(" separator="," close=")"> |
| | | #{optionid} |
| | | delete from svy_lib_ScriptOption where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | |
| | | </mapper> |