|
@@ -232,6 +232,7 @@ func (this *OrderController) ProductOrderList() {
|
|
|
Status: ProductOrderStatus[orderItem.Status],
|
|
|
RefundStatus: RefundStatusMap[orderItem.RefundStatus],
|
|
|
Remark: orderItem.Remark,
|
|
|
+ ValidDuration: orderItem.ValidDuration,
|
|
|
CreatedTime: orderItem.CreatedTime.Format(time.DateTime),
|
|
|
}
|
|
|
if orderItem.TradeNo != "" {
|
|
@@ -243,18 +244,6 @@ func (this *OrderController) ProductOrderList() {
|
|
|
view.PaymentAmount = fmt.Sprintf("¥%s", tradeOrder.Amount)
|
|
|
}
|
|
|
}
|
|
|
- if orderItem.Status == models.OrderStatusPaid {
|
|
|
- access, accessErr := models.GetAccess(orderItem.ProductId, orderItem.TemplateUserId)
|
|
|
- if accessErr != nil {
|
|
|
- utils.FileLog.Error("获取用户订阅记录失败,templateUserId:" + string(rune(orderItem.TemplateUserId)) + "productId:" + string(rune(orderItem.ProductId)) + ",err:" + accessErr.Error())
|
|
|
- } else {
|
|
|
- if access.ProductType == models.ProductPackage {
|
|
|
- view.ValidDuration = fmt.Sprintf("%s~%s", access.BeginDate.Format(time.DateOnly), access.EndDate.Format(time.DateOnly))
|
|
|
- } else {
|
|
|
- view.ValidDuration = "永久有效"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
if orderItem.Status == models.OrderStatusRefund && orderItem.RefundStatus == models.RefundStatusSuccess {
|
|
|
view.RefundFinishTime = orderItem.RefundFinishTime.Format(time.DateTime)
|
|
|
}
|
|
@@ -509,6 +498,7 @@ func (this *OrderController) ExportProductOrder() {
|
|
|
RefundStatus: RefundStatusMap[orderItem.RefundStatus],
|
|
|
Remark: orderItem.Remark,
|
|
|
CreatedTime: orderItem.CreatedTime.Format(time.DateTime),
|
|
|
+ ValidDuration: orderItem.ValidDuration,
|
|
|
}
|
|
|
if orderItem.TradeNo != "" {
|
|
|
view.PaymentTime = orderItem.PaymentTime.Format(time.DateTime)
|
|
@@ -519,18 +509,18 @@ func (this *OrderController) ExportProductOrder() {
|
|
|
view.PaymentAmount = fmt.Sprintf("¥%s", tradeOrder.Amount)
|
|
|
}
|
|
|
}
|
|
|
- if orderItem.Status == models.OrderStatusPaid {
|
|
|
- access, accessErr := models.GetAccess(orderItem.ProductId, orderItem.TemplateUserId)
|
|
|
- if accessErr != nil {
|
|
|
- utils.FileLog.Error("获取用户订阅记录失败,templateUserId:" + string(rune(orderItem.TemplateUserId)) + "productId:" + string(rune(orderItem.ProductId)) + ",err:" + accessErr.Error())
|
|
|
- } else {
|
|
|
- if access.ProductType == models.ProductPackage {
|
|
|
- view.ValidDuration = fmt.Sprintf("%s~%s", access.BeginDate.Format(time.DateOnly), access.EndDate.Format(time.DateOnly))
|
|
|
- } else {
|
|
|
- view.ValidDuration = "永久有效"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //if orderItem.Status == models.OrderStatusPaid {
|
|
|
+ // access, accessErr := models.GetAccess(orderItem.ProductId, orderItem.TemplateUserId)
|
|
|
+ // if accessErr != nil {
|
|
|
+ // utils.FileLog.Error("获取用户订阅记录失败,templateUserId:" + string(rune(orderItem.TemplateUserId)) + "productId:" + string(rune(orderItem.ProductId)) + ",err:" + accessErr.Error())
|
|
|
+ // } else {
|
|
|
+ // if access.ProductType == models.ProductPackage {
|
|
|
+ // view.ValidDuration = fmt.Sprintf("%s~%s", access.BeginDate.Format(time.DateOnly), access.EndDate.Format(time.DateOnly))
|
|
|
+ // } else {
|
|
|
+ // view.ValidDuration = "永久有效"
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
if orderItem.Status == models.OrderStatusRefund && orderItem.RefundStatus == models.RefundStatusSuccess {
|
|
|
view.RefundFinishTime = orderItem.RefundFinishTime.Format(time.DateTime)
|
|
|
}
|