Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
		
						commit
						6060ae264b
					
				| @ -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()) | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
| @ -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) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user