|
|
|
@@ -21,7 +21,7 @@ func GetSerialNoByRedis() (string, error) { |
|
|
|
redis_client.Expire(redis_key.RewardSerialCounter(now), 2*time.Minute) |
|
|
|
} |
|
|
|
//when the counter n exceeds 1000, the length of the serial number will become longer |
|
|
|
if n > 1000 { |
|
|
|
if n >= 1000 { |
|
|
|
return now.Format("200601021504") + fmt.Sprintf("%d", n) + fmt.Sprint(rand.Intn(10)), nil |
|
|
|
} |
|
|
|
return now.Format("200601021504") + fmt.Sprintf("%03d", n) + fmt.Sprint(rand.Intn(10)), nil |
|
|
|
|