diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 9cd04c9a..9db76b29 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -10,6 +10,7 @@ import ( "fusenapi/constants" "fusenapi/model/gmodel" "fusenapi/service/repositories" + "fusenapi/utils/auth" "fusenapi/utils/curl" "fusenapi/utils/hash" "fusenapi/utils/websocket_data" @@ -245,7 +246,7 @@ func (w *wsConnectItem) renderImage(renderImageData websocket_data.RenderImageRe return } //发送合图完毕阶段消息 - w.sendCombineImageStepResponseMessage(renderImageData.RenderId, renderImageData.RequestId, combineImage, productSize.Id, model3dInfo.Id, productTemplate.Id, res.DiffTimeLogoCombine, res.DiffTimeUploadFile) + w.sendCombineImageStepResponseMessage(renderImageData.RenderId, renderImageData.RequestId, combineImage, productSize.Id, model3dInfo.Id, productTemplate.Id, res.DebugData) //获取唯一id taskId := w.genRenderTaskId(combineImage, renderImageData, model3dInfo, productTemplate, element) //查询有没有缓存的资源,有就返回 @@ -467,17 +468,17 @@ func (w *wsConnectItem) genRenderTaskId(combineImage string, renderImageData web // ****************************下面的发送消息的********************************* // 发送合图完毕阶段通知消息 -func (w *wsConnectItem) sendCombineImageStepResponseMessage(renderId, requestId, combineImage string, sizeId, modelId, templateId, combineTime, uploadTime int64) { +func (w *wsConnectItem) sendCombineImageStepResponseMessage(renderId, requestId, combineImage string, sizeId, modelId, templateId int64, debugData *auth.DebugData) { if w.debug == nil { return } combineTakesTime := "cache" uploadCombineImageTakesTime := "cache" - if combineTime > 0 { - combineTakesTime = fmt.Sprintf("%dms", combineTime) + if debugData.DiffTimeLogoCombine > 0 { + combineTakesTime = fmt.Sprintf("%dms", debugData.DiffTimeLogoCombine) } - if uploadTime > 0 { - uploadCombineImageTakesTime = fmt.Sprintf("%dms", uploadTime) + if debugData.DiffTimeUploadFile > 0 { + uploadCombineImageTakesTime = fmt.Sprintf("%dms", debugData.DiffTimeUploadFile) } w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_COMBINE_IMAGE, websocket_data.CombineImageRspMsg{ RenderId: renderId,