This commit is contained in:
jsowell
2026-05-27 17:13:13 +08:00
parent c0e86cd820
commit 1c66194063
5 changed files with 860 additions and 124 deletions

View File

@@ -750,13 +750,13 @@
pay_amount as payAmount,
settle_amount as settleAmount,
confirmed_split_amount as confirmedSplitAmount,
GREATEST(0, settle_amount - confirmed_split_amount - payment_revoke_amount) AS waitSplitAmount,
GREATEST(0, IFNULL(pay_amount, 0) - IFNULL(due_refund_amount, 0) - IFNULL(confirmed_split_amount, 0)) AS waitSplitAmount,
due_refund_amount as refundAmount,
refund_amount as paidAmount,
GREATEST(0, due_refund_amount - refund_amount) AS refundPayAmount
GREATEST(0, IFNULL(due_refund_amount, 0) - IFNULL(refund_amount, 0)) AS refundPayAmount
FROM adapay_unsplit_record
WHERE
(settle_amount > confirmed_split_amount - payment_revoke_amount)
OR (due_refund_amount > refund_amount)
(IFNULL(pay_amount, 0) - IFNULL(due_refund_amount, 0) > IFNULL(confirmed_split_amount, 0))
OR (IFNULL(due_refund_amount, 0) > IFNULL(refund_amount, 0))
</select>
</mapper>
</mapper>