Browse Source

feat:xiugai

wangchuanjin 1 year ago
parent
commit
0159eaad0f
2 changed files with 9 additions and 6 deletions
  1. 9 0
      api/internal/service/CoopHistoryService.go
  2. 0 6
      api/internal/service/owner.go

+ 9 - 0
api/internal/service/CoopHistoryService.go

@@ -331,6 +331,15 @@ func LastTimeCoop(buyerId, ent, stype string) (bool, int64) {
 
 //
 func LastTimeCoopBath(positionId int64, buyerIds, winners, agencys []string) (map[string]map[string]*Cooperate, map[string]map[string]*Cooperate) {
+	if len(buyerIds) > 10 {
+		buyerIds = buyerIds[:10]
+	}
+	if len(winners) > 10 {
+		winners = winners[:10]
+	}
+	if len(agencys) > 10 {
+		agencys = agencys[:10]
+	}
 	adiffb, agency := map[string]map[string]*Cooperate{}, map[string]map[string]*Cooperate{}
 	if len(buyerIds) == 0 {
 		return adiffb, agency

+ 0 - 6
api/internal/service/owner.go

@@ -1142,12 +1142,6 @@ func (t *OwnerService) CandidateChannel() (*ResultDatas, int, int, int, int) {
 			}
 		}
 		logx.Info("CandidateChannel LastTimeCoopBath start ", t.PositionId, " ", len(buyerIds), " ", len(winners), " ", len(agency))
-		if len(winners) > 300 {
-			winners = winners[:300]
-		}
-		if len(agency) > 300 {
-			agency = agency[:300]
-		}
 		ltcs1, ltcs2 := LastTimeCoopBath(t.PositionId, buyerIds, winners, agency)
 		logx.Info("CandidateChannel LastTimeCoopBath over ", t.PositionId)
 		pool := make(chan bool, 3)