1
Some checks failed
Build / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
build / Build (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitee (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitlab (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled

This commit is contained in:
2025-07-02 18:32:43 +08:00
parent 8ae43bfba9
commit fbdf54603b
29 changed files with 1355 additions and 114 deletions

View File

@ -35,6 +35,7 @@ import (
"go-admin/common/storage"
ext "go-admin/config"
"go-admin/utils/redishelper"
"go-admin/utils/utility"
)
var (
@ -177,6 +178,9 @@ func run() error {
}
func initCommon() {
//初始化雪花算法
utility.InitSnowflake()
redishelper.InitDefaultRedis(config.CacheConfig.Redis.Addr, config.CacheConfig.Redis.Password, config.CacheConfig.Redis.DB)
if err := redishelper.DefaultRedis.Ping(); err != nil {
@ -195,6 +199,7 @@ func initCommon() {
os.Exit(-1)
}
}
var Router runtime.Router