From 4eaf5b89d0fc3d7e255443bcf44e12542020f3b2 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 11 Sep 2023 17:41:07 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/ws_render_image.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 869d3ea2..9e4a8000 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -135,7 +135,7 @@ func (w *wsConnectItem) renderImage(data []byte) { productSize *gmodel.FsProductSize ) //获取信息 - productSize, productTemplate, model3dInfo, err = w.getProductRelateionInfo(renderImageData) + productSize, productTemplate, model3dInfo, err = w.getProductRelateionInfo(*renderImageData) if err != nil { logx.Error(err) return @@ -243,7 +243,7 @@ func (w *wsConnectItem) renderImage(data []byte) { } // 获取模板相关信息(指定尺寸) -func (w *wsConnectItem) getProductRelateionInfo(renderImageData websocket_data.RenderImageReqMsg) (productSize *gmodel.FsProductSize, productTemplate *gmodel.FsProductTemplateV2, model3d *gmodel.FsProductModel3d, err error) { +func (w *wsConnectItem) getProductRelateionInfo(renderImageData *websocket_data.RenderImageReqMsg) (productSize *gmodel.FsProductSize, productTemplate *gmodel.FsProductTemplateV2, model3d *gmodel.FsProductModel3d, err error) { //指定尺寸 if renderImageData.RenderData.ProductSizeId > 0 { productSize, err = w.logic.svcCtx.AllModels.FsProductSize.FindOneByIdProductId(w.logic.ctx, renderImageData.RenderData.ProductSizeId, renderImageData.RenderData.ProductId) @@ -270,6 +270,7 @@ func (w *wsConnectItem) getProductRelateionInfo(renderImageData websocket_data.R logx.Error("failed to get product size:", err) return nil, nil, nil, err } + renderImageData.RenderData.ProductSizeId = productSize.Id } //获取模型