12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?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.simuwang.base.mapper.EmailTaskInfoMapper">
- <resultMap id="BaseResultMap" type="com.simuwang.base.pojo.dos.EmailTaskInfoDO">
- <id column="id" property="id"/>
- <result column="email" property="email"/>
- <result column="task_name" property="taskName"/>
- <result column="task_type" property="taskType"/>
- <result column="start_time" property="startTime" />
- <result column="end_time" property="endTime" />
- <result column="task_status" property="taskStatus"/>
- <result column="isvalid" property="isvalid"/>
- <result column="creatorid" property="creatorId"/>
- <result column="createtime" property="createTime"/>
- <result column="updaterid" property="updaterId"/>
- <result column="updatetime" property="updateTime"/>
- </resultMap>
- <insert id="insert" parameterType="com.simuwang.base.pojo.dos.EmailTaskInfoDO" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
- insert into PPW_EMAIL.email_task_info(email, task_name,task_type, start_time, end_time, task_status,
- isvalid, creatorid, createtime, updaterid, updatetime)
- values (#{itemDo.email}, #{itemDo.taskName}, #{itemDo.taskType}, #{itemDo.startTime}, #{itemDo.endTime}, #{itemDo.taskStatus},
- #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
- </insert>
- <update id="updateTaskStatus">
- update PPW_EMAIL.email_task_info set task_status=#{taskStatus},updatetime=sysdate() where email=#{email} and start_time=#{startTime} and end_time=#{endTime}
- </update>
- <update id="updateTaskStatusById">
- update PPW_EMAIL.email_task_info set task_status=#{taskStatus},updatetime=#{updateTime},end_time=#{endTime} where id=#{id}
- </update>
- <delete id="deleteTaskLog">
- update PPW_EMAIL.email_task_info set isvalid=0,updatetime=sysdate(),updaterid=#{userId} where isvalid=0
- and id in
- <foreach collection="idList" index="index" item="id" separator="," open="(" close=")">
- #{id}
- </foreach>
- </delete>
- <select id="searchTaskList" resultMap="BaseResultMap"
- parameterType="com.simuwang.base.pojo.dto.query.TaskPageQuery">
- select id,email, task_name,task_type, start_time, end_time, task_status,
- isvalid, creatorid, createtime, updaterid, updatetime
- from PPW_EMAIL.email_task_info
- where isvalid=1
- <if test="email != null and email !=''">
- and email like concat('%',#{email},'%')
- </if>
- <if test="startDate != null and startDate !=''">
- and updatetime >= #{startDate}
- </if>
- <if test="taskType != null">
- and task_type = #{taskType}
- </if>
- <if test="endDate != null and endDate !=''">
- and updatetime <![CDATA[ <= ]]> #{endDate}
- </if>
- order by updatetime desc
- limit #{offset},#{pageSize}
- </select>
- <select id="countTaskList" resultType="java.lang.Long"
- parameterType="com.simuwang.base.pojo.dto.query.TaskPageQuery">
- select count(1)
- from PPW_EMAIL.email_task_info
- where isvalid=1
- <if test="email != null and email !=''">
- and email like concat('%',#{email},'%')
- </if>
- <if test="startDate != null and startDate !=''">
- and updatetime >= #{startDate}
- </if>
- <if test="endDate != null and endDate !=''">
- and updatetime <![CDATA[ <= ]]> #{endDate}
- </if>
- <if test="taskType != null">
- and task_type = #{taskType}
- </if>
- </select>
- </mapper>
|