TSendNumberMapper.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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.chinaitop.depot.intelligent.basicdata.mapper.TSendNumberMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TSendNumber" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="org_id" property="orgId" jdbcType="VARCHAR" />
  7. <result column="table_name" property="tableName" jdbcType="VARCHAR" />
  8. <result column="code" property="code" jdbcType="VARCHAR" />
  9. <result column="time" property="time" jdbcType="TIMESTAMP" />
  10. <result column="remark" property="remark" jdbcType="VARCHAR" />
  11. </resultMap>
  12. <sql id="Example_Where_Clause" >
  13. <where >
  14. <foreach collection="oredCriteria" item="criteria" separator="or" >
  15. <if test="criteria.valid" >
  16. <trim prefix="(" suffix=")" prefixOverrides="and" >
  17. <foreach collection="criteria.criteria" item="criterion" >
  18. <choose >
  19. <when test="criterion.noValue" >
  20. and ${criterion.condition}
  21. </when>
  22. <when test="criterion.singleValue" >
  23. and ${criterion.condition} #{criterion.value}
  24. </when>
  25. <when test="criterion.betweenValue" >
  26. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  27. </when>
  28. <when test="criterion.listValue" >
  29. and ${criterion.condition}
  30. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  31. #{listItem}
  32. </foreach>
  33. </when>
  34. </choose>
  35. </foreach>
  36. </trim>
  37. </if>
  38. </foreach>
  39. </where>
  40. </sql>
  41. <sql id="Update_By_Example_Where_Clause" >
  42. <where >
  43. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  44. <if test="criteria.valid" >
  45. <trim prefix="(" suffix=")" prefixOverrides="and" >
  46. <foreach collection="criteria.criteria" item="criterion" >
  47. <choose >
  48. <when test="criterion.noValue" >
  49. and ${criterion.condition}
  50. </when>
  51. <when test="criterion.singleValue" >
  52. and ${criterion.condition} #{criterion.value}
  53. </when>
  54. <when test="criterion.betweenValue" >
  55. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  56. </when>
  57. <when test="criterion.listValue" >
  58. and ${criterion.condition}
  59. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  60. #{listItem}
  61. </foreach>
  62. </when>
  63. </choose>
  64. </foreach>
  65. </trim>
  66. </if>
  67. </foreach>
  68. </where>
  69. </sql>
  70. <sql id="Base_Column_List" >
  71. id, org_id, table_name, code, time, remark
  72. </sql>
  73. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TSendNumberExample" >
  74. select
  75. <if test="distinct" >
  76. distinct
  77. </if>
  78. <include refid="Base_Column_List" />
  79. from t_send_number
  80. <if test="_parameter != null" >
  81. <include refid="Example_Where_Clause" />
  82. </if>
  83. <if test="orderByClause != null" >
  84. order by ${orderByClause}
  85. </if>
  86. </select>
  87. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  88. select
  89. <include refid="Base_Column_List" />
  90. from t_send_number
  91. where id = #{id,jdbcType=VARCHAR}
  92. </select>
  93. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  94. delete from t_send_number
  95. where id = #{id,jdbcType=VARCHAR}
  96. </delete>
  97. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TSendNumberExample" >
  98. delete from t_send_number
  99. <if test="_parameter != null" >
  100. <include refid="Example_Where_Clause" />
  101. </if>
  102. </delete>
  103. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TSendNumber" >
  104. insert into t_send_number (id, org_id, table_name,
  105. code, time, remark
  106. )
  107. values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{tableName,jdbcType=VARCHAR},
  108. #{code,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
  109. )
  110. </insert>
  111. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TSendNumber" >
  112. insert into t_send_number
  113. <trim prefix="(" suffix=")" suffixOverrides="," >
  114. <if test="id != null" >
  115. id,
  116. </if>
  117. <if test="orgId != null" >
  118. org_id,
  119. </if>
  120. <if test="tableName != null" >
  121. table_name,
  122. </if>
  123. <if test="code != null" >
  124. code,
  125. </if>
  126. <if test="time != null" >
  127. time,
  128. </if>
  129. <if test="remark != null" >
  130. remark,
  131. </if>
  132. </trim>
  133. <trim prefix="values (" suffix=")" suffixOverrides="," >
  134. <if test="id != null" >
  135. #{id,jdbcType=VARCHAR},
  136. </if>
  137. <if test="orgId != null" >
  138. #{orgId,jdbcType=VARCHAR},
  139. </if>
  140. <if test="tableName != null" >
  141. #{tableName,jdbcType=VARCHAR},
  142. </if>
  143. <if test="code != null" >
  144. #{code,jdbcType=VARCHAR},
  145. </if>
  146. <if test="time != null" >
  147. #{time,jdbcType=TIMESTAMP},
  148. </if>
  149. <if test="remark != null" >
  150. #{remark,jdbcType=VARCHAR},
  151. </if>
  152. </trim>
  153. </insert>
  154. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TSendNumberExample" resultType="java.lang.Integer" >
  155. select count(*) from t_send_number
  156. <if test="_parameter != null" >
  157. <include refid="Example_Where_Clause" />
  158. </if>
  159. </select>
  160. <update id="updateByExampleSelective" parameterType="map" >
  161. update t_send_number
  162. <set >
  163. <if test="record.id != null" >
  164. id = #{record.id,jdbcType=VARCHAR},
  165. </if>
  166. <if test="record.orgId != null" >
  167. org_id = #{record.orgId,jdbcType=VARCHAR},
  168. </if>
  169. <if test="record.tableName != null" >
  170. table_name = #{record.tableName,jdbcType=VARCHAR},
  171. </if>
  172. <if test="record.code != null" >
  173. code = #{record.code,jdbcType=VARCHAR},
  174. </if>
  175. <if test="record.time != null" >
  176. time = #{record.time,jdbcType=TIMESTAMP},
  177. </if>
  178. <if test="record.remark != null" >
  179. remark = #{record.remark,jdbcType=VARCHAR},
  180. </if>
  181. </set>
  182. <if test="_parameter != null" >
  183. <include refid="Update_By_Example_Where_Clause" />
  184. </if>
  185. </update>
  186. <update id="updateByExample" parameterType="map" >
  187. update t_send_number
  188. set id = #{record.id,jdbcType=VARCHAR},
  189. org_id = #{record.orgId,jdbcType=VARCHAR},
  190. table_name = #{record.tableName,jdbcType=VARCHAR},
  191. code = #{record.code,jdbcType=VARCHAR},
  192. time = #{record.time,jdbcType=TIMESTAMP},
  193. remark = #{record.remark,jdbcType=VARCHAR}
  194. <if test="_parameter != null" >
  195. <include refid="Update_By_Example_Where_Clause" />
  196. </if>
  197. </update>
  198. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TSendNumber" >
  199. update t_send_number
  200. <set >
  201. <if test="orgId != null" >
  202. org_id = #{orgId,jdbcType=VARCHAR},
  203. </if>
  204. <if test="tableName != null" >
  205. table_name = #{tableName,jdbcType=VARCHAR},
  206. </if>
  207. <if test="code != null" >
  208. code = #{code,jdbcType=VARCHAR},
  209. </if>
  210. <if test="time != null" >
  211. time = #{time,jdbcType=TIMESTAMP},
  212. </if>
  213. <if test="remark != null" >
  214. remark = #{remark,jdbcType=VARCHAR},
  215. </if>
  216. </set>
  217. where id = #{id,jdbcType=VARCHAR}
  218. </update>
  219. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TSendNumber" >
  220. update t_send_number
  221. set org_id = #{orgId,jdbcType=VARCHAR},
  222. table_name = #{tableName,jdbcType=VARCHAR},
  223. code = #{code,jdbcType=VARCHAR},
  224. time = #{time,jdbcType=TIMESTAMP},
  225. remark = #{remark,jdbcType=VARCHAR}
  226. where id = #{id,jdbcType=VARCHAR}
  227. </update>
  228. </mapper>