From baba117865f17b7f6faff8767a7e199a9390ed3a Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 22 Nov 2023 18:17:52 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/rendernotifylogic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/websocket/internal/logic/rendernotifylogic.go b/server/websocket/internal/logic/rendernotifylogic.go index 87b93d50..6ce937ac 100644 --- a/server/websocket/internal/logic/rendernotifylogic.go +++ b/server/websocket/internal/logic/rendernotifylogic.go @@ -97,11 +97,11 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a //转换unity真实处理时间 duration, err := time.Parse("15:04:05.9999999", req.CostTime) if err != nil { - fmt.Println("解析时间错误:", err) + logx.Error("解析时间错误:", err) return resp.SetStatusWithMessage(basic.CodeFileUploadErr, "转换unity时间错误") } // 将时间对象转换为毫秒数 - unityRealTakesTime := duration.Nanosecond() / 1e6 + duration.Second()*1000 + duration.Minute() * 6000 + duration.Hour()*3600000 + unityRealTakesTime := duration.Nanosecond()/1e6 + duration.Second()*1000 + duration.Minute()*6000 + duration.Hour()*3600000 if ws.conn != nil { //发送到出口 ws.sendRenderResultData(websocket_data.RenderImageRspMsg{ @@ -110,7 +110,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a RenderProcessTime: &websocket_data.RenderProcessTime{ UnityRenderTakesTime: fmt.Sprintf("%dms", unityRenderEndTime-unityRenderBeginTime), UploadUnityRenderImageTakesTime: fmt.Sprintf("%dms", uploadUnityRenderImageTakesTime), - UnityRealTakesTime: fmt.Sprintf("%dms",unityRealTakesTime), + UnityRealTakesTime: fmt.Sprintf("%dms", unityRealTakesTime), }, }) logx.Info("渲染回调成功,渲染结果图片为:", uploadRes.ResourceUrl)