TOrderPaymentMapper.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  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.goafanti.common.dao.TOrderPaymentMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderPayment">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="tid" jdbcType="INTEGER" property="tid" />
  12. <result column="node_id" jdbcType="INTEGER" property="nodeId" />
  13. <result column="payment_type" jdbcType="INTEGER" property="paymentType" />
  14. <result column="company_name" jdbcType="VARCHAR" property="companyName" />
  15. <result column="quantity" jdbcType="INTEGER" property="quantity" />
  16. <result column="payment_status" jdbcType="INTEGER" property="paymentStatus" />
  17. <result column="status" jdbcType="INTEGER" property="status" />
  18. <result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
  19. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  20. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  21. <result column="tpc_id" jdbcType="INTEGER" property="tpcId" />
  22. <result column="application_amount" jdbcType="DECIMAL" property="applicationAmount" />
  23. <result column="choose_type" jdbcType="INTEGER" property="chooseType" />
  24. <result column="aid" jdbcType="VARCHAR" property="aid" />
  25. <result column="aname" jdbcType="VARCHAR" property="aname" />
  26. </resultMap>
  27. <sql id="Example_Where_Clause">
  28. <!--
  29. WARNING - @mbg.generated
  30. This element is automatically generated by MyBatis Generator, do not modify.
  31. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  32. -->
  33. <where>
  34. <foreach collection="oredCriteria" item="criteria" separator="or">
  35. <if test="criteria.valid">
  36. <trim prefix="(" prefixOverrides="and" suffix=")">
  37. <foreach collection="criteria.criteria" item="criterion">
  38. <choose>
  39. <when test="criterion.noValue">
  40. and ${criterion.condition}
  41. </when>
  42. <when test="criterion.singleValue">
  43. and ${criterion.condition} #{criterion.value}
  44. </when>
  45. <when test="criterion.betweenValue">
  46. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  47. </when>
  48. <when test="criterion.listValue">
  49. and ${criterion.condition}
  50. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  51. #{listItem}
  52. </foreach>
  53. </when>
  54. </choose>
  55. </foreach>
  56. </trim>
  57. </if>
  58. </foreach>
  59. </where>
  60. </sql>
  61. <sql id="Update_By_Example_Where_Clause">
  62. <!--
  63. WARNING - @mbg.generated
  64. This element is automatically generated by MyBatis Generator, do not modify.
  65. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  66. -->
  67. <where>
  68. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  69. <if test="criteria.valid">
  70. <trim prefix="(" prefixOverrides="and" suffix=")">
  71. <foreach collection="criteria.criteria" item="criterion">
  72. <choose>
  73. <when test="criterion.noValue">
  74. and ${criterion.condition}
  75. </when>
  76. <when test="criterion.singleValue">
  77. and ${criterion.condition} #{criterion.value}
  78. </when>
  79. <when test="criterion.betweenValue">
  80. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  81. </when>
  82. <when test="criterion.listValue">
  83. and ${criterion.condition}
  84. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  85. #{listItem}
  86. </foreach>
  87. </when>
  88. </choose>
  89. </foreach>
  90. </trim>
  91. </if>
  92. </foreach>
  93. </where>
  94. </sql>
  95. <sql id="Base_Column_List">
  96. <!--
  97. WARNING - @mbg.generated
  98. This element is automatically generated by MyBatis Generator, do not modify.
  99. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  100. -->
  101. id, tid, node_id, payment_type, company_name, quantity, payment_status, status, payment_amount,
  102. remarks, create_time, tpc_id, application_amount, choose_type, aid, aname
  103. </sql>
  104. <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample" resultMap="BaseResultMap">
  105. <!--
  106. WARNING - @mbg.generated
  107. This element is automatically generated by MyBatis Generator, do not modify.
  108. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  109. -->
  110. select
  111. <if test="distinct">
  112. distinct
  113. </if>
  114. <include refid="Base_Column_List" />
  115. from t_order_payment
  116. <if test="_parameter != null">
  117. <include refid="Example_Where_Clause" />
  118. </if>
  119. <if test="orderByClause != null">
  120. order by ${orderByClause}
  121. </if>
  122. </select>
  123. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  124. <!--
  125. WARNING - @mbg.generated
  126. This element is automatically generated by MyBatis Generator, do not modify.
  127. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  128. -->
  129. select
  130. <include refid="Base_Column_List" />
  131. from t_order_payment
  132. where id = #{id,jdbcType=INTEGER}
  133. </select>
  134. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  135. <!--
  136. WARNING - @mbg.generated
  137. This element is automatically generated by MyBatis Generator, do not modify.
  138. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  139. -->
  140. delete from t_order_payment
  141. where id = #{id,jdbcType=INTEGER}
  142. </delete>
  143. <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample">
  144. <!--
  145. WARNING - @mbg.generated
  146. This element is automatically generated by MyBatis Generator, do not modify.
  147. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  148. -->
  149. delete from t_order_payment
  150. <if test="_parameter != null">
  151. <include refid="Example_Where_Clause" />
  152. </if>
  153. </delete>
  154. <insert id="insert" parameterType="com.goafanti.common.model.TOrderPayment">
  155. <!--
  156. WARNING - @mbg.generated
  157. This element is automatically generated by MyBatis Generator, do not modify.
  158. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  159. -->
  160. insert into t_order_payment (id, tid, node_id,
  161. payment_type, company_name, quantity,
  162. payment_status, status, payment_amount,
  163. remarks, create_time, tpc_id,
  164. application_amount, choose_type, aid,
  165. aname)
  166. values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{nodeId,jdbcType=INTEGER},
  167. #{paymentType,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{quantity,jdbcType=INTEGER},
  168. #{paymentStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{paymentAmount,jdbcType=DECIMAL},
  169. #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{tpcId,jdbcType=INTEGER},
  170. #{applicationAmount,jdbcType=DECIMAL}, #{chooseType,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
  171. #{aname,jdbcType=VARCHAR})
  172. </insert>
  173. <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderPayment">
  174. <!--
  175. WARNING - @mbg.generated
  176. This element is automatically generated by MyBatis Generator, do not modify.
  177. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  178. -->
  179. insert into t_order_payment
  180. <trim prefix="(" suffix=")" suffixOverrides=",">
  181. <if test="id != null">
  182. id,
  183. </if>
  184. <if test="tid != null">
  185. tid,
  186. </if>
  187. <if test="nodeId != null">
  188. node_id,
  189. </if>
  190. <if test="paymentType != null">
  191. payment_type,
  192. </if>
  193. <if test="companyName != null">
  194. company_name,
  195. </if>
  196. <if test="quantity != null">
  197. quantity,
  198. </if>
  199. <if test="paymentStatus != null">
  200. payment_status,
  201. </if>
  202. <if test="status != null">
  203. status,
  204. </if>
  205. <if test="paymentAmount != null">
  206. payment_amount,
  207. </if>
  208. <if test="remarks != null">
  209. remarks,
  210. </if>
  211. <if test="createTime != null">
  212. create_time,
  213. </if>
  214. <if test="tpcId != null">
  215. tpc_id,
  216. </if>
  217. <if test="applicationAmount != null">
  218. application_amount,
  219. </if>
  220. <if test="chooseType != null">
  221. choose_type,
  222. </if>
  223. <if test="aid != null">
  224. aid,
  225. </if>
  226. <if test="aname != null">
  227. aname,
  228. </if>
  229. </trim>
  230. <trim prefix="values (" suffix=")" suffixOverrides=",">
  231. <if test="id != null">
  232. #{id,jdbcType=INTEGER},
  233. </if>
  234. <if test="tid != null">
  235. #{tid,jdbcType=INTEGER},
  236. </if>
  237. <if test="nodeId != null">
  238. #{nodeId,jdbcType=INTEGER},
  239. </if>
  240. <if test="paymentType != null">
  241. #{paymentType,jdbcType=INTEGER},
  242. </if>
  243. <if test="companyName != null">
  244. #{companyName,jdbcType=VARCHAR},
  245. </if>
  246. <if test="quantity != null">
  247. #{quantity,jdbcType=INTEGER},
  248. </if>
  249. <if test="paymentStatus != null">
  250. #{paymentStatus,jdbcType=INTEGER},
  251. </if>
  252. <if test="status != null">
  253. #{status,jdbcType=INTEGER},
  254. </if>
  255. <if test="paymentAmount != null">
  256. #{paymentAmount,jdbcType=DECIMAL},
  257. </if>
  258. <if test="remarks != null">
  259. #{remarks,jdbcType=VARCHAR},
  260. </if>
  261. <if test="createTime != null">
  262. #{createTime,jdbcType=TIMESTAMP},
  263. </if>
  264. <if test="tpcId != null">
  265. #{tpcId,jdbcType=INTEGER},
  266. </if>
  267. <if test="applicationAmount != null">
  268. #{applicationAmount,jdbcType=DECIMAL},
  269. </if>
  270. <if test="chooseType != null">
  271. #{chooseType,jdbcType=INTEGER},
  272. </if>
  273. <if test="aid != null">
  274. #{aid,jdbcType=VARCHAR},
  275. </if>
  276. <if test="aname != null">
  277. #{aname,jdbcType=VARCHAR},
  278. </if>
  279. </trim>
  280. </insert>
  281. <select id="countByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample" resultType="java.lang.Long">
  282. <!--
  283. WARNING - @mbg.generated
  284. This element is automatically generated by MyBatis Generator, do not modify.
  285. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  286. -->
  287. select count(*) from t_order_payment
  288. <if test="_parameter != null">
  289. <include refid="Example_Where_Clause" />
  290. </if>
  291. </select>
  292. <update id="updateByExampleSelective" parameterType="map">
  293. <!--
  294. WARNING - @mbg.generated
  295. This element is automatically generated by MyBatis Generator, do not modify.
  296. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  297. -->
  298. update t_order_payment
  299. <set>
  300. <if test="record.id != null">
  301. id = #{record.id,jdbcType=INTEGER},
  302. </if>
  303. <if test="record.tid != null">
  304. tid = #{record.tid,jdbcType=INTEGER},
  305. </if>
  306. <if test="record.nodeId != null">
  307. node_id = #{record.nodeId,jdbcType=INTEGER},
  308. </if>
  309. <if test="record.paymentType != null">
  310. payment_type = #{record.paymentType,jdbcType=INTEGER},
  311. </if>
  312. <if test="record.companyName != null">
  313. company_name = #{record.companyName,jdbcType=VARCHAR},
  314. </if>
  315. <if test="record.quantity != null">
  316. quantity = #{record.quantity,jdbcType=INTEGER},
  317. </if>
  318. <if test="record.paymentStatus != null">
  319. payment_status = #{record.paymentStatus,jdbcType=INTEGER},
  320. </if>
  321. <if test="record.status != null">
  322. status = #{record.status,jdbcType=INTEGER},
  323. </if>
  324. <if test="record.paymentAmount != null">
  325. payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
  326. </if>
  327. <if test="record.remarks != null">
  328. remarks = #{record.remarks,jdbcType=VARCHAR},
  329. </if>
  330. <if test="record.createTime != null">
  331. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  332. </if>
  333. <if test="record.tpcId != null">
  334. tpc_id = #{record.tpcId,jdbcType=INTEGER},
  335. </if>
  336. <if test="record.applicationAmount != null">
  337. application_amount = #{record.applicationAmount,jdbcType=DECIMAL},
  338. </if>
  339. <if test="record.chooseType != null">
  340. choose_type = #{record.chooseType,jdbcType=INTEGER},
  341. </if>
  342. <if test="record.aid != null">
  343. aid = #{record.aid,jdbcType=VARCHAR},
  344. </if>
  345. <if test="record.aname != null">
  346. aname = #{record.aname,jdbcType=VARCHAR},
  347. </if>
  348. </set>
  349. <if test="_parameter != null">
  350. <include refid="Update_By_Example_Where_Clause" />
  351. </if>
  352. </update>
  353. <update id="updateByExample" parameterType="map">
  354. <!--
  355. WARNING - @mbg.generated
  356. This element is automatically generated by MyBatis Generator, do not modify.
  357. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  358. -->
  359. update t_order_payment
  360. set id = #{record.id,jdbcType=INTEGER},
  361. tid = #{record.tid,jdbcType=INTEGER},
  362. node_id = #{record.nodeId,jdbcType=INTEGER},
  363. payment_type = #{record.paymentType,jdbcType=INTEGER},
  364. company_name = #{record.companyName,jdbcType=VARCHAR},
  365. quantity = #{record.quantity,jdbcType=INTEGER},
  366. payment_status = #{record.paymentStatus,jdbcType=INTEGER},
  367. status = #{record.status,jdbcType=INTEGER},
  368. payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
  369. remarks = #{record.remarks,jdbcType=VARCHAR},
  370. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  371. tpc_id = #{record.tpcId,jdbcType=INTEGER},
  372. application_amount = #{record.applicationAmount,jdbcType=DECIMAL},
  373. choose_type = #{record.chooseType,jdbcType=INTEGER},
  374. aid = #{record.aid,jdbcType=VARCHAR},
  375. aname = #{record.aname,jdbcType=VARCHAR}
  376. <if test="_parameter != null">
  377. <include refid="Update_By_Example_Where_Clause" />
  378. </if>
  379. </update>
  380. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderPayment">
  381. <!--
  382. WARNING - @mbg.generated
  383. This element is automatically generated by MyBatis Generator, do not modify.
  384. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  385. -->
  386. update t_order_payment
  387. <set>
  388. <if test="tid != null">
  389. tid = #{tid,jdbcType=INTEGER},
  390. </if>
  391. <if test="nodeId != null">
  392. node_id = #{nodeId,jdbcType=INTEGER},
  393. </if>
  394. <if test="paymentType != null">
  395. payment_type = #{paymentType,jdbcType=INTEGER},
  396. </if>
  397. <if test="companyName != null">
  398. company_name = #{companyName,jdbcType=VARCHAR},
  399. </if>
  400. <if test="quantity != null">
  401. quantity = #{quantity,jdbcType=INTEGER},
  402. </if>
  403. <if test="paymentStatus != null">
  404. payment_status = #{paymentStatus,jdbcType=INTEGER},
  405. </if>
  406. <if test="status != null">
  407. status = #{status,jdbcType=INTEGER},
  408. </if>
  409. <if test="paymentAmount != null">
  410. payment_amount = #{paymentAmount,jdbcType=DECIMAL},
  411. </if>
  412. <if test="remarks != null">
  413. remarks = #{remarks,jdbcType=VARCHAR},
  414. </if>
  415. <if test="createTime != null">
  416. create_time = #{createTime,jdbcType=TIMESTAMP},
  417. </if>
  418. <if test="tpcId != null">
  419. tpc_id = #{tpcId,jdbcType=INTEGER},
  420. </if>
  421. <if test="applicationAmount != null">
  422. application_amount = #{applicationAmount,jdbcType=DECIMAL},
  423. </if>
  424. <if test="chooseType != null">
  425. choose_type = #{chooseType,jdbcType=INTEGER},
  426. </if>
  427. <if test="aid != null">
  428. aid = #{aid,jdbcType=VARCHAR},
  429. </if>
  430. <if test="aname != null">
  431. aname = #{aname,jdbcType=VARCHAR},
  432. </if>
  433. </set>
  434. where id = #{id,jdbcType=INTEGER}
  435. </update>
  436. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderPayment">
  437. <!--
  438. WARNING - @mbg.generated
  439. This element is automatically generated by MyBatis Generator, do not modify.
  440. This element was generated on Tue Jul 07 11:46:04 CST 2020.
  441. -->
  442. update t_order_payment
  443. set tid = #{tid,jdbcType=INTEGER},
  444. node_id = #{nodeId,jdbcType=INTEGER},
  445. payment_type = #{paymentType,jdbcType=INTEGER},
  446. company_name = #{companyName,jdbcType=VARCHAR},
  447. quantity = #{quantity,jdbcType=INTEGER},
  448. payment_status = #{paymentStatus,jdbcType=INTEGER},
  449. status = #{status,jdbcType=INTEGER},
  450. payment_amount = #{paymentAmount,jdbcType=DECIMAL},
  451. remarks = #{remarks,jdbcType=VARCHAR},
  452. create_time = #{createTime,jdbcType=TIMESTAMP},
  453. tpc_id = #{tpcId,jdbcType=INTEGER},
  454. application_amount = #{applicationAmount,jdbcType=DECIMAL},
  455. choose_type = #{chooseType,jdbcType=INTEGER},
  456. aid = #{aid,jdbcType=VARCHAR},
  457. aname = #{aname,jdbcType=VARCHAR}
  458. where id = #{id,jdbcType=INTEGER}
  459. </update>
  460. <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderPayment" useGeneratedKeys="true">
  461. insert into t_order_payment
  462. <trim prefix="(" suffix=")" suffixOverrides=",">
  463. <if test="id != null">
  464. id,
  465. </if>
  466. <if test="tid != null">
  467. tid,
  468. </if>
  469. <if test="nodeId != null">
  470. node_id,
  471. </if>
  472. <if test="paymentType != null">
  473. payment_type,
  474. </if>
  475. <if test="companyName != null">
  476. company_name,
  477. </if>
  478. <if test="quantity != null">
  479. quantity,
  480. </if>
  481. <if test="paymentStatus != null">
  482. payment_status,
  483. </if>
  484. <if test="status != null">
  485. status,
  486. </if>
  487. <if test="paymentAmount != null">
  488. payment_amount,
  489. </if>
  490. <if test="remarks != null">
  491. remarks,
  492. </if>
  493. <if test="createTime != null">
  494. create_time,
  495. </if>
  496. <if test="tpcId != null">
  497. tpc_id,
  498. </if>
  499. <if test="applicationAmount != null">
  500. application_amount,
  501. </if>
  502. <if test="chooseType != null">
  503. choose_type,
  504. </if>
  505. <if test="aid != null">
  506. aid,
  507. </if>
  508. <if test="aname != null">
  509. aname,
  510. </if>
  511. </trim>
  512. <trim prefix="values (" suffix=")" suffixOverrides=",">
  513. <if test="id != null">
  514. #{id,jdbcType=INTEGER},
  515. </if>
  516. <if test="tid != null">
  517. #{tid,jdbcType=INTEGER},
  518. </if>
  519. <if test="nodeId != null">
  520. #{nodeId,jdbcType=INTEGER},
  521. </if>
  522. <if test="paymentType != null">
  523. #{paymentType,jdbcType=INTEGER},
  524. </if>
  525. <if test="companyName != null">
  526. #{companyName,jdbcType=VARCHAR},
  527. </if>
  528. <if test="quantity != null">
  529. #{quantity,jdbcType=INTEGER},
  530. </if>
  531. <if test="paymentStatus != null">
  532. #{paymentStatus,jdbcType=INTEGER},
  533. </if>
  534. <if test="status != null">
  535. #{status,jdbcType=INTEGER},
  536. </if>
  537. <if test="paymentAmount != null">
  538. #{paymentAmount,jdbcType=DECIMAL},
  539. </if>
  540. <if test="remarks != null">
  541. #{remarks,jdbcType=VARCHAR},
  542. </if>
  543. <if test="createTime != null">
  544. #{createTime,jdbcType=TIMESTAMP},
  545. </if>
  546. <if test="tpcId != null">
  547. #{tpcId,jdbcType=INTEGER},
  548. </if>
  549. <if test="applicationAmount != null">
  550. #{applicationAmount,jdbcType=DECIMAL},
  551. </if>
  552. <if test="chooseType != null">
  553. #{chooseType,jdbcType=INTEGER},
  554. </if>
  555. <if test="aid != null">
  556. #{aid,jdbcType=VARCHAR},
  557. </if>
  558. <if test="aname != null">
  559. #{aname,jdbcType=VARCHAR},
  560. </if>
  561. </trim>
  562. <selectKey keyProperty="id" order="AFTER" resultType="int">
  563. SELECT LAST_INSERT_ID()
  564. </selectKey>
  565. </insert>
  566. <select id="selectByidGetDetails" resultType="com.goafanti.organization.bo.outOrderPayment">
  567. select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
  568. a.payment_status paymentStatus,a.status,a.payment_amount paymentAmount,a.remarks ,
  569. d.finance_name financeName ,c.order_no orderNo,a.application_amount applicationAmount
  570. from t_order_payment a
  571. left join t_order_task c on a.tid=c.id left join t_order_mid d on c.order_no=d.order_no where a.id= #{id}
  572. </select>
  573. <select id="selectByTid" resultType="com.goafanti.organization.bo.outOrderPayment">
  574. select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,choose_type chooseType,tpc.id tpcId,
  575. a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks ,tpc.company_name tpcName,d.finance_name financeName ,
  576. c.order_no orderNo,date_format(a.create_time,'%Y-%m-%d %H:%i:%s')createTimes,a.application_amount applicationAmount
  577. from t_order_payment a left join t_order_task c on a.tid=c.id left join t_order_mid d on c.order_no=d.order_no
  578. left join third_party_company tpc on tpc.id=a.tpc_id where a.tid= #{id}
  579. </select>
  580. <select id="selectList" resultType="com.goafanti.organization.bo.outOrderPayment">
  581. select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
  582. a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks , b.quantity NodeQuantity,
  583. b.party_amount NodePartyAmount,b.total_amount NodeTotalAmount,d.finance_name financeName ,c.order_no orderNo
  584. ,a.application_amount applicationAmount
  585. from t_order_payment a left join payment_node b on a.node_id=b.id
  586. left join t_order_task c on b.tid=c.id left join t_order_mid d on c.order_no=d.order_no where a.status !=4
  587. <if test="tpcId != null">
  588. and a.tpc_id= #{tpcId}
  589. </if>
  590. <if test="nodeId != null">
  591. and a.node_id= #{nodeId}
  592. </if>
  593. <if test="chooseType != null">
  594. and a.choose_type= #{chooseType}
  595. </if>
  596. </select>
  597. <update id="updateByids">
  598. update t_order_payment set status=3
  599. where id in
  600. <foreach item="item" collection="list" separator="," open="(" close=")" index="">
  601. #{item}
  602. </foreach>
  603. </update>
  604. </mapper>