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,