mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-03 15:26:26 +08:00
优化null相关
This commit is contained in:
@@ -17,7 +17,18 @@ func EncodeInt(value any) any {
|
||||
switch v := value.(type) {
|
||||
case map[string]any:
|
||||
if v["Int"] != nil {
|
||||
return v["Int"]
|
||||
val := v["Int"]
|
||||
switch i := val.(type) {
|
||||
case *int:
|
||||
return *i
|
||||
case *int64:
|
||||
return *i
|
||||
case *string:
|
||||
return *i
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
// return val
|
||||
}
|
||||
}
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user