PublicReleaseDateClockMapper.xml 5.0 KB

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