From c375d17c07fd12124a1c415faea17927469c8ff5 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 27 Jul 2023 14:10:41 +0800 Subject: [PATCH] fix --- .../internal/logic/rendernotifylogic.go | 4 ++-- server/websocket/internal/types/types.go | 20 +++++++++---------- server_api/websocket.api | 20 +++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/server/websocket/internal/logic/rendernotifylogic.go b/server/websocket/internal/logic/rendernotifylogic.go index 68a49e0d..f2b2ebdb 100644 --- a/server/websocket/internal/logic/rendernotifylogic.go +++ b/server/websocket/internal/logic/rendernotifylogic.go @@ -50,7 +50,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq) (resp *basi h.Write([]byte(fmt.Sprintf(constants.RENDER_NOTIFY_SIGN_KEY, string(notifyByte), req.Time))) signHex := h.Sum(nil) sign := hex.EncodeToString(signHex) - fmt.Println(sign) + //fmt.Println(sign) if req.Sign != sign { return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "invalid sign") } @@ -73,7 +73,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq) (resp *basi ProductId: req.Info.ProductId, MapsSourceId: req.Info.MapsSourceId, TemplateId: req.Info.TemplateId, - RenderSource: req.Info.RenderSource, + RenderResult: req.Info.RenderResult, }, } b, _ := json.Marshal(rspData) diff --git a/server/websocket/internal/types/types.go b/server/websocket/internal/types/types.go index 27260328..29427449 100644 --- a/server/websocket/internal/types/types.go +++ b/server/websocket/internal/types/types.go @@ -19,11 +19,11 @@ type RenderImageReqMsg struct { } type RenderImageRspMsg struct { - ProductId int64 `json:"product_id"` //产品 id - MapsSourceId int64 `json:"maps_source_id"` //贴图数据id - TemplateId int64 `json:"template_id"` //模板id - RenderDesignId int64 `json:"render_design_id"` //渲染设计id - RenderSource interface{} `json:"render_source"` //渲染结果数据 + ProductId int64 `json:"product_id"` //产品 id + MapsSourceId int64 `json:"maps_source_id"` //贴图数据id + TemplateId int64 `json:"template_id"` //模板id + RenderDesignId int64 `json:"render_design_id"` //渲染设计id + RenderResult string `json:"render_result"` //渲染结果数据 } type RenderNotifyReq struct { @@ -33,11 +33,11 @@ type RenderNotifyReq struct { } type NotifyInfo struct { - ProductId int64 `json:"product_id"` - MapsSourceId int64 `json:"maps_source_id"` - TemplateId int64 `json:"template_id"` - RenderDesignId int64 `json:"render_design_id"` //渲染设计id - RenderSource interface{} `json:"render_source"` //渲染完返回的数据 + ProductId int64 `json:"product_id"` + MapsSourceId int64 `json:"maps_source_id"` + TemplateId int64 `json:"template_id"` + RenderDesignId int64 `json:"render_design_id"` //渲染设计id + RenderResult string `json:"render_result"` //渲染结果数据 } type Request struct { diff --git a/server_api/websocket.api b/server_api/websocket.api index 15366697..90ff6e31 100644 --- a/server_api/websocket.api +++ b/server_api/websocket.api @@ -30,11 +30,11 @@ type RenderImageReqMsg { //websocket接受要云渲染处理的数据 RenderDesignId int64 `json:"render_design_id"` //渲染设计id } type RenderImageRspMsg { //websocket发送渲染完的数据 - ProductId int64 `json:"product_id"` //产品 id - MapsSourceId int64 `json:"maps_source_id"` //贴图数据id - TemplateId int64 `json:"template_id"` //模板id - RenderDesignId int64 `json:"render_design_id"` //渲染设计id - RenderSource interface{} `json:"render_source"` //渲染结果数据 + ProductId int64 `json:"product_id"` //产品 id + MapsSourceId int64 `json:"maps_source_id"` //贴图数据id + TemplateId int64 `json:"template_id"` //模板id + RenderDesignId int64 `json:"render_design_id"` //渲染设计id + RenderResult string `json:"render_result"` //渲染结果数据 } //渲染完了通知接口 type RenderNotifyReq { @@ -43,9 +43,9 @@ type RenderNotifyReq { Info NotifyInfo `json:"info"` } type NotifyInfo { - ProductId int64 `json:"product_id"` - MapsSourceId int64 `json:"maps_source_id"` - TemplateId int64 `json:"template_id"` - RenderDesignId int64 `json:"render_design_id"` //渲染设计id - RenderSource interface{} `json:"render_source"` //渲染完返回的数据 + ProductId int64 `json:"product_id"` + MapsSourceId int64 `json:"maps_source_id"` + TemplateId int64 `json:"template_id"` + RenderDesignId int64 `json:"render_design_id"` //渲染设计id + RenderResult string `json:"render_result"` //渲染结果数据 } \ No newline at end of file