fix
This commit is contained in:
parent
2714ffd0d8
commit
07dbf5eb6d
|
@ -11,9 +11,3 @@ func (e *FsProductTemplateElementModel) FindOneByModelId(ctx context.Context, mo
|
||||||
Take(&resp).Error
|
Take(&resp).Error
|
||||||
return resp, err
|
return resp, err
|
||||||
}
|
}
|
||||||
func (e *FsProductTemplateElementModel) FindRandOne(ctx context.Context) (resp *FsProductTemplateElement, err error) {
|
|
||||||
err = e.db.WithContext(ctx).Model(&FsProductTemplateElement{}).
|
|
||||||
Order("RAND()").
|
|
||||||
Take(&resp).Error
|
|
||||||
return resp, err
|
|
||||||
}
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ func (w *wsConnectItem) assembleRenderData(taskId string, info websocket_data.Re
|
||||||
}
|
}
|
||||||
logx.Info("合成刀版图成功:", *res.ResourceUrl)
|
logx.Info("合成刀版图成功:", *res.ResourceUrl)
|
||||||
//获取渲染设置信息
|
//获取渲染设置信息
|
||||||
element, err := w.logic.svcCtx.AllModels.FsProductTemplateElement.FindRandOne(w.logic.ctx /*, *productTemplate.ModelId*/)
|
element, err := w.logic.svcCtx.AllModels.FsProductTemplateElement.FindOneByModelId(w.logic.ctx, *productTemplate.ModelId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
logx.Error("element info is not found,model_id = ", *productTemplate.ModelId)
|
logx.Error("element info is not found,model_id = ", *productTemplate.ModelId)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user