...
|
...
|
@@ -19,11 +19,11 @@ func GetInt64FromCtx(ctx context.Context, key string) int64 { |
|
|
var uid int64
|
|
|
if value := ctx.Value(key); value != nil {
|
|
|
valueStr := strings.Trim(fmt.Sprintf("%v", value), `"`)
|
|
|
i64, err := strconv.ParseInt(valueStr, 10, 64)
|
|
|
i64, err := strconv.ParseFloat(valueStr, 64)
|
|
|
if err != nil {
|
|
|
logx.WithContext(ctx).Errorf("GetUidFromCtx err : %+v", err)
|
|
|
}
|
|
|
uid = i64
|
|
|
uid = int64(i64)
|
|
|
return uid
|
|
|
}
|
|
|
return uid
|
...
|
...
|
|