diff --git a/app.go b/app.go index c7a17f4..c7e3ff5 100644 --- a/app.go +++ b/app.go @@ -17,7 +17,8 @@ import ( type App interface { GetPkgName() string - NewUuid() int64 + NewGlobalUuid() string + NewNodeUuid() int64 GetInstanceId() int32 GetNodeId() int32 GetZoneId() int32 @@ -183,7 +184,11 @@ func (this *app) run() { } } -func (this *app) NewUuid() int64 { +func (this *app) NewGlobalUuid() string { + return q5.ToString(this.uuid.Generate()) +} + +func (this *app) NewNodeUuid() int64 { return this.uuid.Generate() }