| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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.goafanti.common.dao.TTaskLogMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskLog">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="taskId" column="task_id" jdbcType="INTEGER"/>
- <result property="taskAllocator" column="task_allocator" jdbcType="VARCHAR"/>
- <result property="taskReceiver" column="task_receiver" jdbcType="VARCHAR"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="status" column="status" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,task_id,task_allocator,
- task_receiver,create_time,status
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_task_log
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from t_task_log
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskLog" useGeneratedKeys="true">
- insert into t_task_log
- ( id,task_id,task_allocator
- ,task_receiver,create_time,status
- )
- values (#{id,jdbcType=INTEGER},#{taskId,jdbcType=INTEGER},#{taskAllocator,jdbcType=VARCHAR}
- ,#{taskReceiver,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{status,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskLog" useGeneratedKeys="true">
- insert into t_task_log
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="taskId != null">task_id,</if>
- <if test="taskAllocator != null">task_allocator,</if>
- <if test="taskReceiver != null">task_receiver,</if>
- <if test="createTime != null">create_time,</if>
- <if test="status != null">status,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id,jdbcType=INTEGER},</if>
- <if test="taskId != null">#{taskId,jdbcType=INTEGER},</if>
- <if test="taskAllocator != null">#{taskAllocator,jdbcType=VARCHAR},</if>
- <if test="taskReceiver != null">#{taskReceiver,jdbcType=VARCHAR},</if>
- <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
- <if test="status != null">#{status,jdbcType=INTEGER},</if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskLog">
- update t_task_log
- <set>
- <if test="taskId != null">
- task_id = #{taskId,jdbcType=INTEGER},
- </if>
- <if test="taskAllocator != null">
- task_allocator = #{taskAllocator,jdbcType=VARCHAR},
- </if>
- <if test="taskReceiver != null">
- task_receiver = #{taskReceiver,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskLog">
- update t_task_log
- set
- task_id = #{taskId,jdbcType=INTEGER},
- task_allocator = #{taskAllocator,jdbcType=VARCHAR},
- task_receiver = #{taskReceiver,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- status = #{status,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateDimissionTransfer" parameterType="java.lang.String">
- update t_task_log set
- task_receiver = #{transferId,jdbcType=VARCHAR}
- where task_receiver = #{aid,jdbcType=VARCHAR}
- </update>
- <select id="selectByTid" resultType="com.goafanti.order.bo.OutTTaskLog">
- select a.id,b.name taskAllocatorName,c.name taskReceiverName,a.create_time createTime
- from t_task_log a
- left join admin b on a.task_allocator =b.id
- left join admin c on a.task_receiver =c.id
- where task_id = #{id}
- </select>
- </mapper>
|