feat:合图新增debug模块

This commit is contained in:
momo 2023-10-18 11:54:58 +08:00
parent c237fe6adc
commit 86547b9267
2 changed files with 9 additions and 15 deletions

View File

@ -116,6 +116,7 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth
},
ProductTemplateTagGroups: req.TemplateTagGroups,
ProductTemplateV2Info: productTemplateV2Info,
Debug: userinfo.Debug,
})
if err != nil {
@ -124,10 +125,8 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth
// 返回成功的响应和上传URL
return resp.SetStatus(basic.CodeOK, map[string]interface{}{
"resource_id": res.ResourceId,
"resource_url": res.ResourceUrl,
"resource_metadata": "",
"diff_time_logo_combine": res.DiffTimeLogoCombine,
"diff_time_upload_file": res.DiffTimeUploadFile,
})
"resource_id": res.ResourceId,
"resource_url": res.ResourceUrl,
"resource_metadata": "",
}).WithDebug(res.DebugData)
}

View File

@ -131,12 +131,10 @@ type (
Debug *auth.Debug `json:"debug"`
}
LogoCombineRes struct {
ResourceId string
ResourceUrl *string
Metadata *string
DiffTimeLogoCombine int64
DiffTimeUploadFile int64
DebugData *auth.DebugData `json:"debug_data"`
ResourceId string
ResourceUrl *string
Metadata *string
DebugData *auth.DebugData `json:"debug_data"`
}
)
type TemplateTagColor struct {
@ -314,9 +312,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
resp.ResourceId = uploadRes.ResourceId
resp.ResourceUrl = &uploadRes.ResourceUrl
resp.DiffTimeLogoCombine = diffTimeLogoCombine
resp.DiffTimeUploadFile = diffTimeUploadFile
if in.Debug != nil {
resp.DebugData = &auth.DebugData{
DiffTimeLogoCombine: diffTimeLogoCombine,