Procházet zdrojové kódy

fix: 二级专栏无报告不展示

hsun před 3 roky
rodič
revize
26c60bb789
1 změnil soubory, kde provedl 5 přidání a 5 odebrání
  1. 5 5
      services/report/classify.go

+ 5 - 5
services/report/classify.go

@@ -73,16 +73,16 @@ func GetClassListByClassifyId(user user.UserInfo, classifyIdFirst int) (list []*
 		temp.ReportAuthor = item.ReportAuthor
 		temp.HomeImgUrl = item.HomeImgUrl
 		temp.ClassifyNameSecond = item.ClassifyName
-		if _, ok := reportMap[item.Id]; ok {
-			temp.Stage = reportMap[item.Id].Stage
-		}
 		if classifyInfo.ClassifyName == "权益研报" {
 			temp.ProductName = "权益"
 		} else {
 			temp.ProductName = "FICC"
 		}
-
-		list = append(list, temp)
+		// 专栏下无报告则不展示
+		if _, ok := reportMap[item.Id]; ok {
+			list = append(list, temp)
+			temp.Stage = reportMap[item.Id].Stage
+		}
 	}
 	return
 }