| | |
| | | <result property="dutyDeptCode" column="duty_dept_code"/> |
| | | <result property="reportDeptCode" column="report_dept_name"/> |
| | | <result property="reportDeptName" column="report_dept_code"/> |
| | | <result property="isMydException" column="is_myd_exception"/> |
| | | <result property="dimension" column="dimension"/> |
| | | <result property="dutyDeptPersonName" column="duty_dept_person_name"/> |
| | | <result property="dutyDeptPersonCode" column="duty_dept_person_code"/> |
| | | <result property="reportDeptPersonCode" column="report_dept_person_name"/> |
| | | <result property="reportDeptPersonName" column="report_dept_person_code"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrLibaTemplateScriptVo"> |
| | | select id, |
| | | scriptno, |
| | | is_myd_exception, |
| | | duty_dept_person_name, |
| | | duty_dept_person_code, |
| | | report_dept_person_name, |
| | | report_dept_person_code, |
| | | dimension, |
| | | sort, |
| | | script_assortname, |
| | | duty_dept_name, |
| | |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | where del_flag = 0 |
| | | <if test="scriptno != null ">and scriptno = #{scriptno}</if> |
| | | <if test="isMydException != null ">and is_myd_exception = #{isMydException}</if> |
| | | <if test="dimension != null ">and dimension = #{dimension}</if> |
| | | <if test="scriptAssortid != null ">and script_assortid = #{scriptAssortid}</if> |
| | | <if test="groupName != null ">and group_name = #{groupName}</if> |
| | | <if test="scriptDesc != null ">and script_desc = #{scriptDesc}</if> |
| | |
| | | <if test="scriptType != null">and script_type = #{scriptType}</if> |
| | | <if test="sort != null">and sort = #{sort}</if> |
| | | <if test="score != null">and score = #{score}</if> |
| | | <if test="dutyDeptPersonName != null and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%', #{dutyDeptPersonName}, |
| | | '%') |
| | | </if> |
| | | <if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%', #{dutyDeptPersonCode}, |
| | | '%') |
| | | </if> |
| | | <if test="reportDeptPersonName != null and reportDeptPersonName != ''">and report_dept_person_name like concat('%', #{reportDeptPersonName}, |
| | | '%') |
| | | </if> |
| | | <if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode}, |
| | | '%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectILTSBydimension" parameterType="com.smartor.domain.IvrLibaTemplateScript" |
| | | resultMap="IvrLibaTemplateScriptResult"> |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | <where>del_flag=0 |
| | | <if test="dimensionList != null ">and dimension in |
| | | <foreach item="dimension" collection="dimensionList" open="(" separator="," close=")"> |
| | | #{dimension} |
| | | </foreach> |
| | | </if> |
| | | <if test="dimensionList == null ">and dimension IS NOT NULL </if> |
| | | <if test="dutyDeptPersonName != null and dutyDeptPersonName != ''">and duty_dept_person_name like concat('%', #{dutyDeptPersonName}, |
| | | '%') |
| | | </if> |
| | | <if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">and duty_dept_person_code like concat('%', #{dutyDeptPersonCode}, |
| | | '%') |
| | | </if> |
| | | <if test="reportDeptPersonName != null and reportDeptPersonName != ''">and report_dept_person_name like concat('%', #{reportDeptPersonName}, |
| | | '%') |
| | | </if> |
| | | <if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">and report_dept_person_code like concat('%', #{reportDeptPersonCode}, |
| | | '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTemplateScriptByID" parameterType="Long" resultMap="IvrLibaTemplateScriptResult"> |
| | |
| | | <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="isMydException != null and isMydException != ''">is_myd_exception,</if> |
| | | <if test="dimension != null and dimension != ''">dimension,</if> |
| | | <if test="dutyDeptPersonName != null and dutyDeptPersonName != ''">duty_dept_person_name,</if> |
| | | <if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code,</if> |
| | | <if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name,</if> |
| | | <if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="scriptno != null">#{scriptno},</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="isMydException != null and isMydException != ''">#{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">#{dimension},</if> |
| | | <if test="dutyDeptPersonName != null and dutyDeptPersonName != ''">#{dutyDeptPersonName},</if> |
| | | <if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">#{dutyDeptPersonCode},</if> |
| | | <if test="reportDeptPersonName != null and reportDeptPersonName != ''">#{reportDeptPersonName},</if> |
| | | <if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">#{reportDeptPersonCode},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="dutyDeptPersonName != null and dutyDeptPersonName != ''">duty_dept_person_name = #{dutyDeptPersonName},</if> |
| | | <if test="dutyDeptPersonCode != null and dutyDeptPersonCode != ''">duty_dept_person_code = #{dutyDeptPersonCode},</if> |
| | | <if test="reportDeptPersonName != null and reportDeptPersonName != ''">report_dept_person_name = #{reportDeptPersonName},</if> |
| | | <if test="reportDeptPersonCode != null and reportDeptPersonCode != ''">report_dept_person_code = #{reportDeptPersonCode},</if> |
| | | <if test="targetid != null">targetid = #{targetid},</if> |
| | | <if test="scriptTopic != null">script_topic = #{scriptTopic},</if> |
| | | <if test="nextScriptno != null">next_scriptno = #{nextScriptno},</if> |
| | |
| | | <if test="isMust != null and isMust != ''">is_must = #{isMust},</if> |
| | | <if test="scriptDesc != null ">script_desc = #{scriptDesc},</if> |
| | | <if test="scriptType != null ">script_type = #{scriptType},</if> |
| | | <if test="isMydException != null and isMydException != ''">is_myd_exception = #{isMydException},</if> |
| | | <if test="dimension != null and dimension != ''">dimension = #{dimension},</if> |
| | | <if test="sort != null ">sort = #{sort},</if> |
| | | <if test="ivrtext != null ">ivrtext = #{ivrtext},</if> |
| | | <if test="branchFlag != null and branchFlag != ''">branch_flag = #{branchFlag},</if> |
| | |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | where del_flag=0 |
| | | <if test="scriptAssortids != null and scriptAssortids.size > 0"> |
| | | and script_assortid in |
| | | <foreach item="scriptAssortid" collection="scriptAssortids" open="(" separator="," close=")"> |
| | | #{scriptAssortid} |
| | | </foreach> |
| | | and script_assortid in |
| | | <foreach item="scriptAssortid" collection="scriptAssortids" open="(" separator="," close=")"> |
| | | #{scriptAssortid} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |