diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 0090dd50..910b707b 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -93,6 +93,8 @@ func (l *defaultImageHandle) LogoInfoSet(ctx context.Context, in *LogoInfoSetReq if in.Debug != nil && in.Debug.IsAllTemplateTag == 1 { postMap["is_all_template"] = "1" + } else { + postMap["is_all_template"] = "0" } logc.Infof(ctx, "算法请求--LOGO基础信息--开始时间:%v", time.Now().UTC()) diff --git a/utils/auth/user.go b/utils/auth/user.go index b1d43087..1f88351d 100644 --- a/utils/auth/user.go +++ b/utils/auth/user.go @@ -204,6 +204,9 @@ func GenerateBaseJwtTokenUint64(AccessSecret uint64, accessExpire int64, nowSec for i := 0; i < myclaimsType.NumField(); i++ { field := myclaimsType.Field(i) tag := field.Tag.Get("json") + if tag == "exp" || tag == "iat" { + continue + } value := myclaimsValue.Field(i).Interface() // 将字段值赋给 claims 对象的相应键 claims[tag] = value diff --git a/utils/auth/user_test.go b/utils/auth/user_test.go index 8577988f..7280665d 100644 --- a/utils/auth/user_test.go +++ b/utils/auth/user_test.go @@ -19,7 +19,7 @@ func TestCase(t *testing.T) { data, _ := json.Marshal(info) log.Println(string(data)) - a := `{"user_id":0,"guest_id":1,"exp":0, "debug": { "exp": 12321213321}}` + a := `{"user_id":0,"guest_id":1,"exp":0, "debug": { "exp": 123212, "is_cache": 1}}` err := json.Unmarshal([]byte(a), info) log.Println(err) log.Printf("%#v %v", info, info.Debug)