From a39076d739fae102e2d3fcf5733255cebd7560d4 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 6 Sep 2023 10:14:45 +0800 Subject: [PATCH] 11 --- server/websocket/internal/logic/ws_render_image.go | 5 +++-- utils/websocket_data/render_data.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 9a885ea2..8c6846f8 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -163,7 +163,7 @@ func (w *wsConnectItem) renderImage(data []byte) { return } //发送合图完毕阶段消息 - w.sendCombineImageStepResponseMessage(renderImageData.RenderId, combineImage, res.DiffTimeLogoCombine, res.DiffTimeUploadFile) + w.sendCombineImageStepResponseMessage(renderImageData.RenderId, combineImage, productSize.Id, res.DiffTimeLogoCombine, res.DiffTimeUploadFile) //如果指定指定只返回刀版图 if renderImageData.OnlyReturnCombineImage { logx.Info("云渲染传入size id则不走unity云渲染,只返回刀版图,render_id:", renderImageData.RenderId) @@ -363,7 +363,7 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, combineImage st } // 发送合图完毕阶段通知消息 -func (w *wsConnectItem) sendCombineImageStepResponseMessage(renderId, combineImage string, combineTime, uploadTime int64) { +func (w *wsConnectItem) sendCombineImageStepResponseMessage(renderId, combineImage string, sizeId, combineTime, uploadTime int64) { combineTakesTime := "cache" uploadCombineImageTakesTime := "cache" if combineTime > 0 { @@ -375,6 +375,7 @@ func (w *wsConnectItem) sendCombineImageStepResponseMessage(renderId, combineIma w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_COMBINE_IMAGE, websocket_data.CombineImageRspMsg{ RenderId: renderId, CombineImage: combineImage, + SizeId: sizeId, CombineProcessTime: websocket_data.CombineProcessTime{ CombineTakesTime: combineTakesTime, UploadCombineImageTakesTime: uploadCombineImageTakesTime, diff --git a/utils/websocket_data/render_data.go b/utils/websocket_data/render_data.go index a837ce87..f2c70de7 100644 --- a/utils/websocket_data/render_data.go +++ b/utils/websocket_data/render_data.go @@ -43,6 +43,7 @@ type RenderProcessTime struct { type CombineImageRspMsg struct { RenderId string `json:"render_id"` //渲染id CombineImage string `json:"combine_image"` //刀版图 + SizeId int64 `json:"size_id"` //尺寸id CombineProcessTime CombineProcessTime `json:"combine_process_time"` } type CombineProcessTime struct {