IntentionalDepositMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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.idea.customerManagement.mapper.IntentionalDepositMapper">
  4. <resultMap id="BaseResultMap" type="com.idea.customerManagement.model.IntentionalDeposit">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="group_id" jdbcType="VARCHAR" property="groupId" />
  7. <result column="disc_id" jdbcType="VARCHAR" property="discId" />
  8. <result column="customer_management_id" jdbcType="VARCHAR" property="customerManagementId" />
  9. <result column="receivable_money" jdbcType="DECIMAL" property="receivableMoney" />
  10. <result column="received_amount" jdbcType="DECIMAL" property="receivedAmount" />
  11. <result column="payment_method" jdbcType="INTEGER" property="paymentMethod" />
  12. <result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
  13. <result column="collection_time" jdbcType="TIMESTAMP" property="collectionTime" />
  14. <result column="created_id" jdbcType="VARCHAR" property="createdId" />
  15. <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
  16. <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
  17. <result column="updated_id" jdbcType="VARCHAR" property="updatedId" />
  18. </resultMap>
  19. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.idea.customerManagement.model.IntentionalDeposit">
  20. <result column="remark" jdbcType="LONGVARCHAR" property="remark" />
  21. <result column="file_list" jdbcType="LONGVARCHAR" property="fileList" />
  22. </resultMap>
  23. <sql id="Example_Where_Clause">
  24. <where>
  25. <foreach collection="oredCriteria" item="criteria" separator="or">
  26. <if test="criteria.valid">
  27. <trim prefix="(" prefixOverrides="and" suffix=")">
  28. <foreach collection="criteria.criteria" item="criterion">
  29. <choose>
  30. <when test="criterion.noValue">
  31. and ${criterion.condition}
  32. </when>
  33. <when test="criterion.singleValue">
  34. and ${criterion.condition} #{criterion.value}
  35. </when>
  36. <when test="criterion.betweenValue">
  37. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  38. </when>
  39. <when test="criterion.listValue">
  40. and ${criterion.condition}
  41. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  42. #{listItem}
  43. </foreach>
  44. </when>
  45. </choose>
  46. </foreach>
  47. </trim>
  48. </if>
  49. </foreach>
  50. </where>
  51. </sql>
  52. <sql id="Update_By_Example_Where_Clause">
  53. <where>
  54. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  55. <if test="criteria.valid">
  56. <trim prefix="(" prefixOverrides="and" suffix=")">
  57. <foreach collection="criteria.criteria" item="criterion">
  58. <choose>
  59. <when test="criterion.noValue">
  60. and ${criterion.condition}
  61. </when>
  62. <when test="criterion.singleValue">
  63. and ${criterion.condition} #{criterion.value}
  64. </when>
  65. <when test="criterion.betweenValue">
  66. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  67. </when>
  68. <when test="criterion.listValue">
  69. and ${criterion.condition}
  70. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  71. #{listItem}
  72. </foreach>
  73. </when>
  74. </choose>
  75. </foreach>
  76. </trim>
  77. </if>
  78. </foreach>
  79. </where>
  80. </sql>
  81. <sql id="Base_Column_List">
  82. id, group_id, disc_id, customer_management_id, receivable_money, received_amount,
  83. payment_method, serial_number, collection_time, created_id, created_at, updated_at,
  84. updated_id
  85. </sql>
  86. <sql id="Blob_Column_List">
  87. remark, file_list
  88. </sql>
  89. <select id="selectByExampleWithBLOBs" parameterType="com.idea.customerManagement.model.IntentionalDepositExample" resultMap="ResultMapWithBLOBs">
  90. select
  91. <if test="distinct">
  92. distinct
  93. </if>
  94. <include refid="Base_Column_List" />
  95. ,
  96. <include refid="Blob_Column_List" />
  97. from intentional_deposit
  98. <if test="_parameter != null">
  99. <include refid="Example_Where_Clause" />
  100. </if>
  101. <if test="orderByClause != null">
  102. order by ${orderByClause}
  103. </if>
  104. </select>
  105. <select id="selectByExample" parameterType="com.idea.customerManagement.model.IntentionalDepositExample" resultMap="BaseResultMap">
  106. select
  107. <if test="distinct">
  108. distinct
  109. </if>
  110. <include refid="Base_Column_List" />
  111. from intentional_deposit
  112. <if test="_parameter != null">
  113. <include refid="Example_Where_Clause" />
  114. </if>
  115. <if test="orderByClause != null">
  116. order by ${orderByClause}
  117. </if>
  118. </select>
  119. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
  120. select
  121. <include refid="Base_Column_List" />
  122. ,
  123. <include refid="Blob_Column_List" />
  124. from intentional_deposit
  125. where id = #{id,jdbcType=VARCHAR}
  126. </select>
  127. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  128. delete from intentional_deposit
  129. where id = #{id,jdbcType=VARCHAR}
  130. </delete>
  131. <delete id="deleteByExample" parameterType="com.idea.customerManagement.model.IntentionalDepositExample">
  132. delete from intentional_deposit
  133. <if test="_parameter != null">
  134. <include refid="Example_Where_Clause" />
  135. </if>
  136. </delete>
  137. <insert id="insert" parameterType="com.idea.customerManagement.model.IntentionalDeposit">
  138. insert into intentional_deposit (id, group_id, disc_id,
  139. customer_management_id, receivable_money,
  140. received_amount, payment_method, serial_number,
  141. collection_time, created_id, created_at,
  142. updated_at, updated_id, remark,
  143. file_list)
  144. values (#{id,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR}, #{discId,jdbcType=VARCHAR},
  145. #{customerManagementId,jdbcType=VARCHAR}, #{receivableMoney,jdbcType=DECIMAL},
  146. #{receivedAmount,jdbcType=DECIMAL}, #{paymentMethod,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
  147. #{collectionTime,jdbcType=TIMESTAMP}, #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
  148. #{updatedAt,jdbcType=TIMESTAMP}, #{updatedId,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR},
  149. #{fileList,jdbcType=LONGVARCHAR})
  150. </insert>
  151. <insert id="insertSelective" parameterType="com.idea.customerManagement.model.IntentionalDeposit">
  152. insert into intentional_deposit
  153. <trim prefix="(" suffix=")" suffixOverrides=",">
  154. <if test="id != null">
  155. id,
  156. </if>
  157. <if test="groupId != null">
  158. group_id,
  159. </if>
  160. <if test="discId != null">
  161. disc_id,
  162. </if>
  163. <if test="customerManagementId != null">
  164. customer_management_id,
  165. </if>
  166. <if test="receivableMoney != null">
  167. receivable_money,
  168. </if>
  169. <if test="receivedAmount != null">
  170. received_amount,
  171. </if>
  172. <if test="paymentMethod != null">
  173. payment_method,
  174. </if>
  175. <if test="serialNumber != null">
  176. serial_number,
  177. </if>
  178. <if test="collectionTime != null">
  179. collection_time,
  180. </if>
  181. <if test="createdId != null">
  182. created_id,
  183. </if>
  184. <if test="createdAt != null">
  185. created_at,
  186. </if>
  187. <if test="updatedAt != null">
  188. updated_at,
  189. </if>
  190. <if test="updatedId != null">
  191. updated_id,
  192. </if>
  193. <if test="remark != null">
  194. remark,
  195. </if>
  196. <if test="fileList != null">
  197. file_list,
  198. </if>
  199. </trim>
  200. <trim prefix="values (" suffix=")" suffixOverrides=",">
  201. <if test="id != null">
  202. #{id,jdbcType=VARCHAR},
  203. </if>
  204. <if test="groupId != null">
  205. #{groupId,jdbcType=VARCHAR},
  206. </if>
  207. <if test="discId != null">
  208. #{discId,jdbcType=VARCHAR},
  209. </if>
  210. <if test="customerManagementId != null">
  211. #{customerManagementId,jdbcType=VARCHAR},
  212. </if>
  213. <if test="receivableMoney != null">
  214. #{receivableMoney,jdbcType=DECIMAL},
  215. </if>
  216. <if test="receivedAmount != null">
  217. #{receivedAmount,jdbcType=DECIMAL},
  218. </if>
  219. <if test="paymentMethod != null">
  220. #{paymentMethod,jdbcType=INTEGER},
  221. </if>
  222. <if test="serialNumber != null">
  223. #{serialNumber,jdbcType=VARCHAR},
  224. </if>
  225. <if test="collectionTime != null">
  226. #{collectionTime,jdbcType=TIMESTAMP},
  227. </if>
  228. <if test="createdId != null">
  229. #{createdId,jdbcType=VARCHAR},
  230. </if>
  231. <if test="createdAt != null">
  232. #{createdAt,jdbcType=TIMESTAMP},
  233. </if>
  234. <if test="updatedAt != null">
  235. #{updatedAt,jdbcType=TIMESTAMP},
  236. </if>
  237. <if test="updatedId != null">
  238. #{updatedId,jdbcType=VARCHAR},
  239. </if>
  240. <if test="remark != null">
  241. #{remark,jdbcType=LONGVARCHAR},
  242. </if>
  243. <if test="fileList != null">
  244. #{fileList,jdbcType=LONGVARCHAR},
  245. </if>
  246. </trim>
  247. </insert>
  248. <select id="countByExample" parameterType="com.idea.customerManagement.model.IntentionalDepositExample" resultType="java.lang.Long">
  249. select count(*) from intentional_deposit
  250. <if test="_parameter != null">
  251. <include refid="Example_Where_Clause" />
  252. </if>
  253. </select>
  254. <update id="updateByExampleSelective" parameterType="map">
  255. update intentional_deposit
  256. <set>
  257. <if test="record.id != null">
  258. id = #{record.id,jdbcType=VARCHAR},
  259. </if>
  260. <if test="record.groupId != null">
  261. group_id = #{record.groupId,jdbcType=VARCHAR},
  262. </if>
  263. <if test="record.discId != null">
  264. disc_id = #{record.discId,jdbcType=VARCHAR},
  265. </if>
  266. <if test="record.customerManagementId != null">
  267. customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
  268. </if>
  269. <if test="record.receivableMoney != null">
  270. receivable_money = #{record.receivableMoney,jdbcType=DECIMAL},
  271. </if>
  272. <if test="record.receivedAmount != null">
  273. received_amount = #{record.receivedAmount,jdbcType=DECIMAL},
  274. </if>
  275. <if test="record.paymentMethod != null">
  276. payment_method = #{record.paymentMethod,jdbcType=INTEGER},
  277. </if>
  278. <if test="record.serialNumber != null">
  279. serial_number = #{record.serialNumber,jdbcType=VARCHAR},
  280. </if>
  281. <if test="record.collectionTime != null">
  282. collection_time = #{record.collectionTime,jdbcType=TIMESTAMP},
  283. </if>
  284. <if test="record.createdId != null">
  285. created_id = #{record.createdId,jdbcType=VARCHAR},
  286. </if>
  287. <if test="record.createdAt != null">
  288. created_at = #{record.createdAt,jdbcType=TIMESTAMP},
  289. </if>
  290. <if test="record.updatedAt != null">
  291. updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
  292. </if>
  293. <if test="record.updatedId != null">
  294. updated_id = #{record.updatedId,jdbcType=VARCHAR},
  295. </if>
  296. <if test="record.remark != null">
  297. remark = #{record.remark,jdbcType=LONGVARCHAR},
  298. </if>
  299. <if test="record.fileList != null">
  300. file_list = #{record.fileList,jdbcType=LONGVARCHAR},
  301. </if>
  302. </set>
  303. <if test="_parameter != null">
  304. <include refid="Update_By_Example_Where_Clause" />
  305. </if>
  306. </update>
  307. <update id="updateByExampleWithBLOBs" parameterType="map">
  308. update intentional_deposit
  309. set id = #{record.id,jdbcType=VARCHAR},
  310. group_id = #{record.groupId,jdbcType=VARCHAR},
  311. disc_id = #{record.discId,jdbcType=VARCHAR},
  312. customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
  313. receivable_money = #{record.receivableMoney,jdbcType=DECIMAL},
  314. received_amount = #{record.receivedAmount,jdbcType=DECIMAL},
  315. payment_method = #{record.paymentMethod,jdbcType=INTEGER},
  316. serial_number = #{record.serialNumber,jdbcType=VARCHAR},
  317. collection_time = #{record.collectionTime,jdbcType=TIMESTAMP},
  318. created_id = #{record.createdId,jdbcType=VARCHAR},
  319. created_at = #{record.createdAt,jdbcType=TIMESTAMP},
  320. updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
  321. updated_id = #{record.updatedId,jdbcType=VARCHAR},
  322. remark = #{record.remark,jdbcType=LONGVARCHAR},
  323. file_list = #{record.fileList,jdbcType=LONGVARCHAR}
  324. <if test="_parameter != null">
  325. <include refid="Update_By_Example_Where_Clause" />
  326. </if>
  327. </update>
  328. <update id="updateByExample" parameterType="map">
  329. update intentional_deposit
  330. set id = #{record.id,jdbcType=VARCHAR},
  331. group_id = #{record.groupId,jdbcType=VARCHAR},
  332. disc_id = #{record.discId,jdbcType=VARCHAR},
  333. customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
  334. receivable_money = #{record.receivableMoney,jdbcType=DECIMAL},
  335. received_amount = #{record.receivedAmount,jdbcType=DECIMAL},
  336. payment_method = #{record.paymentMethod,jdbcType=INTEGER},
  337. serial_number = #{record.serialNumber,jdbcType=VARCHAR},
  338. collection_time = #{record.collectionTime,jdbcType=TIMESTAMP},
  339. created_id = #{record.createdId,jdbcType=VARCHAR},
  340. created_at = #{record.createdAt,jdbcType=TIMESTAMP},
  341. updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
  342. updated_id = #{record.updatedId,jdbcType=VARCHAR}
  343. <if test="_parameter != null">
  344. <include refid="Update_By_Example_Where_Clause" />
  345. </if>
  346. </update>
  347. <update id="updateByPrimaryKeySelective" parameterType="com.idea.customerManagement.model.IntentionalDeposit">
  348. update intentional_deposit
  349. <set>
  350. <if test="groupId != null">
  351. group_id = #{groupId,jdbcType=VARCHAR},
  352. </if>
  353. <if test="discId != null">
  354. disc_id = #{discId,jdbcType=VARCHAR},
  355. </if>
  356. <if test="customerManagementId != null">
  357. customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
  358. </if>
  359. <if test="receivableMoney != null">
  360. receivable_money = #{receivableMoney,jdbcType=DECIMAL},
  361. </if>
  362. <if test="receivedAmount != null">
  363. received_amount = #{receivedAmount,jdbcType=DECIMAL},
  364. </if>
  365. <if test="paymentMethod != null">
  366. payment_method = #{paymentMethod,jdbcType=INTEGER},
  367. </if>
  368. <if test="serialNumber != null">
  369. serial_number = #{serialNumber,jdbcType=VARCHAR},
  370. </if>
  371. <if test="collectionTime != null">
  372. collection_time = #{collectionTime,jdbcType=TIMESTAMP},
  373. </if>
  374. <if test="createdId != null">
  375. created_id = #{createdId,jdbcType=VARCHAR},
  376. </if>
  377. <if test="createdAt != null">
  378. created_at = #{createdAt,jdbcType=TIMESTAMP},
  379. </if>
  380. <if test="updatedAt != null">
  381. updated_at = #{updatedAt,jdbcType=TIMESTAMP},
  382. </if>
  383. <if test="updatedId != null">
  384. updated_id = #{updatedId,jdbcType=VARCHAR},
  385. </if>
  386. <if test="remark != null">
  387. remark = #{remark,jdbcType=LONGVARCHAR},
  388. </if>
  389. <if test="fileList != null">
  390. file_list = #{fileList,jdbcType=LONGVARCHAR},
  391. </if>
  392. </set>
  393. where id = #{id,jdbcType=VARCHAR}
  394. </update>
  395. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.idea.customerManagement.model.IntentionalDeposit">
  396. update intentional_deposit
  397. set group_id = #{groupId,jdbcType=VARCHAR},
  398. disc_id = #{discId,jdbcType=VARCHAR},
  399. customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
  400. receivable_money = #{receivableMoney,jdbcType=DECIMAL},
  401. received_amount = #{receivedAmount,jdbcType=DECIMAL},
  402. payment_method = #{paymentMethod,jdbcType=INTEGER},
  403. serial_number = #{serialNumber,jdbcType=VARCHAR},
  404. collection_time = #{collectionTime,jdbcType=TIMESTAMP},
  405. created_id = #{createdId,jdbcType=VARCHAR},
  406. created_at = #{createdAt,jdbcType=TIMESTAMP},
  407. updated_at = #{updatedAt,jdbcType=TIMESTAMP},
  408. updated_id = #{updatedId,jdbcType=VARCHAR},
  409. remark = #{remark,jdbcType=LONGVARCHAR},
  410. file_list = #{fileList,jdbcType=LONGVARCHAR}
  411. where id = #{id,jdbcType=VARCHAR}
  412. </update>
  413. <update id="updateByPrimaryKey" parameterType="com.idea.customerManagement.model.IntentionalDeposit">
  414. update intentional_deposit
  415. set group_id = #{groupId,jdbcType=VARCHAR},
  416. disc_id = #{discId,jdbcType=VARCHAR},
  417. customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
  418. receivable_money = #{receivableMoney,jdbcType=DECIMAL},
  419. received_amount = #{receivedAmount,jdbcType=DECIMAL},
  420. payment_method = #{paymentMethod,jdbcType=INTEGER},
  421. serial_number = #{serialNumber,jdbcType=VARCHAR},
  422. collection_time = #{collectionTime,jdbcType=TIMESTAMP},
  423. created_id = #{createdId,jdbcType=VARCHAR},
  424. created_at = #{createdAt,jdbcType=TIMESTAMP},
  425. updated_at = #{updatedAt,jdbcType=TIMESTAMP},
  426. updated_id = #{updatedId,jdbcType=VARCHAR}
  427. where id = #{id,jdbcType=VARCHAR}
  428. </update>
  429. </mapper>