| | |
| | | <mapper namespace="com.smartor.mapper.IvrLibaTemplateScriptMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrLibaTemplateScript" id="IvrLibaTemplateScriptResult"> |
| | | <result property="ID" column="ID"/> |
| | | <result property="id" column="id"/> |
| | | <result property="scriptno" column="scriptno"/> |
| | | <result property="templateID" column="templateID"/> |
| | | <result property="scriptid" column="scriptID"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="scriptid" column="scriptid"/> |
| | | <result property="scriptPoint" column="script_point"/> |
| | | <result property="scriptContent" column="script_content"/> |
| | | <result property="scriptDesc" column="script_content"/> |
| | |
| | | <result property="otherdata" column="otherdata"/> |
| | | <result property="isMust" column="is_must"/> |
| | | <result property="scriptDesc" column="script_desc"/> |
| | | <result property="scriptType" column="script_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrLibaTemplateScriptVo"> |
| | | select ID, |
| | | select id, |
| | | scriptno, |
| | | templateID, |
| | | scriptID, |
| | | templateid, |
| | | script_type, |
| | | scriptid, |
| | | script_point, |
| | | script_content, |
| | | script_desc, |
| | |
| | | del_flag=0 |
| | | <if test="scriptno != null ">and scriptno = #{scriptno}</if> |
| | | <if test="scriptDesc != null ">and script_desc = #{scriptDesc}</if> |
| | | <if test="templateID != null ">and templateID = #{templateID}</if> |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="scriptPoint != null and scriptPoint != ''">and script_point = #{scriptPoint}</if> |
| | | <if test="scriptContent != null and scriptContent != ''">and script_content = #{scriptContent}</if> |
| | | <if test="scriptVoice != null and scriptVoice != ''">and script_voice = #{scriptVoice}</if> |
| | |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | | <if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if> |
| | | <if test="isMust != null and isMust != ''">and is_must = #{isMust}</if> |
| | | <if test="scriptType != null">and script_type = #{scriptType}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTemplateScriptByID" parameterType="Long" resultMap="IvrLibaTemplateScriptResult"> |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | where ID = #{ID} |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertIvrLibaTemplateScript" parameterType="com.smartor.domain.IvrLibaTemplateScript" |
| | |
| | | insert into ivr_liba_template_script |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="scriptno != null">scriptno,</if> |
| | | <if test="templateID != null">templateID,</if> |
| | | <if test="scriptid != null">scriptID,</if> |
| | | <if test="templateid != null">templateid,</if> |
| | | <if test="scriptid != null">scriptid,</if> |
| | | <if test=" scriptPoint != null and scriptPoint != ''">script_point,</if> |
| | | <if test="scriptContent != null">script_content,</if> |
| | | <if test="scriptVoice != null">script_voice,</if> |
| | |
| | | <if test="otherdata != null">otherdata,</if> |
| | | <if test="isMust != null and isMust != ''">is_must,</if> |
| | | <if test="scriptDesc != null ">script_desc,</if> |
| | | <if test="scriptType != null ">script_type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="scriptno != null">#{scriptno},</if> |
| | | <if test="templateID != null">#{templateID},</if> |
| | | <if test="templateid != null">#{templateid},</if> |
| | | <if test="scriptid != null">#{scriptid},</if> |
| | | <if test="scriptPoint != null and scriptPoint != ''">#{scriptPoint},</if> |
| | | <if test="scriptContent != null">#{scriptContent},</if> |
| | |
| | | <if test="otherdata != null">#{otherdata},</if> |
| | | <if test="isMust != null and isMust != ''">#{isMust},</if> |
| | | <if test="scriptDesc != null ">#{scriptDesc},</if> |
| | | <if test="scriptType != null ">#{scriptType},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | update ivr_liba_template_script |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="scriptno != null">scriptno = #{scriptno},</if> |
| | | <if test="templateID != null">templateID = #{templateID},</if> |
| | | <if test="scriptid != null">scriptID = #{scriptid},</if> |
| | | <if test="templateid != null">templateid = #{templateid},</if> |
| | | <if test="scriptid != null">scriptid = #{scriptid},</if> |
| | | <if test="scriptPoint != null and scriptPoint != ''">script_point = #{scriptPoint},</if> |
| | | <if test="scriptContent != null">script_content = #{scriptContent},</if> |
| | | <if test="scriptVoice != null">script_voice = #{scriptVoice},</if> |
| | |
| | | <if test="otherdata != null">otherdata = #{otherdata},</if> |
| | | <if test="isMust != null and isMust != ''">is_must = #{isMust}</if> |
| | | <if test="scriptDesc != null ">script_desc = #{scriptDesc}</if> |
| | | <if test="scriptType != null ">script_type = #{scriptType}</if> |
| | | </trim> |
| | | where ID = #{ID} |
| | | </update> |
| | |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag = 1 |
| | | </trim> |
| | | where ID = #{ID} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteIvrLibaTemplateScriptByIDs" parameterType="String"> |
| | | delete from ivr_liba_template_script where ID in |
| | | <foreach item="ID" collection="array" open="(" separator="," close=")"> |
| | | #{ID} |
| | | delete from ivr_liba_template_script where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |