增加价格排序

This commit is contained in:
qiyunfanbo126.com 2024-07-30 15:08:12 +08:00
parent af54243886
commit c9458d0b60
1 changed files with 2 additions and 1 deletions

View File

@ -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
}