Browse Source

调整默认值

tags/v1.0.0
zhouzj 3 years ago
parent
commit
d60154b946
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      Go/source/gen/DefaultIdGenerator.go

+ 2
- 2
Go/source/gen/DefaultIdGenerator.go View File

@@ -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.")
}



Loading…
Cancel
Save