重构项目结构,将 orm 和 rds 包迁移到 web/globals
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"platform/pkg/rds"
|
||||
g "platform/web/globals"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -50,7 +50,7 @@ func (s *IdService) GenSerial(ctx context.Context) (string, error) {
|
||||
|
||||
// 使用Redis事务确保原子操作
|
||||
var sequence int64
|
||||
err := rds.Client.Watch(ctx, func(tx *redis.Tx) error {
|
||||
err := g.Redis.Watch(ctx, func(tx *redis.Tx) error {
|
||||
|
||||
// 获取当前序列号
|
||||
currentVal, err := tx.Get(ctx, key).Int64()
|
||||
|
||||
Reference in New Issue
Block a user