调整xorm层级

This commit is contained in:
2023-01-18 16:00:50 +08:00
parent 0f8c1f989b
commit a89c86023e
67 changed files with 500 additions and 460 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
package util
import (
"cutego/modules"
"cutego/modules/core/api/v1/response"
"cutego/modules/core/dao"
"cutego/modules/core/entity"
"cutego/modules/core/dataobject"
"cutego/pkg/common"
"cutego/pkg/config"
"cutego/pkg/jwt"
@@ -32,7 +32,7 @@ func CheckLockToken(c *gin.Context) bool {
if config.AppEnvConfig.Login.Single {
// 获取redis中的token数据
info := GetUserInfo(c)
get, err := dao.RedisDB.GET(info.UserName)
get, err := modules.RedisDB.GET(info.UserName)
if err != nil {
common.ErrorLog(err)
return false
@@ -49,7 +49,7 @@ func CheckLockToken(c *gin.Context) bool {
}
// CheckIsAdmin 判断是否是超级管理员
func CheckIsAdmin(user *entity.SysUser) bool {
func CheckIsAdmin(user *dataobject.SysUser) bool {
if user.UserId == 1 {
return true
} else {