ApplyPaymentSettleMapper.xml 17 KB

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