diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 00d8c166..4fb169a9 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -173,7 +173,7 @@ func (w *wsConnectItem) renderImage(data []byte) { return } //获取唯一id - taskId := w.genRenderTaskId(renderImageData, model3dInfo, productTemplate, element) + taskId := w.genRenderTaskId(combineImage, renderImageData, model3dInfo, productTemplate, element) //查询有没有缓存的资源,有就返回###################### resource, err := w.logic.svcCtx.AllModels.FsResource.FindOneById(w.logic.ctx, taskId) if err != nil { @@ -492,7 +492,7 @@ func (w *wsConnectItem) modifyRenderTaskProperty(taskId string, property renderT } // 组装渲染任务id -func (w *wsConnectItem) genRenderTaskId(renderImageData websocket_data.RenderImageReqMsg, model3dInfo *gmodel.FsProductModel3d, productTemplate *gmodel.FsProductTemplateV2, element *gmodel.FsProductTemplateElement) string { +func (w *wsConnectItem) genRenderTaskId(combineImage string, renderImageData websocket_data.RenderImageReqMsg, model3dInfo *gmodel.FsProductModel3d, productTemplate *gmodel.FsProductTemplateV2, element *gmodel.FsProductTemplateElement) string { //生成任务id(需要把user_id,guest_id设为0) incomeHashParam := renderImageData.RenderData incomeHashParam.UserId = 0 //设为0(渲染跟用户id无关) @@ -513,6 +513,7 @@ func (w *wsConnectItem) genRenderTaskId(renderImageData websocket_data.RenderIma "template_info": templateHashStr, "material_image": *productTemplate.MaterialImg, "render_element": elementHashBytes, + "combine_image": combineImage, } return hash.JsonHashKey(hashMap) }