TTaskLogMapper.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.goafanti.common.dao.TTaskLogMapper">
  6. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskLog">
  7. <id property="id" column="id" jdbcType="INTEGER"/>
  8. <result property="taskId" column="task_id" jdbcType="INTEGER"/>
  9. <result property="taskAllocator" column="task_allocator" jdbcType="VARCHAR"/>
  10. <result property="taskReceiver" column="task_receiver" jdbcType="VARCHAR"/>
  11. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  12. <result property="status" column="status" jdbcType="INTEGER"/>
  13. </resultMap>
  14. <sql id="Base_Column_List">
  15. id,task_id,task_allocator,
  16. task_receiver,create_time,status
  17. </sql>
  18. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  19. select
  20. <include refid="Base_Column_List" />
  21. from t_task_log
  22. where id = #{id,jdbcType=INTEGER}
  23. </select>
  24. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  25. delete from t_task_log
  26. where id = #{id,jdbcType=INTEGER}
  27. </delete>
  28. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskLog" useGeneratedKeys="true">
  29. insert into t_task_log
  30. ( id,task_id,task_allocator
  31. ,task_receiver,create_time,status
  32. )
  33. values (#{id,jdbcType=INTEGER},#{taskId,jdbcType=INTEGER},#{taskAllocator,jdbcType=VARCHAR}
  34. ,#{taskReceiver,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{status,jdbcType=INTEGER}
  35. )
  36. </insert>
  37. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskLog" useGeneratedKeys="true">
  38. insert into t_task_log
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="id != null">id,</if>
  41. <if test="taskId != null">task_id,</if>
  42. <if test="taskAllocator != null">task_allocator,</if>
  43. <if test="taskReceiver != null">task_receiver,</if>
  44. <if test="createTime != null">create_time,</if>
  45. <if test="status != null">status,</if>
  46. </trim>
  47. <trim prefix="values (" suffix=")" suffixOverrides=",">
  48. <if test="id != null">#{id,jdbcType=INTEGER},</if>
  49. <if test="taskId != null">#{taskId,jdbcType=INTEGER},</if>
  50. <if test="taskAllocator != null">#{taskAllocator,jdbcType=VARCHAR},</if>
  51. <if test="taskReceiver != null">#{taskReceiver,jdbcType=VARCHAR},</if>
  52. <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
  53. <if test="status != null">#{status,jdbcType=INTEGER},</if>
  54. </trim>
  55. </insert>
  56. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskLog">
  57. update t_task_log
  58. <set>
  59. <if test="taskId != null">
  60. task_id = #{taskId,jdbcType=INTEGER},
  61. </if>
  62. <if test="taskAllocator != null">
  63. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  64. </if>
  65. <if test="taskReceiver != null">
  66. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  67. </if>
  68. <if test="createTime != null">
  69. create_time = #{createTime,jdbcType=TIMESTAMP},
  70. </if>
  71. <if test="status != null">
  72. status = #{status,jdbcType=INTEGER},
  73. </if>
  74. </set>
  75. where id = #{id,jdbcType=INTEGER}
  76. </update>
  77. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskLog">
  78. update t_task_log
  79. set
  80. task_id = #{taskId,jdbcType=INTEGER},
  81. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  82. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  83. create_time = #{createTime,jdbcType=TIMESTAMP},
  84. status = #{status,jdbcType=INTEGER}
  85. where id = #{id,jdbcType=INTEGER}
  86. </update>
  87. <update id="updateDimissionTransfer" parameterType="java.lang.String">
  88. update t_task_log set
  89. task_receiver = #{transferId,jdbcType=VARCHAR}
  90. where task_receiver = #{aid,jdbcType=VARCHAR}
  91. </update>
  92. <select id="selectByTid" resultType="com.goafanti.order.bo.OutTTaskLog">
  93. select a.id,b.name taskAllocatorName,c.name taskReceiverName,a.create_time createTime
  94. from t_task_log a
  95. left join admin b on a.task_allocator =b.id
  96. left join admin c on a.task_receiver =c.id
  97. where task_id = #{id}
  98. </select>
  99. </mapper>