TemporaryReceivablesMapper.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  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.TemporaryReceivablesMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TemporaryReceivables">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  12. <result column="corporate_name" jdbcType="VARCHAR" property="corporateName" />
  13. <result column="amount" jdbcType="DECIMAL" property="amount" />
  14. <result column="receivables_time" jdbcType="TIMESTAMP" property="receivablesTime" />
  15. <result column="aid" jdbcType="VARCHAR" property="aid" />
  16. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  17. <result column="status" jdbcType="INTEGER" property="status" />
  18. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  19. <result column="financial_pay_no" jdbcType="VARCHAR" property="financialPayNo" />
  20. </resultMap>
  21. <sql id="Example_Where_Clause">
  22. <!--
  23. WARNING - @mbg.generated
  24. This element is automatically generated by MyBatis Generator, do not modify.
  25. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  26. -->
  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. <!--
  57. WARNING - @mbg.generated
  58. This element is automatically generated by MyBatis Generator, do not modify.
  59. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  60. -->
  61. <where>
  62. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  63. <if test="criteria.valid">
  64. <trim prefix="(" prefixOverrides="and" suffix=")">
  65. <foreach collection="criteria.criteria" item="criterion">
  66. <choose>
  67. <when test="criterion.noValue">
  68. and ${criterion.condition}
  69. </when>
  70. <when test="criterion.singleValue">
  71. and ${criterion.condition} #{criterion.value}
  72. </when>
  73. <when test="criterion.betweenValue">
  74. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  75. </when>
  76. <when test="criterion.listValue">
  77. and ${criterion.condition}
  78. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  79. #{listItem}
  80. </foreach>
  81. </when>
  82. </choose>
  83. </foreach>
  84. </trim>
  85. </if>
  86. </foreach>
  87. </where>
  88. </sql>
  89. <sql id="Base_Column_List">
  90. <!--
  91. WARNING - @mbg.generated
  92. This element is automatically generated by MyBatis Generator, do not modify.
  93. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  94. -->
  95. id, order_no, corporate_name, amount, receivables_time, aid, remarks, status, create_time,
  96. financial_pay_no
  97. </sql>
  98. <select id="selectByExample" parameterType="com.goafanti.common.model.TemporaryReceivablesExample" resultMap="BaseResultMap">
  99. <!--
  100. WARNING - @mbg.generated
  101. This element is automatically generated by MyBatis Generator, do not modify.
  102. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  103. -->
  104. select
  105. <if test="distinct">
  106. distinct
  107. </if>
  108. <include refid="Base_Column_List" />
  109. from temporary_receivables
  110. <if test="_parameter != null">
  111. <include refid="Example_Where_Clause" />
  112. </if>
  113. <if test="orderByClause != null">
  114. order by ${orderByClause}
  115. </if>
  116. </select>
  117. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  118. <!--
  119. WARNING - @mbg.generated
  120. This element is automatically generated by MyBatis Generator, do not modify.
  121. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  122. -->
  123. select
  124. <include refid="Base_Column_List" />
  125. from temporary_receivables
  126. where id = #{id,jdbcType=INTEGER}
  127. </select>
  128. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  129. <!--
  130. WARNING - @mbg.generated
  131. This element is automatically generated by MyBatis Generator, do not modify.
  132. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  133. -->
  134. delete from temporary_receivables
  135. where id = #{id,jdbcType=INTEGER}
  136. </delete>
  137. <delete id="deleteByExample" parameterType="com.goafanti.common.model.TemporaryReceivablesExample">
  138. <!--
  139. WARNING - @mbg.generated
  140. This element is automatically generated by MyBatis Generator, do not modify.
  141. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  142. -->
  143. delete from temporary_receivables
  144. <if test="_parameter != null">
  145. <include refid="Example_Where_Clause" />
  146. </if>
  147. </delete>
  148. <insert id="insert" parameterType="com.goafanti.common.model.TemporaryReceivables">
  149. <!--
  150. WARNING - @mbg.generated
  151. This element is automatically generated by MyBatis Generator, do not modify.
  152. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  153. -->
  154. insert into temporary_receivables (id, order_no, corporate_name,
  155. amount, receivables_time, aid,
  156. remarks, status, create_time,
  157. financial_pay_no)
  158. values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{corporateName,jdbcType=VARCHAR},
  159. #{amount,jdbcType=DECIMAL}, #{receivablesTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR},
  160. #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  161. #{financialPayNo,jdbcType=VARCHAR})
  162. </insert>
  163. <insert id="insertSelective" parameterType="com.goafanti.common.model.TemporaryReceivables">
  164. <!--
  165. WARNING - @mbg.generated
  166. This element is automatically generated by MyBatis Generator, do not modify.
  167. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  168. -->
  169. insert into temporary_receivables
  170. <trim prefix="(" suffix=")" suffixOverrides=",">
  171. <if test="id != null">
  172. id,
  173. </if>
  174. <if test="orderNo != null">
  175. order_no,
  176. </if>
  177. <if test="corporateName != null">
  178. corporate_name,
  179. </if>
  180. <if test="amount != null">
  181. amount,
  182. </if>
  183. <if test="receivablesTime != null">
  184. receivables_time,
  185. </if>
  186. <if test="aid != null">
  187. aid,
  188. </if>
  189. <if test="remarks != null">
  190. remarks,
  191. </if>
  192. <if test="status != null">
  193. status,
  194. </if>
  195. <if test="createTime != null">
  196. create_time,
  197. </if>
  198. <if test="financialPayNo != null">
  199. financial_pay_no,
  200. </if>
  201. </trim>
  202. <trim prefix="values (" suffix=")" suffixOverrides=",">
  203. <if test="id != null">
  204. #{id,jdbcType=INTEGER},
  205. </if>
  206. <if test="orderNo != null">
  207. #{orderNo,jdbcType=VARCHAR},
  208. </if>
  209. <if test="corporateName != null">
  210. #{corporateName,jdbcType=VARCHAR},
  211. </if>
  212. <if test="amount != null">
  213. #{amount,jdbcType=DECIMAL},
  214. </if>
  215. <if test="receivablesTime != null">
  216. #{receivablesTime,jdbcType=TIMESTAMP},
  217. </if>
  218. <if test="aid != null">
  219. #{aid,jdbcType=VARCHAR},
  220. </if>
  221. <if test="remarks != null">
  222. #{remarks,jdbcType=VARCHAR},
  223. </if>
  224. <if test="status != null">
  225. #{status,jdbcType=INTEGER},
  226. </if>
  227. <if test="createTime != null">
  228. #{createTime,jdbcType=TIMESTAMP},
  229. </if>
  230. <if test="financialPayNo != null">
  231. #{financialPayNo,jdbcType=VARCHAR},
  232. </if>
  233. </trim>
  234. </insert>
  235. <select id="countByExample" parameterType="com.goafanti.common.model.TemporaryReceivablesExample" resultType="java.lang.Long">
  236. <!--
  237. WARNING - @mbg.generated
  238. This element is automatically generated by MyBatis Generator, do not modify.
  239. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  240. -->
  241. select count(*) from temporary_receivables
  242. <if test="_parameter != null">
  243. <include refid="Example_Where_Clause" />
  244. </if>
  245. </select>
  246. <update id="updateByExampleSelective" parameterType="map">
  247. <!--
  248. WARNING - @mbg.generated
  249. This element is automatically generated by MyBatis Generator, do not modify.
  250. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  251. -->
  252. update temporary_receivables
  253. <set>
  254. <if test="record.id != null">
  255. id = #{record.id,jdbcType=INTEGER},
  256. </if>
  257. <if test="record.orderNo != null">
  258. order_no = #{record.orderNo,jdbcType=VARCHAR},
  259. </if>
  260. <if test="record.corporateName != null">
  261. corporate_name = #{record.corporateName,jdbcType=VARCHAR},
  262. </if>
  263. <if test="record.amount != null">
  264. amount = #{record.amount,jdbcType=DECIMAL},
  265. </if>
  266. <if test="record.receivablesTime != null">
  267. receivables_time = #{record.receivablesTime,jdbcType=TIMESTAMP},
  268. </if>
  269. <if test="record.aid != null">
  270. aid = #{record.aid,jdbcType=VARCHAR},
  271. </if>
  272. <if test="record.remarks != null">
  273. remarks = #{record.remarks,jdbcType=VARCHAR},
  274. </if>
  275. <if test="record.status != null">
  276. status = #{record.status,jdbcType=INTEGER},
  277. </if>
  278. <if test="record.createTime != null">
  279. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  280. </if>
  281. <if test="record.financialPayNo != null">
  282. financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR},
  283. </if>
  284. </set>
  285. <if test="_parameter != null">
  286. <include refid="Update_By_Example_Where_Clause" />
  287. </if>
  288. </update>
  289. <update id="updateByExample" parameterType="map">
  290. <!--
  291. WARNING - @mbg.generated
  292. This element is automatically generated by MyBatis Generator, do not modify.
  293. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  294. -->
  295. update temporary_receivables
  296. set id = #{record.id,jdbcType=INTEGER},
  297. order_no = #{record.orderNo,jdbcType=VARCHAR},
  298. corporate_name = #{record.corporateName,jdbcType=VARCHAR},
  299. amount = #{record.amount,jdbcType=DECIMAL},
  300. receivables_time = #{record.receivablesTime,jdbcType=TIMESTAMP},
  301. aid = #{record.aid,jdbcType=VARCHAR},
  302. remarks = #{record.remarks,jdbcType=VARCHAR},
  303. status = #{record.status,jdbcType=INTEGER},
  304. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  305. financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR}
  306. <if test="_parameter != null">
  307. <include refid="Update_By_Example_Where_Clause" />
  308. </if>
  309. </update>
  310. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TemporaryReceivables">
  311. <!--
  312. WARNING - @mbg.generated
  313. This element is automatically generated by MyBatis Generator, do not modify.
  314. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  315. -->
  316. update temporary_receivables
  317. <set>
  318. <if test="orderNo != null">
  319. order_no = #{orderNo,jdbcType=VARCHAR},
  320. </if>
  321. <if test="corporateName != null">
  322. corporate_name = #{corporateName,jdbcType=VARCHAR},
  323. </if>
  324. <if test="amount != null">
  325. amount = #{amount,jdbcType=DECIMAL},
  326. </if>
  327. <if test="receivablesTime != null">
  328. receivables_time = #{receivablesTime,jdbcType=TIMESTAMP},
  329. </if>
  330. <if test="aid != null">
  331. aid = #{aid,jdbcType=VARCHAR},
  332. </if>
  333. <if test="remarks != null">
  334. remarks = #{remarks,jdbcType=VARCHAR},
  335. </if>
  336. <if test="status != null">
  337. status = #{status,jdbcType=INTEGER},
  338. </if>
  339. <if test="createTime != null">
  340. create_time = #{createTime,jdbcType=TIMESTAMP},
  341. </if>
  342. <if test="financialPayNo != null">
  343. financial_pay_no = #{financialPayNo,jdbcType=VARCHAR},
  344. </if>
  345. </set>
  346. where id = #{id,jdbcType=INTEGER}
  347. </update>
  348. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TemporaryReceivables">
  349. <!--
  350. WARNING - @mbg.generated
  351. This element is automatically generated by MyBatis Generator, do not modify.
  352. This element was generated on Mon Oct 14 11:33:48 CST 2019.
  353. -->
  354. update temporary_receivables
  355. set order_no = #{orderNo,jdbcType=VARCHAR},
  356. corporate_name = #{corporateName,jdbcType=VARCHAR},
  357. amount = #{amount,jdbcType=DECIMAL},
  358. receivables_time = #{receivablesTime,jdbcType=TIMESTAMP},
  359. aid = #{aid,jdbcType=VARCHAR},
  360. remarks = #{remarks,jdbcType=VARCHAR},
  361. status = #{status,jdbcType=INTEGER},
  362. create_time = #{createTime,jdbcType=TIMESTAMP},
  363. financial_pay_no = #{financialPayNo,jdbcType=VARCHAR}
  364. where id = #{id,jdbcType=INTEGER}
  365. </update>
  366. <delete id="deleteByids" parameterType="java.util.List">
  367. delete from temporary_receivables
  368. where id in
  369. <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
  370. #{item}
  371. </foreach>
  372. </delete>
  373. <delete id="deleteByaid" parameterType="java.lang.String">
  374. delete from temporary_receivables
  375. where aid = #{aid}
  376. </delete>
  377. <delete id="deleteNormalByaid">
  378. delete from temporary_receivables
  379. where aid = #{aid} and status !=2
  380. </delete>
  381. <select id="selectByaid" resultMap="BaseResultMap">
  382. select
  383. <include refid="Base_Column_List" />
  384. from temporary_receivables
  385. where aid = #{aid,jdbcType=INTEGER}
  386. </select>
  387. <select id="selectReceivablesList" parameterType="java.lang.String" resultType="com.goafanti.order.bo.ReceivablesListBo">
  388. select a.id,a.order_no orderNo,b.contract_no contractNo,a.corporate_name corporateName,c.nickname,b.total_amount totalAmount,d.name depName,a.status ,b.settlement_amount settlementAmount,
  389. a.financial_pay_no financialPayNo,a.amount,date_format(a.receivables_time, '%Y-%m-%d')receivablesTimes,date_format(a.create_time, '%Y-%m-%d %H:%i:%S')createTimes,a.remarks
  390. from temporary_receivables a left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join department d on b.order_dep=d.id
  391. left join admin e on b.salesman_id=e.id
  392. where 1=1
  393. <if test="aid != null">
  394. and a.aid= #{aid}
  395. </if>
  396. <if test="contractNo != null">
  397. b.contract_no like concat('%',#{contractNo},'%')
  398. </if>
  399. <if test="orderNo != null">
  400. and a.order_no = #{orderNo}
  401. </if>
  402. <if test="adminName != null">
  403. and e.name like concat('%',#{adminName},'%')
  404. </if>
  405. <if test="nickname != null">
  406. and c.nickname like concat('%',#{nickname},'%')
  407. </if>
  408. <if test="corporateName != null">
  409. and a.corporate_name like concat('%',#{corporateName},'%')
  410. </if>
  411. <if test="orderDepId != null">
  412. and b.order_dep= #{orderDepId}
  413. </if>
  414. <if test="adminDepId != null">
  415. and e.department_id= #{adminDepId}
  416. </if>
  417. <if test="status != null">
  418. and a.status= #{status}
  419. </if>
  420. order by a.status desc,b.contract_no,a.create_time desc
  421. <if test="page_sql!=null">
  422. ${page_sql}
  423. </if>
  424. </select>
  425. <select id="selectReceivablesCount" resultType="java.lang.Integer">
  426. select count(*) from temporary_receivables a left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join department d on b.order_dep=d.id
  427. left join admin e on b.salesman_id=e.id
  428. where 1=1
  429. <if test="aid != null">
  430. and a.aid= #{aid}
  431. </if>
  432. <if test="contractNo != null">
  433. b.contract_no like concat('%',#{contractNo},'%')
  434. </if>
  435. <if test="orderNo != null">
  436. and a.order_no = #{orderNo}
  437. </if>
  438. <if test="adminName != null">
  439. and e.name like concat('%',#{adminName},'%')
  440. </if>
  441. <if test="nickname != null">
  442. and c.nickname like concat('%',#{nickname},'%')
  443. </if>
  444. <if test="corporateName != null">
  445. and a.corporate_name like concat('%',#{corporateName},'%')
  446. </if>
  447. <if test="orderDepId != null">
  448. and b.order_dep= #{orderDepId}
  449. </if>
  450. <if test="adminDepId != null">
  451. and e.department_id= #{adminDepId}
  452. </if>
  453. <if test="status != null">
  454. and a.status= #{status}
  455. </if>
  456. </select>
  457. <select id="getCountlistReceivablesAmount" parameterType="Map" resultType="java.lang.Integer">
  458. select ifnull(sum(a.amount),0) amount from temporary_receivables a left join t_order_new b on a.order_no=b.order_no
  459. left join user c on b.buyer_id=c.id left join department d on b.order_dep=d.id left join admin e on b.salesman_id=e.id
  460. where 1=1
  461. <if test="aid != null">
  462. and a.aid= #{aid}
  463. </if>
  464. <if test="contractNo != null">
  465. and b.contract_no like concat('%',#{contractNo},'%')
  466. </if>
  467. <if test="orderNo != null">
  468. and a.order_no = #{orderNo}
  469. </if>
  470. <if test="adminName != null">
  471. and b.salesman_id like concat('%',#{adminName},'%')
  472. </if>
  473. <if test="nickname != null">
  474. and c.nickname like concat('%',#{nickname},'%')
  475. </if>
  476. <if test="corporateName != null">
  477. and a.corporate_name like concat('%',#{corporateName},'%')
  478. </if>
  479. <if test="orderDepId != null">
  480. and b.order_dep= #{orderDepId}
  481. </if>
  482. <if test="adminDepId != null">
  483. and e.department_id= #{adminDepId}
  484. </if>
  485. <if test="status != null">
  486. and a.status= #{status}
  487. </if>
  488. </select>
  489. <select id="getCountlistReceivablesTotalAmount" parameterType="Map" resultType="java.lang.Integer">
  490. select ifnull(sum(x.total_amount),0) from (select b.order_no,b.total_amount from temporary_receivables a
  491. left join t_order_new b on a.order_no=b.order_no left join user c on b.buyer_id=c.id left join department d on b.order_dep=d.id
  492. left join admin e on b.salesman_id=e.id
  493. where 1=1
  494. <if test="aid != null">
  495. and a.aid= #{aid}
  496. </if>
  497. <if test="contractNo != null">
  498. and b.contract_no like concat('%',#{contractNo},'%')
  499. </if>
  500. <if test="orderNo != null">
  501. and a.order_no = #{orderNo}
  502. </if>
  503. <if test="adminName != null">
  504. and b.salesman_id like concat('%',#{adminName},'%')
  505. </if>
  506. <if test="nickname != null">
  507. and c.nickname like concat('%',#{nickname},'%')
  508. </if>
  509. <if test="corporateName != null">
  510. and a.corporate_name like concat('%',#{corporateName},'%')
  511. </if>
  512. <if test="orderDepId != null">
  513. and b.order_dep= #{orderDepId}
  514. </if>
  515. <if test="adminDepId != null">
  516. and e.department_id= #{adminDepId}
  517. </if>
  518. <if test="status != null">
  519. and a.status= #{status}
  520. </if>
  521. group by b.order_no)x
  522. </select>
  523. <insert id="insertBatch" parameterType="com.goafanti.common.model.TemporaryReceivables">
  524. insert into temporary_receivables (id, order_no, corporate_name, amount, receivables_time,
  525. aid, remarks, status, create_time, financial_pay_no) values
  526. <foreach item="item" index="index" collection="list" separator=",">
  527. (#{item.id,jdbcType=INTEGER}, #{item.orderNo,jdbcType=VARCHAR}, #{item.corporateName,jdbcType=VARCHAR},
  528. #{item.amount,jdbcType=DECIMAL}, #{item.receivablesTime,jdbcType=TIMESTAMP}, #{item.aid,jdbcType=VARCHAR},
  529. #{item.remarks,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP},
  530. #{item.financialPayNo,jdbcType=VARCHAR})
  531. </foreach>
  532. </insert>
  533. <update id="updateRepeatOrderNo" >
  534. update temporary_receivables x ,(select a.id from temporary_receivables a left join (select * from (select order_no,amount,aid,count(*) counts from temporary_receivables
  535. group by order_no,amount,aid)a where a.counts>1 and a.aid='060583e4-82a2-4f72-8141-ae44806844e7') b on a.order_no=b.order_no
  536. where a.amount=b.amount and a.aid='060583e4-82a2-4f72-8141-ae44806844e7')y set status=1
  537. where x.id=y.id
  538. </update>
  539. </mapper>