添加请求追踪中间件以记录请求和响应内容 在用户订阅查询中新增includeExpired参数支持查询历史记录 完善配置系统以支持float64类型默认值解析
This commit is contained in:
@@ -56,6 +56,10 @@ func parseDefaultValue(kind reflect.Kind, defaultValue string) any {
|
||||
var i uint32
|
||||
_, _ = fmt.Sscanf(defaultValue, "%d", &i)
|
||||
return i
|
||||
case reflect.Float64:
|
||||
var f float64
|
||||
_, _ = fmt.Sscanf(defaultValue, "%f", &f)
|
||||
return f
|
||||
default:
|
||||
fmt.Printf("类型 %v 没有处理, 值为: %v \n", kind, defaultValue)
|
||||
panic("unhandled default case")
|
||||
|
||||
@@ -3,10 +3,11 @@ package constant
|
||||
type CtxKey string
|
||||
|
||||
const (
|
||||
CtxKeyUser CtxKey = "user"
|
||||
CtxKeySessionID CtxKey = "sessionId"
|
||||
CtxKeyRequestHost CtxKey = "requestHost"
|
||||
CtxKeyPlatform CtxKey = "platform"
|
||||
CtxKeyPayment CtxKey = "payment"
|
||||
LoginType CtxKey = "loginType"
|
||||
CtxKeyUser CtxKey = "user"
|
||||
CtxKeySessionID CtxKey = "sessionId"
|
||||
CtxKeyRequestHost CtxKey = "requestHost"
|
||||
CtxKeyPlatform CtxKey = "platform"
|
||||
CtxKeyPayment CtxKey = "payment"
|
||||
LoginType CtxKey = "loginType"
|
||||
CtxKeyIncludeExpired CtxKey = "includeExpired"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user