From c9458d0b60a5e6f685347a27d4d840686a00b547 Mon Sep 17 00:00:00 2001 From: "qiyunfanbo126.com" <815699> Date: Tue, 30 Jul 2024 15:08:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=B7=E6=A0=BC=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/ProductService.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 }