From fe15e3e2df43cb12ec2360424fbc21c715ca8de1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 20 Dec 2022 18:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=94=AF=E4=BB=98=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/web/api_paydelivery.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/web/api_paydelivery.go b/modules/web/api_paydelivery.go index 9ca741142..d8088f585 100644 --- a/modules/web/api_paydelivery.go +++ b/modules/web/api_paydelivery.go @@ -11,7 +11,8 @@ import ( ) type PayDeliveryResults struct { - Code int32 `json:"s"` + Code int32 `json:"s"` + State int32 `json:"state"` } //充值发货 @@ -35,7 +36,12 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) { ) defer func() { if payresp.Code != 0 { - c.JSON(http.StatusOK, &PayDeliveryResults{Code: -2}) + if payresp.Code == pb.ErrorCode_PayOrderCompleted { + c.JSON(http.StatusOK, &PayDeliveryResults{Code: 2}) + } else { + c.JSON(http.StatusOK, &PayDeliveryResults{Code: 3, State: 1}) + } + } else { c.JSON(http.StatusOK, &PayDeliveryResults{Code: 1}) }