This commit is contained in:
苏尹岚
2021-02-08 09:27:53 +08:00
parent e6d3190691
commit fd6efea36e
3 changed files with 35 additions and 0 deletions

View File

@@ -3938,3 +3938,15 @@ func CreateVendorStore(ctx *jxcontext.Context, storeID, vendorID int, payload ma
}
return err
}
func GetBrandStore(ctx *jxcontext.Context, name string) (brands []*model.BrandStore, err error) {
var (
db = dao.GetDB()
)
sql := `
SELECT * FROM brand_store WHERE deleted_at = ? AND name LIKE ?
`
sqlParams := []interface{}{utils.DefaultTimeValue, "%" + name + "%"}
err = dao.GetRows(db, &brands, sql, sqlParams)
return brands, err
}