From d634ca7d2232c23b89f7bc0108797c97f005d06e Mon Sep 17 00:00:00 2001 From: wolter Date: Wed, 25 Dec 2024 14:36:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20v2=E9=A2=84=E6=94=AF=E4=BB=98fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/constants/errorcode/error_code.go | 9 ++++++--- app/services/thirdpay/pay_page.go | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/constants/errorcode/error_code.go b/app/constants/errorcode/error_code.go index da9a602..30b6cc8 100644 --- a/app/constants/errorcode/error_code.go +++ b/app/constants/errorcode/error_code.go @@ -79,6 +79,8 @@ const ( OrderRefundAmountError = 1414 OrderPayChannelChange = 1415 OrderPayRequestLogNotExist = 1416 + + OrderPayRequestAcquireLock = 1430 // 关闭订单 CloseOrderPayed = 1420 @@ -188,9 +190,10 @@ var MsgZH = map[int]string{ ThirdRefundFail: "第三方退款失败", - WechatAuthFail: "微信授权失败", - WechatAuthSignFail: "微信签名失败", - ClientEnvErr: "支付环境错误", + WechatAuthFail: "微信授权失败", + WechatAuthSignFail: "微信签名失败", + ClientEnvErr: "支付环境错误", + OrderPayRequestAcquireLock: "系统繁忙,请稍后再试", } var MsgMap map[string]map[int]string = map[string]map[int]string{"en": MsgZH} diff --git a/app/services/thirdpay/pay_page.go b/app/services/thirdpay/pay_page.go index c8b4159..9fd83fc 100644 --- a/app/services/thirdpay/pay_page.go +++ b/app/services/thirdpay/pay_page.go @@ -181,6 +181,9 @@ func (this *payUrl) PayUrlV2Service() (result front.PayReqsV2Response, code int) } else { if err != nil { utils.Log(nil, "", "PayUrlV2Service,获取分布式锁失败", fmt.Sprintf("错误原因:%s", err.Error())) + code = errorcode.SystemError + } else { + code = errorcode.OrderPayRequestAcquireLock } return }