wangshan 5 maanden geleden
bovenliggende
commit
bcd7db92a1
1 gewijzigde bestanden met toevoegingen van 6 en 10 verwijderingen
  1. 6 10
      marketanalysis/common.go

+ 6 - 10
marketanalysis/common.go

@@ -100,9 +100,8 @@ func WinningAnalysis(thisWinnerRow BuyerWinnerRow, rMap *sync.Map, entArrMap map
 			}*/
 			ss = append(ss, _dd)
 		}
-		if offline {
-			_d.Data = ss
-		} else {
+		_d.Data = ss
+		if !offline {
 			if len(ss) > Top3 {
 				_d.Data = ss[:Top3]
 			}
@@ -152,9 +151,8 @@ func WinningAnalysis(thisWinnerRow BuyerWinnerRow, rMap *sync.Map, entArrMap map
 			}*/
 			ss = append(ss, _dd)
 		}
-		if offline {
-			_d.Data = ss
-		} else {
+		_d.Data = ss
+		if !offline {
 			if len(ss) > Top3 {
 				_d.Data = ss[:Top3]
 			}
@@ -297,6 +295,7 @@ func BuyerAnalysis(thisBuyerRow BuyerWinnerRow, rMap *sync.Map, winnerName map[s
 			}*/
 			ss = append(ss, _dd)
 		}
+		_d.Data = ss
 		if !offline {
 			if len(ss) > Top3 {
 				_d.Data = ss[:Top3]
@@ -304,8 +303,6 @@ func BuyerAnalysis(thisBuyerRow BuyerWinnerRow, rMap *sync.Map, winnerName map[s
 			if len(countMap) >= Top30 {
 				break
 			}
-		} else {
-			_d.Data = ss
 		}
 		countMap = append(countMap, _d)
 	}
@@ -351,6 +348,7 @@ func BuyerAnalysis(thisBuyerRow BuyerWinnerRow, rMap *sync.Map, winnerName map[s
 
 			ss = append(ss, _dd)
 		}
+		_d.Data = ss
 		if !offline {
 			if len(ss) > Top3 {
 				_d.Data = ss[:Top3]
@@ -358,8 +356,6 @@ func BuyerAnalysis(thisBuyerRow BuyerWinnerRow, rMap *sync.Map, winnerName map[s
 			if len(amountMap) >= Top30 {
 				break
 			}
-		} else {
-			_d.Data = ss
 		}
 		amountMap = append(amountMap, _d)
 	}