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 } //获取模型