feat: 数据库引用变更
This commit is contained in:
@@ -2,8 +2,8 @@ package controller
|
||||
|
||||
import (
|
||||
"be.ems/src/framework/constants/cachekey"
|
||||
"be.ems/src/framework/database/redis"
|
||||
"be.ems/src/framework/i18n"
|
||||
"be.ems/src/framework/redis"
|
||||
"be.ems/src/framework/utils/ctx"
|
||||
"be.ems/src/framework/vo/result"
|
||||
"be.ems/src/modules/monitor/model"
|
||||
@@ -116,8 +116,8 @@ func (s *SysCacheController) ClearCacheName(c *gin.Context) {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
ok, _ := redis.DelKeys("", cacheKeys)
|
||||
if ok {
|
||||
err = redis.DelKeys("", cacheKeys)
|
||||
if err == nil {
|
||||
c.JSON(200, result.Ok(nil))
|
||||
return
|
||||
}
|
||||
@@ -136,8 +136,8 @@ func (s *SysCacheController) ClearCacheKey(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
ok, _ := redis.Del("", cacheName+":"+cacheKey)
|
||||
if ok {
|
||||
err := redis.Del("", cacheName+":"+cacheKey)
|
||||
if err == nil {
|
||||
c.JSON(200, result.Ok(nil))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/constants/cachekey"
|
||||
"be.ems/src/framework/database/redis"
|
||||
"be.ems/src/framework/i18n"
|
||||
"be.ems/src/framework/redis"
|
||||
"be.ems/src/framework/utils/ctx"
|
||||
"be.ems/src/framework/vo"
|
||||
"be.ems/src/framework/vo/result"
|
||||
@@ -130,8 +130,8 @@ func (s *SysUserOnlineController) ForceLogout(c *gin.Context) {
|
||||
}
|
||||
|
||||
// 删除token
|
||||
ok, _ := redis.Del("", cachekey.LOGIN_TOKEN_KEY+tokenId)
|
||||
if ok {
|
||||
err := redis.Del("", cachekey.LOGIN_TOKEN_KEY+tokenId)
|
||||
if err == nil {
|
||||
c.JSON(200, result.Ok(nil))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user