From 1a19949e6464872e9d54154bc69e13cfc858d106 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 4 Apr 2024 10:24:09 +0800 Subject: [PATCH] 1 --- app.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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() }