Quellcode durchsuchen

New标签展示与,报告精选只展示一条

xingzai vor 2 Jahren
Ursprung
Commit
f3e74967ea
2 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen
  1. 5 3
      controllers/activity.go
  2. 4 1
      controllers/report.go

+ 5 - 3
controllers/activity.go

@@ -3663,9 +3663,11 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
 		br.ErrMsg = "获取活动【新】标签Map失败, Err: " + e.Error()
 		return
 	}
-	for k := range list {
-		for k2 := range list[k].List {
-			list[k].List[k2].IsNew = newLabelMap[list[k].List[k2].ActivityId]
+	for k, v := range list {
+		if v.ActivityTypeId == 1 {
+			for k2 := range list[k].List {
+				list[k].List[k2].IsNew = newLabelMap[list[k].List[k2].ActivityId]
+			}
 		}
 	}
 

+ 4 - 1
controllers/report.go

@@ -1286,7 +1286,10 @@ func (this *ReportController) ReportListByType() {
 		return
 	}
 	fmt.Println(tbdb)
-	condition = ` AND publish_status = 1`
+	condition = ` AND publish_status = 1  `
+	if reportType == "1" {
+		condition += ` LIMIT 1 `
+	}
 	total, err := models.GetCygxReportSelectionPublic(condition, tbdb, pars)
 	if err != nil {
 		br.Msg = "获取信息失败"