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
|
|
|
|
Where("`product_template_id` = ?", modelId).
|
|
|
|
Take(&resp).Error
|
|
|
|
return resp, err
|
|
|
|
}
|