From e34331817b032a95c1ff9a6c159a9eb022bdcbe7 Mon Sep 17 00:00:00 2001
From: momo <1012651275@qq.com>
Date: Mon, 30 Oct 2023 17:59:04 +0800
Subject: [PATCH] =?UTF-8?q?fix:=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85--?=
 =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=94=AF=E4=BB=98=E9=A6=96=E6=AC=BE=E6=89=8D?=
 =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=80=92=E8=AE=A1=E6=97=B6=E6=9C=AA=E6=94=AF?=
 =?UTF-8?q?=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 service/repositories/order.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/service/repositories/order.go b/service/repositories/order.go
index 121649cf..653471ba 100644
--- a/service/repositories/order.go
+++ b/service/repositories/order.go
@@ -1754,7 +1754,10 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel
 		orderDetail.OrderAmount.Subtotal = order.GetAmountInfoFormat(&orderAmount.Subtotal, true)
 		orderDetail.OrderAmount.Total = order.GetAmountInfoFormat(&orderAmount.Total, true)
 		orderDetail.PayStatus = constants.OrderPayStatusCode(*orderInfo.PayStatus)
-		orderDetail.PayTimeout = time.Duration(orderInfo.Ctime.Add(30*time.Minute).UTC().Unix() - time.Now().UTC().Unix())
+		if *orderInfo.PayStatus == int64(constants.ORDER_STATUS_UNPAIDDEPOSIT) {
+			orderDetail.PayTimeout = time.Duration(orderInfo.Ctime.Add(30*time.Minute).UTC().Unix() - time.Now().UTC().Unix())
+		}
+
 		orderDetail.OrderInfo = gmodel.OrderInfo{
 			UserId:         *orderInfo.UserId,
 			DeliveryMethod: *orderInfo.DeliveryMethod,