duxin 1 год назад
Родитель
Сommit
67506652db
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      src/jfw/front/nzjProject.go

+ 1 - 5
src/jfw/front/nzjProject.go

@@ -500,10 +500,6 @@ func WinnerGladTidings(number int) (entBidArr []map[string]interface{}) {
 	data, _ := redis.Get(RedisNameNew, redisKey).([]interface{})
 	data, _ := redis.Get(RedisNameNew, redisKey).([]interface{})
 	if len(data) > 0 {
 	if len(data) > 0 {
 		entBidArr = common.ObjArrToMapArr(data)
 		entBidArr = common.ObjArrToMapArr(data)
-		if len(entBidArr) > number {
-			randomNumber := rand.Intn(len(entBidArr) - number)
-			entBidArr = entBidArr[randomNumber : randomNumber+number]
-		}
 		return
 		return
 	}
 	}
 	entName := public.Mysql.SelectBySql(fmt.Sprintf(`SELECT a.name,b.min_vip_starttime,b.max_vip_endtime
 	entName := public.Mysql.SelectBySql(fmt.Sprintf(`SELECT a.name,b.min_vip_starttime,b.max_vip_endtime
@@ -545,7 +541,7 @@ WHERE
 				randomNumber := rand.Intn(len(entBidArr) - number)
 				randomNumber := rand.Intn(len(entBidArr) - number)
 				entBidArr = entBidArr[randomNumber : randomNumber+number]
 				entBidArr = entBidArr[randomNumber : randomNumber+number]
 			}
 			}
-			redis.Put(RedisNameNew, redisKey, entBidArr, 24*3600*7)
+			redis.Put(RedisNameNew, redisKey, entBidArr, 24*3600)
 		}
 		}
 	}
 	}
 	return entBidArr
 	return entBidArr