InpTemporaryDataMapper.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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.xinxin.topro.pubservice.mysqlmapper.InpTemporaryDataMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.InpTemporaryData" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="table_name" property="tableName" jdbcType="VARCHAR" />
  7. <result column="primary_field_value" property="primaryFieldValue" jdbcType="INTEGER" />
  8. <result column="main_type" property="mainType" jdbcType="VARCHAR" />
  9. <result column="sub_type" property="subType" jdbcType="VARCHAR" />
  10. <result column="is_handle" property="isHandle" jdbcType="INTEGER" />
  11. <result column="is_del" property="isDel" jdbcType="INTEGER" />
  12. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  13. <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  14. </resultMap>
  15. <sql id="Base_Column_List" >
  16. id, table_name, primary_field_value, main_type, sub_type, is_handle, is_del, create_time,
  17. update_time
  18. </sql>
  19. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  20. select
  21. <include refid="Base_Column_List" />
  22. from inp_temporary_data
  23. where id = #{id,jdbcType=INTEGER}
  24. </select>
  25. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  26. delete from inp_temporary_data
  27. where id = #{id,jdbcType=INTEGER}
  28. </delete>
  29. <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpTemporaryData" >
  30. insert into inp_temporary_data (id, table_name, primary_field_value,
  31. main_type, sub_type, is_handle,
  32. is_del, create_time, update_time
  33. )
  34. values (#{id,jdbcType=INTEGER}, #{tableName,jdbcType=VARCHAR}, #{primaryFieldValue,jdbcType=INTEGER},
  35. #{mainType,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR}, #{isHandle,jdbcType=INTEGER},
  36. #{isDel,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
  37. )
  38. </insert>
  39. <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpTemporaryData" >
  40. insert into inp_temporary_data
  41. <trim prefix="(" suffix=")" suffixOverrides="," >
  42. <if test="id != null" >
  43. id,
  44. </if>
  45. <if test="tableName != null" >
  46. table_name,
  47. </if>
  48. <if test="primaryFieldValue != null" >
  49. primary_field_value,
  50. </if>
  51. <if test="mainType != null" >
  52. main_type,
  53. </if>
  54. <if test="subType != null" >
  55. sub_type,
  56. </if>
  57. <if test="isHandle != null" >
  58. is_handle,
  59. </if>
  60. <if test="isDel != null" >
  61. is_del,
  62. </if>
  63. <if test="createTime != null" >
  64. create_time,
  65. </if>
  66. <if test="updateTime != null" >
  67. update_time,
  68. </if>
  69. </trim>
  70. <trim prefix="values (" suffix=")" suffixOverrides="," >
  71. <if test="id != null" >
  72. #{id,jdbcType=INTEGER},
  73. </if>
  74. <if test="tableName != null" >
  75. #{tableName,jdbcType=VARCHAR},
  76. </if>
  77. <if test="primaryFieldValue != null" >
  78. #{primaryFieldValue,jdbcType=INTEGER},
  79. </if>
  80. <if test="mainType != null" >
  81. #{mainType,jdbcType=VARCHAR},
  82. </if>
  83. <if test="subType != null" >
  84. #{subType,jdbcType=VARCHAR},
  85. </if>
  86. <if test="isHandle != null" >
  87. #{isHandle,jdbcType=INTEGER},
  88. </if>
  89. <if test="isDel != null" >
  90. #{isDel,jdbcType=INTEGER},
  91. </if>
  92. <if test="createTime != null" >
  93. #{createTime,jdbcType=TIMESTAMP},
  94. </if>
  95. <if test="updateTime != null" >
  96. #{updateTime,jdbcType=TIMESTAMP},
  97. </if>
  98. </trim>
  99. </insert>
  100. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpTemporaryData" >
  101. update inp_temporary_data
  102. <set >
  103. <if test="tableName != null" >
  104. table_name = #{tableName,jdbcType=VARCHAR},
  105. </if>
  106. <if test="primaryFieldValue != null" >
  107. primary_field_value = #{primaryFieldValue,jdbcType=INTEGER},
  108. </if>
  109. <if test="mainType != null" >
  110. main_type = #{mainType,jdbcType=VARCHAR},
  111. </if>
  112. <if test="subType != null" >
  113. sub_type = #{subType,jdbcType=VARCHAR},
  114. </if>
  115. <if test="isHandle != null" >
  116. is_handle = #{isHandle,jdbcType=INTEGER},
  117. </if>
  118. <if test="isDel != null" >
  119. is_del = #{isDel,jdbcType=INTEGER},
  120. </if>
  121. <if test="createTime != null" >
  122. create_time = #{createTime,jdbcType=TIMESTAMP},
  123. </if>
  124. <if test="updateTime != null" >
  125. update_time = #{updateTime,jdbcType=TIMESTAMP},
  126. </if>
  127. </set>
  128. where id = #{id,jdbcType=INTEGER}
  129. </update>
  130. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpTemporaryData" >
  131. update inp_temporary_data
  132. set table_name = #{tableName,jdbcType=VARCHAR},
  133. primary_field_value = #{primaryFieldValue,jdbcType=INTEGER},
  134. main_type = #{mainType,jdbcType=VARCHAR},
  135. sub_type = #{subType,jdbcType=VARCHAR},
  136. is_handle = #{isHandle,jdbcType=INTEGER},
  137. is_del = #{isDel,jdbcType=INTEGER},
  138. create_time = #{createTime,jdbcType=TIMESTAMP},
  139. update_time = #{updateTime,jdbcType=TIMESTAMP}
  140. where id = #{id,jdbcType=INTEGER}
  141. </update>
  142. <insert id="batchInsert">
  143. INSERT INTO inp_temporary_data (table_name, primary_field_value,
  144. main_type, sub_type, is_handle,
  145. is_del, create_time, update_time
  146. )
  147. VALUES
  148. <foreach collection="dataList" item="item" separator=",">
  149. ( #{item.tableName,jdbcType=VARCHAR}, #{item.primaryFieldValue,jdbcType=INTEGER},
  150. #{item.mainType,jdbcType=VARCHAR}, #{item.subType,jdbcType=VARCHAR}, #{item.isHandle,jdbcType=INTEGER},
  151. #{item.isDel,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}
  152. )
  153. </foreach>
  154. </insert>
  155. </mapper>