From 5af707003f4c7b26f09a554a4d3c75c1c6769ab2 Mon Sep 17 00:00:00 2001 From: Administrator <1101184511@qq.com> Date: 星期五, 25 四月 2025 00:11:10 +0800 Subject: [PATCH] 后台管理页面完成 --- src/main/java/com/taoke/autopay/manager/UserCreditExchangeManager.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/taoke/autopay/manager/UserCreditExchangeManager.java b/src/main/java/com/taoke/autopay/manager/UserCreditExchangeManager.java index 293d64d..a4580d3 100644 --- a/src/main/java/com/taoke/autopay/manager/UserCreditExchangeManager.java +++ b/src/main/java/com/taoke/autopay/manager/UserCreditExchangeManager.java @@ -1,10 +1,12 @@ package com.taoke.autopay.manager; +import com.alipay.api.AlipayApiException; import com.taoke.autopay.dao.credit.CreditExchangeRecordMapper; import com.taoke.autopay.dao.credit.ExchangeRateMapper; import com.taoke.autopay.entity.credit.*; import com.taoke.autopay.exception.UserCreditExchangeException; import com.taoke.autopay.service.credit.*; +import com.taoke.autopay.utils.AlipayUtil; import com.taoke.autopay.utils.TimeUtil; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -123,7 +125,13 @@ // 濡傛灉鏄孩鍖呭厬鎹紝璋冪敤閫氳繃鍏戞崲閫昏緫锛圱ODO锛� if (exchangeRecord.getExchangeType() == CreditExchangeRecord.ExchangeType.FUND_EXCHANGE) { - // TODO: 璋冪敤閫氳繃鍏戞崲閫昏緫 + try { + AlipayUtil.transfer("credit_exchange_"+exchangeRecordId, exchangeRecord.getExchangeInfo2(), exchangeRecord.getExchangeInfo1(), exchangeRecord.getExchangeValue(), "绾㈠寘鍏戞崲", "绾㈠寘鍏戞崲"); + } catch (AlipayApiException e) { + throw new UserCreditExchangeException(UserCreditExchangeException.CODE_ALIPAY_TRANSFER_FAILED, e.getErrCode()+ ":"+ e.getErrMsg()); + } catch (AlipayUtil.AlipayTransferException e) { + throw new UserCreditExchangeException(UserCreditExchangeException.CODE_ALIPAY_TRANSFER_FAILED, e.getMessage()); + } } // 鏀瑰彉鍏戞崲璁板綍鐘舵�� -- Gitblit v1.8.0