liusheng
2024-07-23 0123a0bd06f83a2a973023bb2f197e21118ef293
smartor/src/main/resources/mapper/smartor/IvrTaskTemplateScriptMapper.xml
@@ -40,13 +40,32 @@
        <result property="questionResult"    column="question_result"    />
        <result property="branchFlag" column="branch_flag"/>
        <result property="branchNextscriptno" column="branch_nextscriptno"/>
        <result property="scriptType" column="script_type"/>
    </resultMap>
    <sql id="selectIvrTaskTemplateScriptVo">
        select id, taskid,branch_flag,branch_nextscriptno,  templateID, questionPoint,  noMatchText, noMatchVoice, slienceText, slienceVoice, submoduleText, submoduleVoice, noClearlyText, noClearlyVoice, categoryName, targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, targettype, targetid, targetvalue,  otherdata, is_must, question_result from ivr_task_template_script
        select id,
               taskid,
               script_type,
               branch_flag,
               branch_nextscriptno,
               templateID,
               questionPoint,
               noMatchText,
               noMatchVoice,
               slienceText,
               slienceVoice,
               submoduleText,
               submoduleVoice,
               noClearlyText,
               noClearlyVoice,
               categoryName,
               targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, targettype, targetid, targetvalue, otherdata, is_must, question_result
        from ivr_task_template_script
    </sql>
    <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript" resultMap="IvrTaskTemplateScriptResult">
    <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript"
            resultMap="IvrTaskTemplateScriptResult">
        <include refid="selectIvrTaskTemplateScriptVo"/>
        <where>
            <if test="taskid != null "> and taskid = #{taskid}</if>
@@ -60,7 +79,9 @@
            <if test="submoduleVoice != null  and submoduleVoice != ''"> and submoduleVoice = #{submoduleVoice}</if>
            <if test="noClearlyText != null  and noClearlyText != ''"> and noClearlyText = #{noClearlyText}</if>
            <if test="noClearlyVoice != null  and noClearlyVoice != ''"> and noClearlyVoice = #{noClearlyVoice}</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="targetOptions != null  and targetOptions != ''"> and targetOptions = #{targetOptions}</if>
            <if test="language != null  and language != ''"> and language = #{language}</if>
            <if test="playWavOnly != null "> and playWavOnly = #{playWavOnly}</if>
@@ -77,7 +98,9 @@
            <if test="isMust != null  and isMust != ''"> and is_must = #{isMust}</if>
            <if test="questionResult != null  and questionResult != ''"> and question_result = #{questionResult}</if>
            <if test="branchFlag != null  and branchFlag != ''">and branch_flag = #{branchFlag}</if>
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno = #{branchNextscriptno}
            <if test="scriptType != null  and scriptType != ''">and script_type = #{scriptType}</if>
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno =
                #{branchNextscriptno}
            </if>
        </where>
    </select>
@@ -87,7 +110,8 @@
        where id = #{id}
    </select>
    <insert id="insertIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript" useGeneratedKeys="true" keyProperty="id">
    <insert id="insertIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript"
            useGeneratedKeys="true" keyProperty="id">
        insert into ivr_task_template_script
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="taskid != null">taskid,</if>
@@ -124,6 +148,7 @@
            <if test="questionResult != null">question_result,</if>
            <if test="branchFlag != null  and branchFlag != ''">branch_flag,</if>
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">branch_nextscriptno,</if>
            <if test="scriptType != null  and scriptType != ''">script_type,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="taskid != null">#{taskid},</if>
@@ -160,6 +185,7 @@
            <if test="questionResult != null">#{questionResult},</if>
            <if test="branchFlag != null  and branchFlag != ''">#{branchFlag},</if>
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">#{branchNextscriptno},</if>
            <if test="scriptType != null  and scriptType != ''">#{scriptType},</if>
         </trim>
    </insert>
@@ -202,12 +228,15 @@
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">branch_nextscriptno =
                #{branchNextscriptno},
            </if>
            <if test="scriptType != null  and scriptType != ''">script_type = #{scriptType},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteIvrTaskTemplateScriptByID" parameterType="Long">
        delete from ivr_task_template_script where ID = #{ID}
        delete
        from ivr_task_template_script
        where ID = #{ID}
    </delete>
    <delete id="deleteIvrTaskTemplateScriptByIDs" parameterType="String">