TaskSoptLogMapper.xml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.TaskSoptLogMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskSoptLog">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="task_sopt_id" jdbcType="INTEGER" property="taskSoptId" />
  7. <result column="status" jdbcType="INTEGER" property="status" />
  8. <result column="reason" jdbcType="VARCHAR" property="reason" />
  9. <result column="create_by" jdbcType="VARCHAR" property="createBy" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. </resultMap>
  12. <sql id="Base_Column_List">
  13. id, task_sopt_id, `status`, reason, create_by, create_time
  14. </sql>
  15. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  16. select
  17. <include refid="Base_Column_List" />
  18. from task_sopt_log
  19. where id = #{id,jdbcType=BIGINT}
  20. </select>
  21. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  22. delete from task_sopt_log
  23. where id = #{id,jdbcType=BIGINT}
  24. </delete>
  25. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskSoptLog" useGeneratedKeys="true">
  26. insert into task_sopt_log (task_sopt_id, `status`, reason,
  27. create_by, create_time)
  28. values (#{taskSoptId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR},
  29. #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
  30. </insert>
  31. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TaskSoptLog" useGeneratedKeys="true">
  32. insert into task_sopt_log
  33. <trim prefix="(" suffix=")" suffixOverrides=",">
  34. <if test="taskSoptId != null">
  35. task_sopt_id,
  36. </if>
  37. <if test="status != null">
  38. `status`,
  39. </if>
  40. <if test="reason != null">
  41. reason,
  42. </if>
  43. <if test="createBy != null">
  44. create_by,
  45. </if>
  46. <if test="createTime != null">
  47. create_time,
  48. </if>
  49. </trim>
  50. <trim prefix="values (" suffix=")" suffixOverrides=",">
  51. <if test="taskSoptId != null">
  52. #{taskSoptId,jdbcType=INTEGER},
  53. </if>
  54. <if test="status != null">
  55. #{status,jdbcType=INTEGER},
  56. </if>
  57. <if test="reason != null">
  58. #{reason,jdbcType=VARCHAR},
  59. </if>
  60. <if test="createBy != null">
  61. #{createBy,jdbcType=VARCHAR},
  62. </if>
  63. <if test="createTime != null">
  64. #{createTime,jdbcType=TIMESTAMP},
  65. </if>
  66. </trim>
  67. </insert>
  68. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskSoptLog">
  69. update task_sopt_log
  70. <set>
  71. <if test="taskSoptId != null">
  72. task_sopt_id = #{taskSoptId,jdbcType=INTEGER},
  73. </if>
  74. <if test="status != null">
  75. `status` = #{status,jdbcType=INTEGER},
  76. </if>
  77. <if test="reason != null">
  78. reason = #{reason,jdbcType=VARCHAR},
  79. </if>
  80. <if test="createBy != null">
  81. create_by = #{createBy,jdbcType=VARCHAR},
  82. </if>
  83. <if test="createTime != null">
  84. create_time = #{createTime,jdbcType=TIMESTAMP},
  85. </if>
  86. </set>
  87. where id = #{id,jdbcType=BIGINT}
  88. </update>
  89. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TaskSoptLog">
  90. update task_sopt_log
  91. set task_sopt_id = #{taskSoptId,jdbcType=INTEGER},
  92. `status` = #{status,jdbcType=INTEGER},
  93. reason = #{reason,jdbcType=VARCHAR},
  94. create_by = #{createBy,jdbcType=VARCHAR},
  95. create_time = #{createTime,jdbcType=TIMESTAMP}
  96. where id = #{id,jdbcType=BIGINT}
  97. </update>
  98. </mapper>