|
@@ -159,13 +159,6 @@ func GetReportById(reportId int, login bool, userId int) (report *reportService.
|
|
|
return DealReportInfo(&reportInfo, login, userId)
|
|
|
}
|
|
|
|
|
|
-func getETAReportDetail(report *reportService.ReportDTO) (etaReport reportService.ETAReportDTO, err error) {
|
|
|
- return reportService.GetETAReport(report.OrgId)
|
|
|
-}
|
|
|
-
|
|
|
-func getHTReportDetail(report *reportService.ReportDTO) (url string, err error) {
|
|
|
- return reportService.GetHtReport(report.OrgId)
|
|
|
-}
|
|
|
func GetTotalPageCountByPermissionIds(permissionIds []int, isLogin bool, userId int) (total int64, latestId int64, ids map[string][]int, disCardIds []int) {
|
|
|
return getCount(permissionIds, isLogin, userId)
|
|
|
}
|
|
@@ -264,23 +257,26 @@ func DealReportInfo(report *reportService.ReportDTO, isLogin bool, userId int) (
|
|
|
report.IsFree = true
|
|
|
report.IsSubscribe = false
|
|
|
report.IsPackage = false
|
|
|
- //最热最新的时候使用
|
|
|
- report.Show = true
|
|
|
} else {
|
|
|
report.Price = packageList[0].Price
|
|
|
report.IsFree = false
|
|
|
report.IsSubscribe = false
|
|
|
report.IsPackage = true
|
|
|
report.ProductId = packageList[0].Id
|
|
|
- //最热最新的时候使用
|
|
|
- report.Show = packageList[0].SaleStatus == "on_sale"
|
|
|
}
|
|
|
} else {
|
|
|
report.Price = product.Price
|
|
|
report.IsFree = false
|
|
|
report.ProductId = product.Id
|
|
|
report.IsPackage = false
|
|
|
- report.Show = product.SaleStatus == "on_sale"
|
|
|
+ }
|
|
|
+ //最热最新的时候使用
|
|
|
+ productList := append(packageList, product)
|
|
|
+ for _, productItem := range productList {
|
|
|
+ if productItem.SaleStatus == "on_sale" {
|
|
|
+ report.Show = true
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
if isLogin {
|
|
|
var productIds []int
|