This commit is contained in:
laodaming 2023-09-26 11:47:31 +08:00
parent 01cc115a60
commit f7992279e2

View File

@ -59,7 +59,10 @@ func (l *GetSizeByPidLogic) GetSizeByPid(req *types.GetSizeByPidReq, userinfo *a
} else {
//根据模板找到模型sizeId
defaultModel3d, err := l.svcCtx.AllModels.FsProductModel3d.FindOne(l.ctx, *defaultTemplate.ModelId, "size_id")
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "the template`s model is not exists ")
}
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get default model ")
}