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

@@ -19,6 +19,7 @@ import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
import com.jsowell.common.enums.AcquirerEnum;
import com.jsowell.common.enums.DelFlagEnum;
import com.jsowell.common.enums.MemberWalletEnum;
import com.jsowell.common.enums.adapay.AdapayStatusEnum;
import com.jsowell.common.enums.adapay.MerchantDelayModeEnum;
import com.jsowell.common.enums.ykc.*;
import com.jsowell.common.exception.BusinessException;
@@ -716,6 +717,14 @@ public class NotDelayMerchantProgramLogic extends AbstractProgramLogic {
refundInfo.setReverseId(refund.getRefund_id());
refundInfo.setPaymentId(refund.getPayment_id());
refundInfo.setReverseAmt(refund.getRefund_amt());
String transStatus = refund.getTrans_status();
if (StringUtils.equalsIgnoreCase("S", transStatus)) {
refundInfo.setStatus(AdapayStatusEnum.SUCCEEDED.getValue());
} else if (StringUtils.equalsIgnoreCase("F", transStatus)) {
refundInfo.setStatus(AdapayStatusEnum.FAILED.getValue());
} else {
refundInfo.setStatus(AdapayStatusEnum.PENDING.getValue());
}
// LocalDateTime createdTime = DateUtils.timestampToDatetime(Long.parseLong(refund.getCreated_time()));
// refundInfo.setCreatedTime(DateUtils.formatDateTime(createdTime));
// LocalDateTime succeedTime = DateUtils.timestampToDatetime(Long.parseLong(refund.getSucceed_time()));

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>