From c8ff11b63312054ef59d5c3bf34f385c789011f4 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 16 Aug 2023 16:26:44 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/ws_render_image_logic.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image_logic.go b/server/websocket/internal/logic/ws_render_image_logic.go index 4743c5ee..d078e0be 100644 --- a/server/websocket/internal/logic/ws_render_image_logic.go +++ b/server/websocket/internal/logic/ws_render_image_logic.go @@ -110,8 +110,11 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { renderImageData.RenderData.UserId = w.userId renderImageData.RenderData.GuestId = w.guestId - //生成任务id - taskId := hash.JsonHashKey(renderImageData.RenderData) + //生成任务id(需要把user_id,guest_id设为0) + hashVal := renderImageData.RenderData + hashVal.UserId = 0 + hashVal.GuestId = 0 + taskId := hash.JsonHashKey(hashVal) //查询有没有缓存的资源,有就返回###################### resource, err := w.logic.svcCtx.AllModels.FsResource.FindOneById(w.logic.ctx, taskId) if err != nil {