<?xml version="1.0" encoding="UTF-8" ?>
|
<!DOCTYPE mapper
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.smartor.mapper.IvrLibaScriptTargetMapper">
|
|
<resultMap type="com.smartor.domain.IvrLibaScriptTarget" id="IvrLibaScriptTargetResult">
|
<result property="id" column="id"/>
|
<result property="scriptid" column="scriptid"/>
|
<result property="targetID" column="targetID"/>
|
<result property="targetType" column="targetType"/>
|
<result property="categoryName" column="categoryName"/>
|
<result property="targetValue" column="targetValue"/>
|
<result property="basicRegex" column="basicRegex"/>
|
<result property="selfRegex" column="selfRegex"/>
|
<result property="regexUsedType" column="regexUsedType"/>
|
<result property="sort" column="sort"/>
|
<result property="version" column="version"/>
|
<result property="isEnable" column="isEnable"/>
|
<result property="tipsJson" column="tipsJson"/>
|
<result property="delFlag" column="del_flag"/>
|
<result property="updateBy" column="update_by"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="createBy" column="create_by"/>
|
<result property="createTime" column="create_time"/>
|
<result property="isupload" column="isupload"/>
|
<result property="uploadTime" column="upload_time"/>
|
<result property="orgid" column="orgid"/>
|
<result property="pid" column="pid"/>
|
<result property="guid" column="guid"/>
|
<result property="optiondesc" column="optiondesc"/>
|
<result property="isabnormal" column="isabnormal"/>
|
<result property="warnup" column="warnup"/>
|
<result property="warndown" column="warndown"/>
|
<result property="picturePath" column="picture_path"/>
|
</resultMap>
|
|
<sql id="selectIvrLibaScriptTargetVo">
|
select id,
|
scriptid,
|
optiondesc,
|
isabnormal,
|
warnup,
|
warndown,
|
picture_path,
|
targetID,
|
targetType,
|
categoryName,
|
targetValue,
|
basicRegex,
|
selfRegex,
|
regexUsedType,
|
sort,
|
version,
|
isEnable,
|
tipsJson,
|
del_flag,
|
update_by,
|
update_time,
|
create_by,
|
create_time,
|
isupload,
|
upload_time,
|
orgid,
|
pid,
|
guid
|
from ivr_liba_script_target
|
</sql>
|
|
<select id="selectIvrLibaScriptTargetList" parameterType="com.smartor.domain.IvrLibaScriptTarget"
|
resultMap="IvrLibaScriptTargetResult">
|
<include refid="selectIvrLibaScriptTargetVo"/>
|
<where>
|
<if test="scriptid != null ">and scriptid = #{scriptid}</if>
|
<if test="targetID != null ">and targetID = #{targetID}</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="targetValue != null and targetValue != ''">and targetValue = #{targetValue}</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>
|
<if test="sort != null ">and sort = #{sort}</if>
|
<if test="version != null ">and version = #{version}</if>
|
<if test="isEnable != null ">and isEnable = #{isEnable}</if>
|
<if test="tipsJson != null and tipsJson != ''">and tipsJson = #{tipsJson}</if>
|
<if test="isupload != null ">and isupload = #{isupload}</if>
|
<if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
|
<if test="orgid != null and orgid != ''">and orgid = #{orgid}</if>
|
<if test="pid != null ">and pid = #{pid}</if>
|
<if test="guid != null and guid != ''">and guid = #{guid}</if>
|
<if test="isabnormal != null and optiondesc != ''">and optiondesc = #{optiondesc}</if>
|
<if test="isabnormal != null ">and isabnormal = #{isabnormal}</if>
|
<if test="warnup != null ">and warnup = #{warnup}</if>
|
<if test="warndown != null">and warndown = #{warndown}</if>
|
<if test="picturePath != null and picturePath != ''">and picture_path = #{picturePath}</if>
|
</where>
|
</select>
|
|
<select id="selectIvrLibaScriptTargetByQuestionTargetID" parameterType="String"
|
resultMap="IvrLibaScriptTargetResult">
|
<include refid="selectIvrLibaScriptTargetVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertIvrLibaScriptTarget" parameterType="com.smartor.domain.IvrLibaScriptTarget">
|
insert into ivr_liba_script_target
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="scriptid != null">scriptid,</if>
|
<if test="targetID != null">targetID,</if>
|
<if test="targetType != null">targetType,</if>
|
<if test="categoryName != null">categoryName,</if>
|
<if test="targetValue != null">targetValue,</if>
|
<if test="basicRegex != null">basicRegex,</if>
|
<if test="selfRegex != null">selfRegex,</if>
|
<if test="regexUsedType != null">regexUsedType,</if>
|
<if test="sort != null">sort,</if>
|
<if test="version != null">version,</if>
|
<if test="isEnable != null">isEnable,</if>
|
<if test="tipsJson != null">tipsJson,</if>
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="isupload != null">isupload,</if>
|
<if test="uploadTime != null">upload_time,</if>
|
<if test="orgid != null">orgid,</if>
|
<if test="pid != null">pid,</if>
|
<if test="guid != null">guid,</if>
|
<if test="optiondesc != null">optiondesc,</if>
|
<if test="isabnormal != null">isabnormal,</if>
|
<if test="warnup != null">warnup,</if>
|
<if test="warndown != null">warndown,</if>
|
<if test="picturePath != null">picture_path,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="scriptid != null ">#{scriptid},</if>
|
<if test="targetID != null">#{targetID},</if>
|
<if test="targetType != null">#{targetType},</if>
|
<if test="categoryName != null">#{categoryName},</if>
|
<if test="targetValue != null">#{targetValue},</if>
|
<if test="basicRegex != null">#{basicRegex},</if>
|
<if test="selfRegex != null">#{selfRegex},</if>
|
<if test="regexUsedType != null">#{regexUsedType},</if>
|
<if test="sort != null">#{sort},</if>
|
<if test="version != null">#{version},</if>
|
<if test="isEnable != null">#{isEnable},</if>
|
<if test="tipsJson != null">#{tipsJson},</if>
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="isupload != null">#{isupload},</if>
|
<if test="uploadTime != null">#{uploadTime},</if>
|
<if test="orgid != null">#{orgid},</if>
|
<if test="pid != null">#{pid},</if>
|
<if test="guid != null">#{guid},</if>
|
<if test="optiondesc != null">#{optiondesc},</if>
|
<if test="isabnormal != null">#{isabnormal},</if>
|
<if test="warnup != null">#{warnup},</if>
|
<if test="warndown != null">#{warndown},</if>
|
<if test="picturePath != null">#{picturePath},</if>
|
</trim>
|
</insert>
|
|
<update id="updateIvrLibaScriptTarget" parameterType="com.smartor.domain.IvrLibaScriptTarget">
|
update ivr_liba_script_target
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="scriptid != null">scriptid = #{scriptid},</if>
|
<if test="targetID != null">targetID = #{targetID},</if>
|
<if test="targetType != null">targetType = #{targetType},</if>
|
<if test="categoryName != null">categoryName = #{categoryName},</if>
|
<if test="targetValue != null">targetValue = #{targetValue},</if>
|
<if test="basicRegex != null">basicRegex = #{basicRegex},</if>
|
<if test="selfRegex != null">selfRegex = #{selfRegex},</if>
|
<if test="regexUsedType != null">regexUsedType = #{regexUsedType},</if>
|
<if test="sort != null">sort = #{sort},</if>
|
<if test="version != null">version = #{version},</if>
|
<if test="isEnable != null">isEnable = #{isEnable},</if>
|
<if test="tipsJson != null">tipsJson = #{tipsJson},</if>
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="isupload != null">isupload = #{isupload},</if>
|
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
<if test="orgid != null">orgid = #{orgid},</if>
|
<if test="pid != null">pid = #{pid},</if>
|
<if test="guid != null">guid = #{guid},</if>
|
<if test="optiondesc != null">optiondesc = #{optiondesc},</if>
|
<if test="isabnormal != null">isabnormal = #{isabnormal},</if>
|
<if test="warnup != null">warnup = #{warnup},</if>
|
<if test="warndown != null">warndown = #{warndown},</if>
|
<if test="picturePath != null">picture_path = #{picturePath},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteIvrLibaScriptTargetByQuestionTargetID" parameterType="Long">
|
update ivr_liba_script_target
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag = 1
|
</trim>
|
where id = #{id}
|
</delete>
|
|
</mapper>
|