fix
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
package gmodel
|
||||
|
||||
import "context"
|
||||
|
||||
// TODO: 使用model的属性做你想做的
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user