fix
This commit is contained in:
parent
d07b910e13
commit
6e716e17f9
|
@ -14,10 +14,12 @@ const (
|
|||
WEBSOCKET_REQUEST_REUSE_LAST_CONNECT Websocket = "WEBSOCKET_REQUEST_REUSE_LAST_CONNECT"
|
||||
//请求恢复为上次连接的标识错误
|
||||
WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR Websocket = "WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR"
|
||||
//图片渲染
|
||||
//图片渲染消息
|
||||
WEBSOCKET_RENDER_IMAGE Websocket = "WEBSOCKET_RENDER_IMAGE"
|
||||
//图片渲染失败消息
|
||||
WEBSOCKET_RENDER_IMAGE_ERR Websocket = "WEBSOCKET_RENDER_IMAGE_ERR"
|
||||
//反回合成刀版图消息
|
||||
WEBSOCKET_COMBINE_IMAGE Websocket = "WEBSOCKET_COMBINE_IMAGE"
|
||||
//传入数据格式错误
|
||||
WEBSOCKET_ERR_DATA_FORMAT Websocket = "WEBSOCKET_ERR_DATA_FORMAT"
|
||||
//通用回调通知
|
||||
|
|
|
@ -189,6 +189,14 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) {
|
|||
return
|
||||
}
|
||||
logx.Info("合成刀版图成功,合成刀版图数据:", combineReq, ",logo图片:", renderImageData.RenderData.Logo, " 刀版图:", *res.ResourceUrl)
|
||||
//如果是传入了指定尺寸,则直接返回刀版图
|
||||
if renderImageData.RenderData.SizeId > 0 {
|
||||
w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_COMBINE_IMAGE, websocket_data.CombineImageRspMsg{
|
||||
RenderId: renderImageData.RenderId,
|
||||
CombineImage: combineImage,
|
||||
}))
|
||||
return
|
||||
}
|
||||
//获取唯一id
|
||||
taskId := w.genRenderTaskId(renderImageData, model3dInfo, productTemplate, element)
|
||||
//查询有没有缓存的资源,有就返回######################
|
||||
|
|
|
@ -20,7 +20,7 @@ type RenderData struct {
|
|||
Slogan string `json:"slogan"` //slogan(可选)
|
||||
Address string `json:"address"` //地址(可选)
|
||||
Phone string `json:"phone"` //电话(可选)
|
||||
SizeId int64 `json:"size_id"` //尺寸id(可选)
|
||||
SizeId int64 `json:"size_id"` //尺寸id(可选,传值大于0则值返回刀版图不参与unity云渲染)
|
||||
UserId int64 `json:"user_id"` //用户id(websocket连接建立再赋值)
|
||||
GuestId int64 `json:"guest_id"` //游客id(websocket连接建立再赋值)
|
||||
Logo string `json:"logo"` //log资源地址(websocket连接建立再赋值)
|
||||
|
@ -39,3 +39,9 @@ type RenderProcessTime struct {
|
|||
UploadCombineImageTakesTime string `json:"upload_combine_image_takes_time"` //上传刀版图耗时
|
||||
UploadUnityRenderImageTakesTime string `json:"upload_unity_render_image_takes_time"` //上传unity渲染结果图时间
|
||||
}
|
||||
|
||||
// 合图返回数据
|
||||
type CombineImageRspMsg struct {
|
||||
RenderId string `json:"render_id"` //渲染id
|
||||
CombineImage string `json:"combine_image"` //刀版图
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user