| | |
| | | <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, |
| | |
| | | pid, |
| | | guid, |
| | | categoryid, |
| | | categoryName, |
| | | script_content, |
| | | suitway, |
| | | script_picture, |
| | |
| | | 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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | |
| | | #{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> |