TaskProgressLogMapper.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.goafanti.common.dao.TaskProgressLogMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskProgressLog">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="tid" jdbcType="INTEGER" property="tid" />
  7. <result column="patent_name" jdbcType="VARCHAR" property="patentName" />
  8. <result column="status" jdbcType="INTEGER" property="status" />
  9. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  10. </resultMap>
  11. <sql id="Base_Column_List">
  12. id, tid, patent_name, `status`, create_time
  13. </sql>
  14. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  15. select
  16. <include refid="Base_Column_List" />
  17. from task_progress_log
  18. where id = #{id,jdbcType=INTEGER}
  19. </select>
  20. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  21. delete from task_progress_log
  22. where id = #{id,jdbcType=INTEGER}
  23. </delete>
  24. <insert id="insert" parameterType="com.goafanti.common.model.TaskProgressLog">
  25. insert into task_progress_log (id, tid, patent_name,
  26. `status`, create_time)
  27. values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{patentName,jdbcType=VARCHAR},
  28. #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
  29. </insert>
  30. <insert id="insertSelective" parameterType="com.goafanti.common.model.TaskProgressLog">
  31. insert into task_progress_log
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="id != null">
  34. id,
  35. </if>
  36. <if test="tid != null">
  37. tid,
  38. </if>
  39. <if test="patentName != null">
  40. patent_name,
  41. </if>
  42. <if test="status != null">
  43. `status`,
  44. </if>
  45. <if test="createTime != null">
  46. create_time,
  47. </if>
  48. </trim>
  49. <trim prefix="values (" suffix=")" suffixOverrides=",">
  50. <if test="id != null">
  51. #{id,jdbcType=INTEGER},
  52. </if>
  53. <if test="tid != null">
  54. #{tid,jdbcType=INTEGER},
  55. </if>
  56. <if test="patentName != null">
  57. #{patentName,jdbcType=VARCHAR},
  58. </if>
  59. <if test="status != null">
  60. #{status,jdbcType=INTEGER},
  61. </if>
  62. <if test="createTime != null">
  63. #{createTime,jdbcType=TIMESTAMP},
  64. </if>
  65. </trim>
  66. </insert>
  67. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskProgressLog">
  68. update task_progress_log
  69. <set>
  70. <if test="tid != null">
  71. tid = #{tid,jdbcType=INTEGER},
  72. </if>
  73. <if test="patentName != null">
  74. patent_name = #{patentName,jdbcType=VARCHAR},
  75. </if>
  76. <if test="status != null">
  77. `status` = #{status,jdbcType=INTEGER},
  78. </if>
  79. <if test="createTime != null">
  80. create_time = #{createTime,jdbcType=TIMESTAMP},
  81. </if>
  82. </set>
  83. where id = #{id,jdbcType=INTEGER}
  84. </update>
  85. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TaskProgressLog">
  86. update task_progress_log
  87. set tid = #{tid,jdbcType=INTEGER},
  88. patent_name = #{patentName,jdbcType=VARCHAR},
  89. `status` = #{status,jdbcType=INTEGER},
  90. create_time = #{createTime,jdbcType=TIMESTAMP}
  91. where id = #{id,jdbcType=INTEGER}
  92. </update>
  93. <select id="selectTaskProgressLog" resultType="com.goafanti.order.bo.OutTaskProgressLog">
  94. select
  95. id, tid, patent_name patentName, `status`, date_format(create_time,'%Y-%m-%d %H:%i:%S')createTime
  96. from task_progress_log
  97. where tid = #{tid,jdbcType=INTEGER}
  98. </select>
  99. </mapper>