Bladeren bron

研究员逻辑修改

kobe6258 4 maanden geleden
bovenliggende
commit
7fe93dd939
1 gewijzigde bestanden met toevoegingen van 5 en 4 verwijderingen
  1. 5 4
      controllers/order.go

+ 5 - 4
controllers/order.go

@@ -247,11 +247,12 @@ func (this *OrderController) ProductOrderList() {
 				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())
-				}
-				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 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 {