xiexiaoyuan 3 лет назад
Родитель
Сommit
19ae9e7fca
2 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      services/report/report.go
  2. 2 2
      services/report/report_chapter.go

+ 2 - 2
services/report/report.go

@@ -360,7 +360,7 @@ func GetReportDetail(userinfo user.UserInfo, reportId int) (reportDetail respons
 		return
 	}
 	// 已购或者试用用户可见
-	if strings.Contains("永续,正式,试用", companyProduct.Status) {
+	if strings.Contains("永续,正式", companyProduct.Status) || (companyProduct.Status == "试用" && companyProduct.IsSuspend != 1) {
 		productAuthOk = true
 	}
 	reportInfo, err := report.GetByReportId(reportId)
@@ -474,7 +474,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 		return
 	}
 	// 已购或者试用用户可见
-	if strings.Contains("永续,正式,试用", companyProduct.Status) {
+	if strings.Contains("永续,正式", companyProduct.Status) || (companyProduct.Status == "试用" && companyProduct.IsSuspend != 1) {
 		productAuthOk = true
 	}
 

+ 2 - 2
services/report/report_chapter.go

@@ -163,8 +163,8 @@ func GetChapterDetail(user user.UserInfo, reportChapterId int) (reportChapterDet
 		err = errors.New("查询用户购买产品出错")
 		return
 	}
-	// 已购或者试用用户可见
-	if strings.Contains("永续,正式,试用", companyProduct.Status) {
+	// 已购或者正常试用用户可见
+	if strings.Contains("永续,正式", companyProduct.Status) || (companyProduct.Status == "试用" && companyProduct.IsSuspend != 1) {
 		productAuthOk = true
 	}