BusinessContractPayReceviceMapper.xml 9.9 KB

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