123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <?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.huaxu.zoniot.dao.JobTaskMapper">
- <resultMap id="BaseResultMap" type="com.huaxu.zoniot.entity.JobTask">
- <!--@mbg.generated-->
- <!--@Table sc_job_task-->
- <id column="task_id" jdbcType="INTEGER" property="taskId" />
- <result column="job_name" jdbcType="VARCHAR" property="jobName" />
- <result column="context" jdbcType="VARCHAR" property="context" />
- <result column="task_state" jdbcType="INTEGER" property="taskState" />
- <result column="remark" jdbcType="VARCHAR" property="remark" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="complete_time" jdbcType="TIMESTAMP" property="completeTime" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- task_id, job_name, context, task_state,remark, create_time, update_time, complete_time
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from sc_job_task
- where task_id = #{taskId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- <!--@mbg.generated-->
- delete from sc_job_task
- where task_id = #{taskId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.huaxu.zoniot.entity.JobTask" useGeneratedKeys="true" keyProperty="taskId" keyColumn="task_id">
- <!--@mbg.generated-->
- insert into sc_job_task (task_id, job_name, context,
- task_state, remark,create_time, update_time,
- complete_time)
- values (#{taskId,jdbcType=INTEGER}, #{jobName,jdbcType=VARCHAR}, #{context,jdbcType=VARCHAR},
- #{taskState,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
- #{completeTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.huaxu.zoniot.entity.JobTask">
- <!--@mbg.generated-->
- insert into sc_job_task
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="taskId != null">
- task_id,
- </if>
- <if test="jobName != null">
- job_name,
- </if>
- <if test="context != null">
- context,
- </if>
- <if test="taskState != null">
- task_state,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="completeTime != null">
- complete_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="taskId != null">
- #{taskId,jdbcType=INTEGER},
- </if>
- <if test="jobName != null">
- #{jobName,jdbcType=VARCHAR},
- </if>
- <if test="context != null">
- #{context,jdbcType=VARCHAR},
- </if>
- <if test="taskState != null">
- #{taskState,jdbcType=INTEGER},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="completeTime != null">
- #{completeTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.huaxu.zoniot.entity.JobTask">
- <!--@mbg.generated-->
- update sc_job_task
- <set>
- <if test="jobName != null">
- job_name = #{jobName,jdbcType=VARCHAR},
- </if>
- <if test="context != null">
- context = #{context,jdbcType=VARCHAR},
- </if>
- <if test="taskState != null">
- task_state = #{taskState,jdbcType=INTEGER},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="completeTime != null">
- complete_time = #{completeTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where task_id = #{taskId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.huaxu.zoniot.entity.JobTask">
- <!--@mbg.generated-->
- update sc_job_task
- set job_name = #{jobName,jdbcType=VARCHAR},
- context = #{context,jdbcType=VARCHAR},
- task_state = #{taskState,jdbcType=INTEGER},
- remark = #{remark,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- complete_time = #{completeTime,jdbcType=TIMESTAMP}
- where task_id = #{taskId,jdbcType=INTEGER}
- </update>
- <insert id="batchInsert" parameterType="map" useGeneratedKeys="true" keyProperty="taskId" keyColumn="task_id">
- <!--@mbg.generated-->
- insert into sc_job_task
- (task_id, job_name, context, task_state,remark, create_time, update_time, complete_time)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.taskId,jdbcType=INTEGER}, #{item.jobName,jdbcType=VARCHAR}, #{item.context,jdbcType=VARCHAR},
- #{item.taskState,jdbcType=INTEGER},#{item.remark,jdbcType=VARCHAR},
- #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.completeTime,jdbcType=TIMESTAMP})
- </foreach>
- </insert>
- </mapper>
|