u
This commit is contained in:
1 parent
098a061308
commit
994321d049
40 files changed
+1401
-359
No files matched your search
@@ -4,7 +4,7 @@ import (
|
||||
"base-go-v2/internal/logx"
|
||||
"base-go-v2/internal/router"
|
||||
"base-go-v2/internal/routinex"
|
||||
"base-go-v2/internal/utils/uid"
|
||||
"base-go-v2/internal/utils/idgen"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ func LoggerMiddleware() router.HandlerFunc {
|
||||
start := time.Now() // 记录开始时间
|
||||
|
||||
// 生成 trackID 并存入 routinex
|
||||
trackID := uid.NextID()
|
||||
trackID := idgen.NextId()
|
||||
routinex.Set(logx.TrackID, trackID)
|
||||
|
||||
// 执行业务逻辑,并捕获错误
|
||||
|
||||
Reference in new issue
Block a user