From d60154b9462ad60af8f74dce86cc46d76501f8e7 Mon Sep 17 00:00:00 2001 From: zhouzj Date: Sun, 21 Mar 2021 22:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Go/source/gen/DefaultIdGenerator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Go/source/gen/DefaultIdGenerator.go b/Go/source/gen/DefaultIdGenerator.go index c5beead..cf50d19 100644 --- a/Go/source/gen/DefaultIdGenerator.go +++ b/Go/source/gen/DefaultIdGenerator.go @@ -24,8 +24,8 @@ func NewDefaultIdGenerator(options *contract.IdGeneratorOptions) *DefaultIdGener panic("dig.Options error.") } - var minTime = time.Now().AddDate(-50, 0, 0).UnixNano() / 1e6 - if minTime == 0 || options.BaseTime < minTime || options.BaseTime > time.Now().UnixNano()/1e6 { + minTime := int64(631123200000) // time.Now().AddDate(-30, 0, 0).UnixNano() / 1e6 + if options.BaseTime < minTime || options.BaseTime > time.Now().UnixNano()/1e6 { panic("BaseTime error.") }