wangshan пре 7 месеци
родитељ
комит
928d167851
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/jfw/modules/publicapply/src/detail/dao/ahead.go

+ 1 - 1
src/jfw/modules/publicapply/src/detail/dao/ahead.go

@@ -143,7 +143,7 @@ func (a *AheadStruct) Ahead() (eri *entity.AheadRecommend) {
 	if eri.More {
 		ri := 0
 		if len(eri.List)-int(count) > 1 {
-			rand.New(rand.NewSource(time.Now().UnixNano())).Intn(len(eri.List) - int(count) - 1)
+			ri = rand.New(rand.NewSource(time.Now().UnixNano())).Intn(len(eri.List) - int(count) - 1)
 		}
 		eri.List = eri.List[ri : ri+int(count)]
 	}