fix
This commit is contained in:
parent
6c3344b127
commit
dad56a677b
|
@ -6,9 +6,9 @@ import (
|
|||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fusenapi/constants"
|
||||
"fusenapi/server/websocket/internal/websocket_data"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/encryption_decryption"
|
||||
"fusenapi/utils/websocket_data"
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
|
|
|
@ -4,10 +4,10 @@ package logic
|
|||
import (
|
||||
"encoding/json"
|
||||
"fusenapi/constants"
|
||||
"fusenapi/server/websocket/internal/websocket_data"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/encryption_decryption"
|
||||
"fusenapi/utils/websocket_data"
|
||||
"time"
|
||||
|
||||
"context"
|
||||
|
|
|
@ -4,10 +4,10 @@ package logic
|
|||
import (
|
||||
"encoding/json"
|
||||
"fusenapi/constants"
|
||||
"fusenapi/server/websocket/internal/websocket_data"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/encryption_decryption"
|
||||
"fusenapi/utils/websocket_data"
|
||||
"time"
|
||||
|
||||
"context"
|
||||
|
|
|
@ -7,10 +7,10 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"fusenapi/constants"
|
||||
websocket_data2 "fusenapi/server/websocket/internal/websocket_data"
|
||||
"fusenapi/service/repositories"
|
||||
"fusenapi/utils/curl"
|
||||
"fusenapi/utils/hash"
|
||||
"fusenapi/utils/websocket_data"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gorm.io/gorm"
|
||||
"strconv"
|
||||
|
@ -70,7 +70,7 @@ func (w *wsConnectItem) renderImage() {
|
|||
// 消费渲染缓冲数据
|
||||
func (w *wsConnectItem) consumeRenderCache(data []byte) {
|
||||
logx.Info("消费渲染数据:", string(data))
|
||||
var renderImageData websocket_data2.RenderImageReqMsg
|
||||
var renderImageData websocket_data.RenderImageReqMsg
|
||||
if err := json.Unmarshal(data, &renderImageData); err != nil {
|
||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_ERR_DATA_FORMAT, "invalid format of websocket render image message:"+string(data)))
|
||||
logx.Error("invalid format of websocket render image message", err)
|
||||
|
@ -136,7 +136,7 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) {
|
|||
}
|
||||
} else {
|
||||
//返回给客户端
|
||||
b := w.respondDataFormat(constants.WEBSOCKET_RENDER_IMAGE, websocket_data2.RenderImageRspMsg{
|
||||
b := w.respondDataFormat(constants.WEBSOCKET_RENDER_IMAGE, websocket_data.RenderImageRspMsg{
|
||||
RenderId: renderImageData.RenderId,
|
||||
Image: *resource.ResourceUrl,
|
||||
CombineTakesTime: "耗时0秒(缓存)",
|
||||
|
@ -161,7 +161,7 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) {
|
|||
}
|
||||
|
||||
// 组装数据发送给unity
|
||||
func (w *wsConnectItem) assembleRenderData(taskId string, info websocket_data2.RenderImageReqMsg) error {
|
||||
func (w *wsConnectItem) assembleRenderData(taskId string, info websocket_data.RenderImageReqMsg) error {
|
||||
//获取产品第一个尺寸
|
||||
productFirstSize, err := w.logic.svcCtx.AllModels.FsProductSize.GetProductFirstSize(w.logic.ctx, info.RenderData.ProductId)
|
||||
if err != nil {
|
||||
|
@ -423,7 +423,7 @@ func (w *wsConnectItem) operationRenderTask() {
|
|||
UnityRenderTakesTime = fmt.Sprintf("耗时%d秒", taskData.UnityRenderEndTime-taskData.UnityRenderBeginTime)
|
||||
}
|
||||
//发送到出口
|
||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_RENDER_IMAGE, websocket_data2.RenderImageRspMsg{
|
||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_RENDER_IMAGE, websocket_data.RenderImageRspMsg{
|
||||
RenderId: taskData.RenderId,
|
||||
Image: data.RenderNotifyImageUrl,
|
||||
CombineTakesTime: CombineTakesTime,
|
||||
|
|
Loading…
Reference in New Issue
Block a user