zhangchuanxing 2 tygodni temu
rodzic
commit
0bfd271226
2 zmienionych plików z 18 dodań i 10 usunięć
  1. 16 10
      controllers/cygx/report_article.go
  2. 2 0
      models/cygx/report_article.go

+ 16 - 10
controllers/cygx/report_article.go

@@ -3868,8 +3868,9 @@ func initart22() {
 	var condition string
 	var pars []interface{}
 
-	condition += ` AND art.is_class = 1 `
-	condition += ` AND art.publish_date >= '2024-01-01'  AND art.file_link = ''    AND publish_status  = 1  `
+	condition += ` 	AND art.publish_date >= '2024-10-01' 
+	AND art.publish_status = 1 
+	AND art.article_type_id = 0  `
 
 	//return
 	condition += `	GROUP BY art.article_id  ORDER BY art.publish_date DESC `
@@ -3934,26 +3935,31 @@ func initart22() {
 
 	cellPd := rowTitle.AddCell()
 	cellPd.Value = "行业"
-	cellA := rowTitle.AddCell()
-	cellA.Value = "系列"
+	//cellA := rowTitle.AddCell()
+	//cellA.Value = "系列"
 	cellB := rowTitle.AddCell()
 	cellB.Value = "发布时间"
 
 	for _, v := range list {
 
-		if v.SubCategoryName != "行业深度" {
-			continue
-		}
+		//if v.SubCategoryName != "行业深度" {
+		//	continue
+		//}
 		row := sheet.AddRow()
 
 		cellADatatitle := row.AddCell()
 		cellADatatitle.Value = v.Title
 
 		cellADataPd := row.AddCell()
-		cellADataPd.Value = v.ChartPermissionName
 
-		cellAData := row.AddCell()
-		cellAData.Value = v.SubCategoryName
+		if v.ChartPermissionName == "" {
+			cellADataPd.Value = v.CategoryName
+		} else {
+			cellADataPd.Value = v.ChartPermissionName
+		}
+
+		//cellAData := row.AddCell()
+		//cellAData.Value = v.SubCategoryName
 
 		cellBData := row.AddCell()
 		cellBData.Value = v.PublishDate

+ 2 - 0
models/cygx/report_article.go

@@ -51,6 +51,7 @@ type CygxReportArticle struct {
 	IsFilter            int    `description:"是否过滤 1是、0否"`
 	ArticleIdMd5        string `description:"文章加密ID"`
 	CategoryId          int    `description:"文章分类id"`
+	CategoryName        string `description:"文章分类id"`
 	ShowButton          bool   `description:"是否展示过滤归类按钮"`
 	Pv                  int    `description:"PV"`
 	Uv                  int    `description:"UV"`
@@ -91,6 +92,7 @@ func GetReportArticleList(condition string, pars []interface{}, startSize, pageS
 				art.article_id,
 				art.report_id,
 				art.category_id,
+				art.category_name,
 				art.publish_date,
 				art.is_class,
 				art.publish_status,