From cc6e2d1ce0b0281495f4e8c5486eb860d43d9a89 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 11:34:02 +0800 Subject: [PATCH] 11 --- .../websocket/internal/logic/ws_render_image.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index ebe38904..3fc15a13 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -186,15 +186,6 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { logx.Info("合成刀版图成功,合成刀版图数据:", combineReq, ",logo图片:", renderImageData.RenderData.Logo, " 刀版图:", *res.ResourceUrl) //获取唯一id taskId := w.genRenderTaskId(renderImageData, model3dInfo, productTemplate, element) - //记录刀版图合成消耗时间跟上传刀版图时间 - w.modifyRenderTaskProperty(renderImageControlChanItem{ - option: 2, - taskId: taskId, - taskProperty: renderTask{ - combineTakesTime: res.DiffTimeLogoCombine, - uploadCombineImageTakesTime: res.DiffTimeUploadFile, - }, - }) //查询有没有缓存的资源,有就返回###################### resource, err := w.logic.svcCtx.AllModels.FsResource.FindOneById(w.logic.ctx, taskId) if err != nil { @@ -227,12 +218,14 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { taskId: taskId, renderId: renderImageData.RenderId, }) - //记录刀版图 + //记录刀版图合成消耗时间跟上传刀版图时间以及刀版图 w.modifyRenderTaskProperty(renderImageControlChanItem{ option: 2, taskId: taskId, taskProperty: renderTask{ - combineImage: combineImage, + combineTakesTime: res.DiffTimeLogoCombine, + uploadCombineImageTakesTime: res.DiffTimeUploadFile, + combineImage: combineImage, }, }) //组装数据 @@ -476,7 +469,7 @@ func (w *wsConnectItem) operationRenderTask() { renderId: data.renderId, } - case 2: //修改(耗时)属性 + case 2: //修改任务属性 if taskData, ok := w.extendRenderProperty.renderImageTask[data.taskId]; ok { //合图耗时 if data.taskProperty.combineTakesTime != 0 {