mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-20 17:57:54 +00:00
Upgrade code generation supports drop-down box merging and dictionary usage
This commit is contained in:
+3
-2
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
jwt "go-admin/pkg/jwtauth"
|
||||
"log"
|
||||
)
|
||||
|
||||
func ExtractClaims(c *gin.Context) jwt.MapClaims {
|
||||
@@ -20,7 +21,7 @@ func GetUserId(c *gin.Context) int {
|
||||
if data["identity"] != nil {
|
||||
return int((data["identity"]).(float64))
|
||||
}
|
||||
fmt.Println("****************************** 路径:" + c.Request.URL.Path + " 请求方法:" + c.Request.Method + " 说明:缺少identity")
|
||||
log.Println("****************************** 路径:" + c.Request.URL.Path + " 请求方法:" + c.Request.Method + " 说明:缺少identity")
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -29,7 +30,7 @@ func GetUserIdStr(c *gin.Context) string {
|
||||
if data["identity"] != nil {
|
||||
return Int64ToString(int64((data["identity"]).(float64)))
|
||||
}
|
||||
fmt.Println("****************************** 路径:" + c.Request.URL.Path + " 请求方法:" + c.Request.Method + " 缺少identity")
|
||||
log.Println("****************************** 路径:" + c.Request.URL.Path + " 请求方法:" + c.Request.Method + " 缺少identity")
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user