| | |
| | | <?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"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskMapper"> |
| | | |
| | | <resultMap type="IvrTask" id="IvrTaskResult"> |
| | | <result property="taskid" column="taskid" /> |
| | | <result property="taskname" column="taskname" /> |
| | | <result property="templateid" column="templateid" /> |
| | | <result property="templatename" column="templatename" /> |
| | | <result property="labelinfo" column="labelinfo" /> |
| | | <result property="state" column="state" /> |
| | | <result property="count" column="count" /> |
| | | <result property="executed" column="executed" /> |
| | | <result property="unexecuted" column="unexecuted" /> |
| | | <result property="fail" column="fail" /> |
| | | <result property="userid" column="userid" /> |
| | | <result property="username" column="username" /> |
| | | <result property="addtime" column="addtime" /> |
| | | <result property="checkuserid" column="checkuserid" /> |
| | | <result property="checkusername" column="checkusername" /> |
| | | <result property="checktime" column="checktime" /> |
| | | <result property="type" column="type" /> |
| | | <result property="typename" column="typename" /> |
| | | <result property="usebqsms" column="usebqsms" /> |
| | | <result property="usebhsms" column="usebhsms" /> |
| | | <result property="usesendsms" column="usesendsms" /> |
| | | <result property="deptcode" column="deptcode" /> |
| | | <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" /> |
| | | |
| | | <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult"> |
| | | <result property="taskid" column="taskid"/> |
| | | <result property="taskname" column="taskname"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="templatename" column="templatename"/> |
| | | <result property="labelinfo" column="labelinfo"/> |
| | | <result property="state" column="state"/> |
| | | <result property="count" column="count"/> |
| | | <result property="executed" column="executed"/> |
| | | <result property="unexecuted" column="unexecuted"/> |
| | | <result property="fail" column="fail"/> |
| | | <result property="userid" column="userid"/> |
| | | <result property="username" column="username"/> |
| | | <result property="addtime" column="addtime"/> |
| | | <result property="checkuserid" column="checkuserid"/> |
| | | <result property="checkusername" column="checkusername"/> |
| | | <result property="checktime" column="checktime"/> |
| | | <result property="type" column="type"/> |
| | | <result property="typename" column="typename"/> |
| | | <result property="usebqsms" column="usebqsms"/> |
| | | <result property="usebhsms" column="usebhsms"/> |
| | | <result property="usesendsms" column="usesendsms"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <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"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskVo"> |
| | | select taskid, taskname, templateid, templatename, labelinfo, state, count, executed, unexecuted, fail, userid, username, addtime, checkuserid, checkusername, checktime, type, typename, usebqsms, usebhsms, usesendsms, deptcode, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid from ivr_task |
| | | select taskid, |
| | | taskname, |
| | | templateid, |
| | | templatename, |
| | | labelinfo, |
| | | state, |
| | | count, |
| | | executed, |
| | | unexecuted, |
| | | fail, |
| | | userid, |
| | | username, |
| | | addtime, |
| | | checkuserid, |
| | | checkusername, |
| | | checktime, |
| | | type, |
| | | typename, |
| | | usebqsms, |
| | | usebhsms, |
| | | usesendsms, |
| | | deptcode, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | orgid |
| | | from ivr_task |
| | | </sql> |
| | | |
| | | <select id="selectIvrTaskList" parameterType="IvrTask" resultMap="IvrTaskResult"> |
| | | <select id="selectIvrTaskList" parameterType="com.smartor.domain.IvrTask" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | <where> |
| | | <if test="taskname != null and taskname != ''"> and taskname like concat('%', #{taskname}, '%')</if> |
| | | <if test="templateid != null and templateid != ''"> and templateid = #{templateid}</if> |
| | | <if test="templatename != null and templatename != ''"> and templatename like concat('%', #{templatename}, '%')</if> |
| | | <if test="labelinfo != null and labelinfo != ''"> and labelinfo = #{labelinfo}</if> |
| | | <if test="state != null "> and state = #{state}</if> |
| | | <if test="count != null "> and count = #{count}</if> |
| | | <if test="executed != null "> and executed = #{executed}</if> |
| | | <if test="unexecuted != null "> and unexecuted = #{unexecuted}</if> |
| | | <if test="fail != null "> and fail = #{fail}</if> |
| | | <if test="userid != null and userid != ''"> and userid = #{userid}</if> |
| | | <if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if> |
| | | <if test="addtime != null "> and addtime = #{addtime}</if> |
| | | <if test="checkuserid != null and checkuserid != ''"> and checkuserid = #{checkuserid}</if> |
| | | <if test="checkusername != null and checkusername != ''"> and checkusername like concat('%', #{checkusername}, '%')</if> |
| | | <if test="checktime != null "> and checktime = #{checktime}</if> |
| | | <if test="type != null and type != ''"> and type = #{type}</if> |
| | | <if test="typename != null and typename != ''"> and typename like concat('%', #{typename}, '%')</if> |
| | | <if test="usebqsms != null "> and usebqsms = #{usebqsms}</if> |
| | | <if test="usebhsms != null "> and usebhsms = #{usebhsms}</if> |
| | | <if test="usesendsms != null "> and usesendsms = #{usesendsms}</if> |
| | | <if test="deptcode != null and deptcode != ''"> and deptcode = #{deptcode}</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> |
| | | <where> |
| | | <if test="taskname != null and taskname != ''">and taskname like concat('%', #{taskname}, '%')</if> |
| | | <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if> |
| | | <if test="templatename != null and templatename != ''">and templatename like concat('%', #{templatename}, |
| | | '%') |
| | | </if> |
| | | <if test="labelinfo != null and labelinfo != ''">and labelinfo = #{labelinfo}</if> |
| | | <if test="state != null ">and state = #{state}</if> |
| | | <if test="count != null ">and count = #{count}</if> |
| | | <if test="executed != null ">and executed = #{executed}</if> |
| | | <if test="unexecuted != null ">and unexecuted = #{unexecuted}</if> |
| | | <if test="fail != null ">and fail = #{fail}</if> |
| | | <if test="userid != null and userid != ''">and userid = #{userid}</if> |
| | | <if test="username != null and username != ''">and username like concat('%', #{username}, '%')</if> |
| | | <if test="addtime != null ">and addtime = #{addtime}</if> |
| | | <if test="checkuserid != null and checkuserid != ''">and checkuserid = #{checkuserid}</if> |
| | | <if test="checkusername != null and checkusername != ''">and checkusername like concat('%', |
| | | #{checkusername}, '%') |
| | | </if> |
| | | <if test="checktime != null ">and checktime = #{checktime}</if> |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | <if test="typename != null and typename != ''">and typename like concat('%', #{typename}, '%')</if> |
| | | <if test="usebqsms != null ">and usebqsms = #{usebqsms}</if> |
| | | <if test="usebhsms != null ">and usebhsms = #{usebhsms}</if> |
| | | <if test="usesendsms != null ">and usesendsms = #{usesendsms}</if> |
| | | <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</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> |
| | | </where> |
| | | order by upeate_time desc,taskid desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectIvrTaskByTaskid" parameterType="Long" resultMap="IvrTaskResult"> |
| | | <include refid="selectIvrTaskVo"/> |
| | | where taskid = #{taskid} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTask" parameterType="IvrTask"> |
| | | |
| | | <insert id="insertIvrTask" parameterType="com.smartor.domain.IvrTask" useGeneratedKeys="true" |
| | | keyProperty="taskid"> |
| | | insert into ivr_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">taskid,</if> |
| | |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | </trim> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | | <if test="taskname != null">#{taskname},</if> |
| | |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | </trim> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateIvrTask" parameterType="IvrTask"> |
| | | <update id="updateIvrTask" parameterType="com.smartor.domain.IvrTask"> |
| | | update ivr_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskname != null">taskname = #{taskname},</if> |
| | |
| | | where taskid = #{taskid} |
| | | </update> |
| | | |
| | | <delete id="deleteIvrTaskByTaskid" parameterType="Long"> |
| | | delete from ivr_task where taskid = #{taskid} |
| | | </delete> |
| | | <update id="deleteIvrTaskByTaskid" parameterType="Long"> |
| | | update ivr_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where taskid = #{taskid} |
| | | </update> |
| | | |
| | | <delete id="deleteIvrTaskByTaskids" parameterType="String"> |
| | | delete from ivr_task where taskid in |
| | | <update id="deleteIvrTaskByTaskids" parameterType="String"> |
| | | update ivr_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where taskid in |
| | | <foreach item="taskid" collection="array" open="(" separator="," close=")"> |
| | | #{taskid} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | | </update> |
| | | </mapper> |