YouChuKoffee/app/services/ProductService.go

11 lines
328 B
Go

package services
import "qteam/app/models/productsmodel"
func MilkProductList() (code int, productList []productsmodel.MilkProductsList) {
err := productsmodel.GetInstance().GetDb().Alias("a").
Join("INNER", "brand b", "a.brand_id = b.id").
Where("a.status = ?", 1).Find(&productList)
return handErr(err), productList
}