From 48cd4b2fea31ddc498dcd567db3682378529223e Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 15 Aug 2023 14:21:32 +0800 Subject: [PATCH] fix --- .../internal/logic/ws_render_image_logic.go | 1 - utils/websocket_data/render_data.go | 19 +++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image_logic.go b/server/websocket/internal/logic/ws_render_image_logic.go index 77240ce6..ec254ca7 100644 --- a/server/websocket/internal/logic/ws_render_image_logic.go +++ b/server/websocket/internal/logic/ws_render_image_logic.go @@ -59,7 +59,6 @@ func (w *wsConnectItem) renderImage(data []byte) { renderImageData.RenderData.Logo = "https://s3.us-west-1.amazonaws.com/storage.fusenpack.com/f5ccd11365099fa47a6316b1cd639f6dd6064dcd2d37c8d2fcd0a322160b33cc" } else { renderImageData.RenderData.Logo = *userMaterial.ResourceUrl - renderImageData.RenderData.UserMaterialId = userMaterial.Id } //用户id赋值 renderImageData.RenderData.UserId = w.userId diff --git a/utils/websocket_data/render_data.go b/utils/websocket_data/render_data.go index eaf44eac..4cb3bed6 100644 --- a/utils/websocket_data/render_data.go +++ b/utils/websocket_data/render_data.go @@ -12,16 +12,15 @@ type RenderImageReqMsg struct { RenderData RenderData `json:"render_data"` } type RenderData struct { - TemplateTag string `json:"template_tag"` //模板标签 - ProductId int64 `json:"product_id"` //产品id - UserMaterialId int64 `json:"user_material_id"` //用户素材id - Logo string `json:"logo"` //log资源地址(websocket连接建立再赋值) - Website string `json:"website"` //网站 - Slogan string `json:"slogan"` //slogan - Address string `json:"address"` //地址 - Phone string `json:"phone"` //电话 - UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值) - GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值) + TemplateTag string `json:"template_tag"` //模板标签 + ProductId int64 `json:"product_id"` //产品id + Logo string `json:"logo"` //log资源地址(websocket连接建立再赋值) + Website string `json:"website"` //网站 + Slogan string `json:"slogan"` //slogan + Address string `json:"address"` //地址 + Phone string `json:"phone"` //电话 + UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值) + GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值) } // websocket发送渲染完的数据