Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
09f081c1ad
|
@ -4,7 +4,6 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"fusenapi/constants"
|
"fusenapi/constants"
|
||||||
"fusenapi/service/repositories"
|
"fusenapi/service/repositories"
|
||||||
"fusenapi/utils/curl"
|
"fusenapi/utils/curl"
|
||||||
|
@ -122,18 +121,8 @@ func (w *wsConnectItem) assembleRenderData(taskId string, info websocket_data.Re
|
||||||
logx.Error("assembleRenderData panic:", err)
|
logx.Error("assembleRenderData panic:", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
//根据templateTag获取templateTagId(后续模板表的tag改成template_tag后可能就不需要这个步骤了)
|
// todo 获取模板(模板标签下的对一个物料的的模板)目前写死参数
|
||||||
templateTag, err := w.logic.svcCtx.AllModels.FsProductTemplateTags.FindOneByTagName(w.logic.ctx, info.RenderData.TemplateTag)
|
productTemplate, err := w.logic.svcCtx.AllModels.FsProductTemplateV2.FindOneByProductIdTagIdWithSizeTable(w.logic.ctx, 31, "11" /*fmt.Sprintf("%d", templateTag.Id)*/)
|
||||||
if err != nil {
|
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
|
||||||
logx.Error("can`t find template tag info by template tag:", info.RenderData.TemplateTag)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
logx.Error("failed to get template tag info")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
//获取模板(模板标签下的对一个物料的的模板)
|
|
||||||
productTemplate, err := w.logic.svcCtx.AllModels.FsProductTemplateV2.FindOneByProductIdTagIdWithSizeTable(w.logic.ctx, info.RenderData.ProductId, fmt.Sprintf("%d", templateTag.Id))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
logx.Error("template info is not found")
|
logx.Error("template info is not found")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user