| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.IvrTaskMapper"> |
| | | |
| | | <resultMap type="IvrTask" id="IvrTaskResult"> |
| | | <resultMap type="com.smartor.domain.IvrTask" id="IvrTaskResult"> |
| | | <result property="taskid" column="taskid" /> |
| | | <result property="taskname" column="taskname" /> |
| | | <result property="templateid" column="templateid" /> |
| | |
| | | </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="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="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="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="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"> |
| | |
| | | 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> |
| | |
| | | </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> |
| | | </update> |
| | | </mapper> |