diff --git a/app/services/ProductService.go b/app/services/ProductService.go index 29a8797..1f7cc84 100644 --- a/app/services/ProductService.go +++ b/app/services/ProductService.go @@ -10,7 +10,8 @@ import ( 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).OrderBy("brand_id asc").Find(&productList) + Where("a.status = ?", 1).OrderBy("brand_id asc,price asc").Find(&productList) + return handErr(err), productList }