V2.5.2beta (#1101)

* fix: zap无法在运行时进行切割日志, config.docker.yaml与config.yaml同步 #1094

* feat: 为定时任务增加秒级控制

* feat: 调整代码结构,err更改为后置

* css 样式调整

Co-authored-by: SliverHorn <503551462@qq.com>
Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
奇淼(piexlmax
2022-05-28 19:22:23 +08:00
committed by GitHub
parent b25c128051
commit 83141b3564
49 changed files with 490 additions and 456 deletions

View File

@@ -17,7 +17,7 @@ func GetClaims(c *gin.Context) (*systemReq.CustomClaims, error) {
return claims, err
}
// 从Gin的Context中获取从jwt解析出来的用户ID
// GetUserID 从Gin的Context中获取从jwt解析出来的用户ID
func GetUserID(c *gin.Context) uint {
if claims, exists := c.Get("claims"); !exists {
if cl, err := GetClaims(c); err != nil {
@@ -31,7 +31,7 @@ func GetUserID(c *gin.Context) uint {
}
}
// 从Gin的Context中获取从jwt解析出来的用户UUID
// GetUserUuid 从Gin的Context中获取从jwt解析出来的用户UUID
func GetUserUuid(c *gin.Context) uuid.UUID {
if claims, exists := c.Get("claims"); !exists {
if cl, err := GetClaims(c); err != nil {
@@ -45,7 +45,7 @@ func GetUserUuid(c *gin.Context) uuid.UUID {
}
}
// 从Gin的Context中获取从jwt解析出来的用户角色id
// GetUserAuthorityId 从Gin的Context中获取从jwt解析出来的用户角色id
func GetUserAuthorityId(c *gin.Context) string {
if claims, exists := c.Get("claims"); !exists {
if cl, err := GetClaims(c); err != nil {
@@ -59,7 +59,7 @@ func GetUserAuthorityId(c *gin.Context) string {
}
}
// 从Gin的Context中获取从jwt解析出来的用户角色id
// GetUserInfo 从Gin的Context中获取从jwt解析出来的用户角色id
func GetUserInfo(c *gin.Context) *systemReq.CustomClaims {
if claims, exists := c.Get("claims"); !exists {
if cl, err := GetClaims(c); err != nil {