liusheng
10 小时以前 e180e3a496d6f29d3a3b34016400de9d997c6bd9
smartor/src/main/resources/mapper/smartor/SvyLibTemplateScriptMapper.xml
@@ -46,11 +46,19 @@
        <result property="targetoptions" column="targetoptions"/>
        <result property="prompt" column="prompt"/>
        <result property="groupName" column="group_name"/>
        <result property="dutyDeptName" column="duty_dept_name"/>
        <result property="dutyDeptCode" column="duty_dept_code"/>
        <result property="reportDeptCode" column="report_dept_name"/>
        <result property="reportDeptName" column="report_dept_code"/>
    </resultMap>
    <sql id="selectSvyLibTemplateScriptVo">
        select id,
               script_type,
               duty_dept_name,
               duty_dept_code,
               report_dept_name,
               report_dept_code,
               targetid,
               group_name,
               targetname,
@@ -81,6 +89,7 @@
               pid,
               guid,
               categoryid,
               categoryName,
               script_content,
               suitway,
               script_picture,
@@ -93,43 +102,66 @@
            resultMap="SvyLibTemplateScriptResult">
        <include refid="selectSvyLibTemplateScriptVo"/>
        where 1=1
            and del_flag = 0
            <if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if>
            <if test="scriptType != null  and scriptType != ''">and script_type = #{scriptType}</if>
            <if test="scriptno != null  and scriptno != ''">and scriptno = #{scriptno}</if>
            <if test="scriptid != null">and scriptid = #{scriptid}</if>
            <if test="scriptDesc != null  and scriptDesc != ''">and script_desc = #{scriptDesc}</if>
            <if test="tag != null  and tag != ''">and tag = #{tag}</if>
            <if test="sort != null ">and sort = #{sort}</if>
            <if test="ismandatory != null  and ismandatory != ''">and ismandatory = #{ismandatory}</if>
            <if test="ishide != null ">and ishide = #{ishide}</if>
            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
            <if test="isupload != null ">and isupload = #{isupload}</if>
            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
            <if test="pid != null ">and pid = #{pid}</if>
            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
            <if test="prompt != null  and prompt != ''">and prompt = #{prompt}</if>
            <if test="categoryid != null ">and categoryid = #{categoryid}</if>
            <if test="scriptContent != null  and scriptContent != ''">and script_content = #{scriptContent}</if>
            <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
            <if test="isavailable != null  and isavailable != ''">and isavailable = #{isavailable}</if>
            <if test="language != null  and language != ''">and language = #{language}</if>
            <if test="otherdata != null  and otherdata != ''">and otherdata = #{otherdata}</if>
            <if test="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
            <if test="reply != null  and reply != ''">and reply = #{reply}</if>
            <if test="scoretype != null  and scoretype != ''">and scoretype = #{scoretype}</if>
            <if test="scriptTopic != null  and scriptTopic != ''">and script_topic = #{scriptTopic}</if>
            <if test="svyid != null  ">and svyid = #{svyid}</if>
            <if test="branchFlag != null  and branchFlag != ''">and branch_flag = #{branchFlag}</if>
            <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno =
                #{branchNextscriptno}
            </if>
            <if test="targetid != null ">and targetid = #{targetid}</if>
            <if test="targetname != null  and targetname != ''">and targetname = #{targetname}</if>
            <if test="targettype != null  and targettype != ''">and targettype = #{targettype}</if>
            <if test="targetoptions != null  and targetoptions != ''">and targetoptions = #{targetoptions}</if>
            <if test="score != null">and score = #{score}</if>
            <if test="groupName != null">and group_name = #{groupName}</if>
        and del_flag = 0
        <if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if>
        <if test="scriptType != null  and scriptType != ''">and script_type = #{scriptType}</if>
        <if test="scriptno != null  and scriptno != ''">and scriptno = #{scriptno}</if>
        <if test="scriptid != null">and scriptid = #{scriptid}</if>
        <if test="scriptDesc != null  and scriptDesc != ''">and script_desc = #{scriptDesc}</if>
        <if test="tag != null  and tag != ''">and tag = #{tag}</if>
        <if test="sort != null ">and sort = #{sort}</if>
        <if test="ismandatory != null  and ismandatory != ''">and ismandatory = #{ismandatory}</if>
        <if test="ishide != null ">and ishide = #{ishide}</if>
        <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
        <if test="isupload != null ">and isupload = #{isupload}</if>
        <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
        <if test="pid != null ">and pid = #{pid}</if>
        <if test="guid != null  and guid != ''">and guid = #{guid}</if>
        <if test="prompt != null  and prompt != ''">and prompt = #{prompt}</if>
        <if test="categoryid != null ">and categoryid = #{categoryid}</if>
        <if test="categoryName != null ">and categoryName = #{categoryName}</if>
        <if test="scriptContent != null  and scriptContent != ''">and script_content = #{scriptContent}</if>
        <if test="suitway != null  and suitway != ''">and suitway = #{suitway}</if>
        <if test="isavailable != null  and isavailable != ''">and isavailable = #{isavailable}</if>
        <if test="language != null  and language != ''">and language = #{language}</if>
        <if test="otherdata != null  and otherdata != ''">and otherdata = #{otherdata}</if>
        <if test="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
        <if test="reply != null  and reply != ''">and reply = #{reply}</if>
        <if test="scoretype != null  and scoretype != ''">and scoretype = #{scoretype}</if>
        <if test="scriptTopic != null  and scriptTopic != ''">and script_topic = #{scriptTopic}</if>
        <if test="svyid != null  ">and svyid = #{svyid}</if>
        <if test="branchFlag != null  and branchFlag != ''">and branch_flag = #{branchFlag}</if>
        <if test="branchNextscriptno != null  and branchNextscriptno != ''">and branch_nextscriptno =
            #{branchNextscriptno}
        </if>
        <if test="targetid != null ">and targetid = #{targetid}</if>
        <if test="targetname != null  and targetname != ''">and targetname = #{targetname}</if>
        <if test="targettype != null  and targettype != ''">and targettype = #{targettype}</if>
        <if test="targetoptions != null  and targetoptions != ''">and targetoptions = #{targetoptions}</if>
        <if test="score != null">and score = #{score}</if>
        <if test="groupName != null">and group_name = #{groupName}</if>
        <if test="dutyDeptName != null  and dutyDeptName != ''">and duty_dept_name like concat('%', #{dutyDeptName},
            '%')
        </if>
        <if test="dutyDeptCode != null  and dutyDeptCode != ''">and duty_dept_code like concat('%', #{dutyDeptCode},
            '%')
        </if>
        <if test="reportDeptName != null  and reportDeptName != ''">and report_dept_name like concat('%',
            #{reportDeptName},
            '%')
        </if>
        <if test="reportDeptCode != null  and reportDeptCode != ''">and report_dept_code like concat('%',
            #{reportDeptCode},
            '%')
        </if>
        <if test="categoryids != null">
            and categoryid in
            <foreach collection="categoryids" item="categoryid" open="(" separator=","
                     close=")">
                #{categoryid}
            </foreach>
        </if>
        <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
    </select>
    <select id="selectSvyLibTemplateScriptByTopicid" parameterType="Long" resultMap="SvyLibTemplateScriptResult">
@@ -181,6 +213,11 @@
            <if test="targetoptions != null  and targetoptions != ''">targetoptions,</if>
            <if test="prompt != null  and prompt != ''">prompt,</if>
            <if test="groupName != null  and groupName != ''">group_name,</if>
            <if test="dutyDeptName != null  and dutyDeptName != ''">duty_dept_name,</if>
            <if test="dutyDeptCode != null  and dutyDeptCode != ''">duty_dept_code,</if>
            <if test="reportDeptName != null  and reportDeptName != ''">report_dept_name,</if>
            <if test="reportDeptCode != null  and reportDeptCode != ''">report_dept_code,</if>
            <if test="categoryName != null  and categoryName != ''">categoryName,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="nextScriptno != null">#{nextScriptno},</if>
@@ -223,6 +260,11 @@
            <if test="targetoptions != null  and targetoptions != ''">#{targetoptions},</if>
            <if test="prompt != null  and prompt != ''">#{prompt},</if>
            <if test="groupName != null  and groupName != ''">#{groupName},</if>
            <if test="dutyDeptName != null  and dutyDeptName != ''">#{dutyDeptName},</if>
            <if test="dutyDeptCode != null  and dutyDeptCode != ''">#{dutyDeptCode},</if>
            <if test="reportDeptName != null  and reportDeptName != ''">#{reportDeptName},</if>
            <if test="reportDeptCode != null  and reportDeptCode != ''">#{reportDeptCode},</if>
            <if test="categoryName != null  and categoryName != ''">#{categoryName},</if>
        </trim>
    </insert>
@@ -271,6 +313,11 @@
            <if test="targetoptions != null  and targetoptions != ''">targetoptions = #{targetoptions},</if>
            <if test="prompt != null  and prompt != ''">prompt = #{prompt},</if>
            <if test="groupName != null  and groupName != ''">group_name = #{groupName},</if>
            <if test="dutyDeptName != null  and dutyDeptName != ''">duty_dept_name = #{dutyDeptName},</if>
            <if test="dutyDeptCode != null  and dutyDeptCode != ''">duty_dept_code = #{dutyDeptCode},</if>
            <if test="reportDeptName != null  and reportDeptName != ''">report_dept_name = #{reportDeptName},</if>
            <if test="reportDeptCode != null  and reportDeptCode != ''">report_dept_code = #{reportDeptCode},</if>
            <if test="categoryName != null  and categoryName != ''">categoryName = #{categoryName},</if>
        </trim>
        where id = #{id}
    </update>
@@ -287,4 +334,15 @@
            #{id}
        </foreach>
    </delete>
    <select id="querySvyLibTemplateIds"  resultMap="SvyLibTemplateScriptResult">
        <include refid="selectSvyLibTemplateScriptVo"/>
        where del_flag=0
        <if test="scriptCategoryids != null and scriptCategoryids.size > 0">
        and categoryid in
        <foreach item="scriptCategoryid" collection="scriptCategoryids" open="(" separator="," close=")">
            #{scriptCategoryid}
        </foreach>
        </if>
    </select>
</mapper>