liusheng
2023-12-22 52a0bf7637b725f0b6bf18a03962b0636f7074fb
smartor/src/main/resources/mapper/smartor/IvrLibaTemplatetargetMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.IvrLibaTemplatetargetMapper">
    
    <resultMap type="IvrLibaTemplatetarget" id="IvrLibaTemplatetargetResult">
    <resultMap type="com.smartor.domain.IvrLibaTemplatetarget" id="IvrLibaTemplatetargetResult">
        <result property="templateTargetID"    column="templateTargetID"    />
        <result property="templateQuestionID"    column="templateQuestionID"    />
        <result property="templateQuestionNum"    column="templateQuestionNum"    />
@@ -38,26 +38,52 @@
    </resultMap>
    <sql id="selectIvrLibaTemplatetargetVo">
        select templateTargetID, templateQuestionID, templateQuestionNum, nextQuestionNum, templateID, switchID, switchDescription, switchText, switchWav, switchTempWav, targetType, categoryName, targetValue, targetID, questionTargetID, basicRegex, selfRegex, regexUsedType, language, isEnable, isDel, playType, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid from ivr_liba_templatetarget
        select templateTargetID,
               templateQuestionID,
               templateQuestionNum,
               nextQuestionNum,
               templateID,
               switchID,
               switchDescription,
               switchText,
               switchWav,
               switchTempWav,
               targetType,
               categoryName,
               targetValue,
               targetID,
               questionTargetID,
               basicRegex,
               selfRegex,
               regexUsedType, language, isEnable, isDel, playType, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid
        from ivr_liba_templatetarget
    </sql>
    <select id="selectIvrLibaTemplatetargetList" parameterType="IvrLibaTemplatetarget" resultMap="IvrLibaTemplatetargetResult">
    <select id="selectIvrLibaTemplatetargetList" parameterType="com.smartor.domain.IvrLibaTemplatetarget"
            resultMap="IvrLibaTemplatetargetResult">
        <include refid="selectIvrLibaTemplatetargetVo"/>
        <where>  
            <if test="templateQuestionID != null  and templateQuestionID != ''"> and templateQuestionID = #{templateQuestionID}</if>
            <if test="templateQuestionID != null  and templateQuestionID != ''">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 != ''"> and templateID = #{templateID}</if>
            <if test="switchID != null "> and switchID = #{switchID}</if>
            <if test="switchDescription != null  and switchDescription != ''"> and switchDescription = #{switchDescription}</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="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="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>
@@ -71,12 +97,13 @@
        </where>
    </select>
    
    <select id="selectIvrLibaTemplatetargetByTemplateTargetID" parameterType="String" resultMap="IvrLibaTemplatetargetResult">
    <select id="selectIvrLibaTemplatetargetByTemplateTargetID" parameterType="String"
            resultMap="IvrLibaTemplatetargetResult">
        <include refid="selectIvrLibaTemplatetargetVo"/>
        where templateTargetID = #{templateTargetID}
    </select>
        
    <insert id="insertIvrLibaTemplatetarget" parameterType="IvrLibaTemplatetarget">
    <insert id="insertIvrLibaTemplatetarget" parameterType="com.smartor.domain.IvrLibaTemplatetarget">
        insert into ivr_liba_templatetarget
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="templateTargetID != null">templateTargetID,</if>
@@ -144,10 +171,12 @@
         </trim>
    </insert>
    <update id="updateIvrLibaTemplatetarget" parameterType="IvrLibaTemplatetarget">
    <update id="updateIvrLibaTemplatetarget" parameterType="com.smartor.domain.IvrLibaTemplatetarget">
        update ivr_liba_templatetarget
        <trim prefix="SET" suffixOverrides=",">
            <if test="templateQuestionID != null and templateQuestionID != ''">templateQuestionID = #{templateQuestionID},</if>
            <if test="templateQuestionID != null and templateQuestionID != ''">templateQuestionID =
                #{templateQuestionID},
            </if>
            <if test="templateQuestionNum != null">templateQuestionNum = #{templateQuestionNum},</if>
            <if test="nextQuestionNum != null">nextQuestionNum = #{nextQuestionNum},</if>
            <if test="templateID != null and templateID != ''">templateID = #{templateID},</if>
@@ -181,7 +210,9 @@
    </update>
    <delete id="deleteIvrLibaTemplatetargetByTemplateTargetID" parameterType="String">
        delete from ivr_liba_templatetarget where templateTargetID = #{templateTargetID}
        delete
        from ivr_liba_templatetarget
        where templateTargetID = #{templateTargetID}
    </delete>
    <delete id="deleteIvrLibaTemplatetargetByTemplateTargetIDs" parameterType="String">