kobe6258 пре 5 месеци
родитељ
комит
8486ccd62c
1 измењених фајлова са 8 додато и 3 уклоњено
  1. 8 3
      controllers/order.go

+ 8 - 3
controllers/order.go

@@ -379,8 +379,11 @@ func (this *OrderController) TradeOrderList() {
 				PaymentWay:     PaymentWayMap[order.PaymentWay],
 				PaymentAccount: order.PaymentAccount,
 				MerchantID:     order.MerchantId,
-				DealTime:       order.DealTime.Format(time.DateTime),
-				CreatedTime:    order.CreatedTime.Format(time.DateTime),
+
+				CreatedTime: order.CreatedTime.Format(time.DateTime),
+			}
+			if order.PaymentStatus == models.PaymentStatusDone {
+				view.DealTime = order.DealTime.Format(time.DateTime)
 			}
 			if IsRefund {
 				view.PaymentStatus = RefundOrderStatus[order.PaymentStatus]
@@ -659,9 +662,11 @@ func (this *OrderController) ExportTradeOrder() {
 				PaymentWay:     PaymentWayMap[order.PaymentWay],
 				PaymentAccount: order.PaymentAccount,
 				MerchantID:     order.MerchantId,
-				DealTime:       order.DealTime.Format(time.DateTime),
 				CreatedTime:    order.CreatedTime.Format(time.DateTime),
 			}
+			if order.PaymentStatus == models.PaymentStatusDone {
+				view.DealTime = order.DealTime.Format(time.DateTime)
+			}
 			if IsRefund {
 				view.PaymentStatus = RefundOrderStatus[order.PaymentStatus]
 			} else {