YouChuKoffee/app/services/BrandService.go

11 lines
257 B
Go

package services
import (
"qteam/app/models/brandmodel"
)
func MilkBrandList() (code int, brandData []brandmodel.Brand) {
err := brandmodel.GetInstance().GetDb().Where("state = ?", 1).OrderBy("id asc").Find(&brandData)
return handErr(err), brandData
}