fusenapi/model/gmodel/fs_product_template_element_logic.go

14 lines
425 B
Go
Raw Normal View History

2023-06-19 10:27:31 +00:00
package gmodel
2023-07-11 09:08:19 +00:00
2023-08-08 10:35:29 +00:00
import "context"
2023-07-11 09:08:19 +00:00
// TODO: 使用model的属性做你想做的
2023-08-08 10:35:29 +00:00
func (e *FsProductTemplateElementModel) FindOneByModelId(ctx context.Context, modelId int64) (resp *FsProductTemplateElement, err error) {
err = e.db.WithContext(ctx).Model(&FsProductTemplateElement{}).
//以前的神仙员工把表model_id变成product_template_id
2023-08-17 03:56:37 +00:00
Where("`model_id` = ?", modelId).
2023-08-08 10:35:29 +00:00
Take(&resp).Error
return resp, err
}