增加配置
This commit is contained in:
parent
aa2a157530
commit
1fb08e42d3
|
@ -5,6 +5,6 @@ import (
|
|||
)
|
||||
|
||||
func MilkBrandList() (code int, brandData []brandmodel.Brand) {
|
||||
err := brandmodel.GetInstance().GetDb().Where("state = ?", 1).OrderBy("brand_id asc").Find(&brandData)
|
||||
err := brandmodel.GetInstance().GetDb().Where("state = ?", 1).OrderBy("id asc").Find(&brandData)
|
||||
return handErr(err), brandData
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ 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).Find(&productList)
|
||||
Where("a.status = ?", 1).OrderBy("brand_id asc").Find(&productList)
|
||||
return handErr(err), productList
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue