11
This commit is contained in:
parent
1b92bb12ea
commit
3cdfe3c38a
|
@ -229,7 +229,7 @@ func (w *wsConnectItem) getProductRelateionInfo(renderImageData websocket_data.R
|
|||
}
|
||||
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "获取产品的指定尺寸失败", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, renderImageData.RenderData.ProductSizeId, 0)
|
||||
logx.Error("failed to get product size:", err)
|
||||
return
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
} else {
|
||||
//没有指定尺寸则获取产品第一个尺寸
|
||||
|
@ -242,7 +242,7 @@ func (w *wsConnectItem) getProductRelateionInfo(renderImageData websocket_data.R
|
|||
}
|
||||
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "获取产品的第一个尺寸失败", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, 0, 0)
|
||||
logx.Error("failed to get product size:", err)
|
||||
return
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,11 +252,11 @@ func (w *wsConnectItem) getProductRelateionInfo(renderImageData websocket_data.R
|
|||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "产品尺寸对应的模型不存在", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, productSize.Id, 0)
|
||||
logx.Error("product model is not found")
|
||||
return
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "获取产品尺寸对应的模型失败", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, 0, productSize.Id, 0)
|
||||
logx.Error("failed to get product model:", err)
|
||||
return
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
//获取模板
|
||||
productTemplate, err = w.logic.svcCtx.AllModels.FsProductTemplateV2.FindOneCloudRenderByProductIdModelIdTemplateTag(w.logic.ctx, renderImageData.RenderData.ProductId, model3d.Id, renderImageData.RenderData.TemplateTag)
|
||||
|
@ -264,14 +264,15 @@ func (w *wsConnectItem) getProductRelateionInfo(renderImageData websocket_data.R
|
|||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "找不到对应开启云渲染的模板", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, model3d.Id, productSize.Id, 0)
|
||||
logx.Error("template info is not found")
|
||||
return
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "获取对应开启云渲染模板失败", renderImageData.RenderData.ProductId, w.userId, w.guestId, 0, model3d.Id, productSize.Id, 0)
|
||||
logx.Error("failed to get template info:", err)
|
||||
return
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
if productTemplate.TemplateInfo == nil || *productTemplate.TemplateInfo == "" {
|
||||
w.renderErrResponse(renderImageData.RenderId, renderImageData.RenderData.TemplateTag, "", "渲染模板的json设计信息是空的", renderImageData.RenderData.ProductId, w.userId, w.guestId, productTemplate.Id, model3d.Id, productSize.Id, 0)
|
||||
return nil, nil, nil, errors.New("渲染模板的json设计信息是空的")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user