<?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.smartor.mapper.IvrLibaTemplateTargetMapper">
|
|
<resultMap type="com.smartor.domain.IvrLibaTemplateTarget" id="IvrLibaTemplateTargetResult">
|
<result property="id" column="id"/>
|
<result property="templateQuestionID" column="templateQuestionID"/>
|
<result property="templateQuestionNum" column="templateQuestionNum"/>
|
<result property="nextQuestionNum" column="nextQuestionNum"/>
|
<result property="templateID" column="templateID"/>
|
<result property="switchID" column="switchID"/>
|
<result property="switchDescription" column="switchDescription"/>
|
<result property="switchText" column="switchText"/>
|
<result property="switchWav" column="switchWav"/>
|
<result property="switchTempWav" column="switchTempWav"/>
|
<result property="targetType" column="targetType"/>
|
<result property="categoryName" column="categoryName"/>
|
<result property="targetValue" column="targetValue"/>
|
<result property="targetid" column="targetid"/>
|
<result property="questionTargetid" column="questionTargetid"/>
|
<result property="basicRegex" column="basicRegex"/>
|
<result property="selfRegex" column="selfRegex"/>
|
<result property="regexUsedType" column="regexUsedType"/>
|
<result property="language" column="language"/>
|
<result property="isEnable" column="isEnable"/>
|
<result property="playType" column="playType"/>
|
<result property="delFlag" column="del_flag"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="isupload" column="isupload"/>
|
<result property="uploadTime" column="upload_time"/>
|
<result property="orgid" column="orgid"/>
|
<result property="pid" column="pid"/>
|
<result property="guid" column="guid"/>
|
</resultMap>
|
|
<sql id="selectIvrLibaTemplateTargetVo">
|
select id,
|
templateQuestionID,
|
templateQuestionNum,
|
nextQuestionNum,
|
templateID,
|
switchID,
|
switchDescription,
|
switchText,
|
switchWav,
|
switchTempWav,
|
targetType,
|
categoryName,
|
targetValue,
|
targetid,
|
questionTargetid,
|
basicRegex,
|
selfRegex,
|
regexUsedType, language, isEnable, playType, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid
|
from ivr_liba_template_target
|
</sql>
|
|
<select id="selectIvrLibaTemplateTargetList" parameterType="com.smartor.domain.IvrLibaTemplateTarget"
|
resultMap="IvrLibaTemplateTargetResult">
|
<include refid="selectIvrLibaTemplateTargetVo"/>
|
<where>
|
<if test="templateQuestionID != null ">and templateQuestionID = #{templateQuestionID}</if>
|
<if test="templateQuestionNum != null ">and templateQuestionNum = #{templateQuestionNum}</if>
|
<if test="nextQuestionNum != null ">and nextQuestionNum = #{nextQuestionNum}</if>
|
<if test="templateID != null ">and templateID = #{templateID}</if>
|
<if test="switchID != null ">and switchID = #{switchID}</if>
|
<if test="switchDescription != null and switchDescription != ''">and switchDescription =
|
#{switchDescription}
|
</if>
|
<if test="switchText != null and switchText != ''">and switchText = #{switchText}</if>
|
<if test="switchWav != null and switchWav != ''">and switchWav = #{switchWav}</if>
|
<if test="switchTempWav != null and switchTempWav != ''">and switchTempWav = #{switchTempWav}</if>
|
<if test="targetType != null and targetType != ''">and targetType = #{targetType}</if>
|
<if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName},
|
'%')
|
</if>
|
<if test="targetValue != null and targetValue != ''">and targetValue = #{targetValue}</if>
|
<if test="targetid != null and targetid != ''">and targetid = #{targetid}</if>
|
<if test="questionTargetid != null and questionTargetid != ''">and questionTargetid = #{questionTargetid}
|
</if>
|
<if test="basicRegex != null and basicRegex != ''">and basicRegex = #{basicRegex}</if>
|
<if test="selfRegex != null and selfRegex != ''">and selfRegex = #{selfRegex}</if>
|
<if test="regexUsedType != null and regexUsedType != ''">and regexUsedType = #{regexUsedType}</if>
|
<if test="language != null and language != ''">and language = #{language}</if>
|
<if test="isEnable != null ">and isEnable = #{isEnable}</if>
|
<if test="playType != null ">and playType = #{playType}</if>
|
<if test="isupload != null ">and isupload = #{isupload}</if>
|
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
|
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
|
<if test="pid != null ">and pid = #{pid}</if>
|
<if test="guid != null and guid != ''">and guid = #{guid}</if>
|
</where>
|
</select>
|
|
<select id="selectIvrLibaTemplateTargetByID" parameterType="Long" resultMap="IvrLibaTemplateTargetResult">
|
<include refid="selectIvrLibaTemplateTargetVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertIvrLibaTemplateTarget" parameterType="com.smartor.domain.IvrLibaTemplateTarget" useGeneratedKeys="true"
|
keyProperty="ID">
|
insert into ivr_liba_template_target
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="templateQuestionID != null">templateQuestionID,</if>
|
<if test="templateQuestionNum != null">templateQuestionNum,</if>
|
<if test="nextQuestionNum != null">nextQuestionNum,</if>
|
<if test="templateID != null">templateID,</if>
|
<if test="switchID != null">switchID,</if>
|
<if test="switchDescription != null">switchDescription,</if>
|
<if test="switchText != null">switchText,</if>
|
<if test="switchWav != null">switchWav,</if>
|
<if test="switchTempWav != null">switchTempWav,</if>
|
<if test="targetType != null">targetType,</if>
|
<if test="categoryName != null">categoryName,</if>
|
<if test="targetValue != null">targetValue,</if>
|
<if test="targetid != null">targetid,</if>
|
<if test="questionTargetid != null">questionTargetid,</if>
|
<if test="basicRegex != null">basicRegex,</if>
|
<if test="selfRegex != null">selfRegex,</if>
|
<if test="regexUsedType != null">regexUsedType,</if>
|
<if test="language != null">language,</if>
|
<if test="isEnable != null">isEnable,</if>
|
<if test="playType != null">playType,</if>
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="isupload != null">isupload,</if>
|
<if test="uploadTime != null">upload_time,</if>
|
<if test="orgid != null">orgid,</if>
|
<if test="pid != null">pid,</if>
|
<if test="guid != null">guid,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="templateQuestionID != null">#{templateQuestionID},</if>
|
<if test="templateQuestionNum != null">#{templateQuestionNum},</if>
|
<if test="nextQuestionNum != null">#{nextQuestionNum},</if>
|
<if test="templateID != null">#{templateID},</if>
|
<if test="switchID != null">#{switchID},</if>
|
<if test="switchDescription != null">#{switchDescription},</if>
|
<if test="switchText != null">#{switchText},</if>
|
<if test="switchWav != null">#{switchWav},</if>
|
<if test="switchTempWav != null">#{switchTempWav},</if>
|
<if test="targetType != null">#{targetType},</if>
|
<if test="categoryName != null">#{categoryName},</if>
|
<if test="targetValue != null">#{targetValue},</if>
|
<if test="targetid != null">#{targetid},</if>
|
<if test="questionTargetid != null">#{questionTargetid},</if>
|
<if test="basicRegex != null">#{basicRegex},</if>
|
<if test="selfRegex != null">#{selfRegex},</if>
|
<if test="regexUsedType != null">#{regexUsedType},</if>
|
<if test="language != null">#{language},</if>
|
<if test="isEnable != null">#{isEnable},</if>
|
<if test="playType != null">#{playType},</if>
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="isupload != null">#{isupload},</if>
|
<if test="uploadTime != null">#{uploadTime},</if>
|
<if test="orgid != null">#{orgid},</if>
|
<if test="pid != null">#{pid},</if>
|
<if test="guid != null">#{guid},</if>
|
</trim>
|
</insert>
|
|
<update id="updateIvrLibaTemplateTarget" parameterType="com.smartor.domain.IvrLibaTemplateTarget">
|
update ivr_liba_template_target
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="templateQuestionID != null">templateQuestionID = #{templateQuestionID},</if>
|
<if test="templateQuestionNum != null">templateQuestionNum = #{templateQuestionNum},</if>
|
<if test="nextQuestionNum != null">nextQuestionNum = #{nextQuestionNum},</if>
|
<if test="templateID != null">templateID = #{templateID},</if>
|
<if test="switchID != null">switchID = #{switchID},</if>
|
<if test="switchDescription != null">switchDescription = #{switchDescription},</if>
|
<if test="switchText != null">switchText = #{switchText},</if>
|
<if test="switchWav != null">switchWav = #{switchWav},</if>
|
<if test="switchTempWav != null">switchTempWav = #{switchTempWav},</if>
|
<if test="targetType != null">targetType = #{targetType},</if>
|
<if test="categoryName != null">categoryName = #{categoryName},</if>
|
<if test="targetValue != null">targetValue = #{targetValue},</if>
|
<if test="targetid != null">targetID = #{targetid},</if>
|
<if test="questionTargetid != null">questionTargetid = #{questionTargetid},</if>
|
<if test="basicRegex != null">basicRegex = #{basicRegex},</if>
|
<if test="selfRegex != null">selfRegex = #{selfRegex},</if>
|
<if test="regexUsedType != null">regexUsedType = #{regexUsedType},</if>
|
<if test="language != null">language = #{language},</if>
|
<if test="isEnable != null">isEnable = #{isEnable},</if>
|
<if test="playType != null">playType = #{playType},</if>
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="isupload != null">isupload = #{isupload},</if>
|
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
<if test="orgid != null">orgid = #{orgid},</if>
|
<if test="pid != null">pid = #{pid},</if>
|
<if test="guid != null">guid = #{guid},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<update id="deleteIvrLibaTemplateTargetByID" parameterType="Long">
|
update ivr_liba_template_target
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag = 1
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteIvrLibaTemplateTargetByIDs" parameterType="String">
|
delete from ivr_liba_template_target where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|