You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
745 B
31 lines
745 B
5 years ago
|
package goods
|
||
|
|
||
|
import (
|
||
|
"live/app/lib"
|
||
|
"live/app/lib/recook"
|
||
|
)
|
||
|
|
||
|
type Goods struct {
|
||
|
}
|
||
|
|
||
|
// @Title 商品列表 关键字jiansuo
|
||
|
func (g *Goods) GetGoodsList(keyword string, page lib.Page) *recook.GoodsList {
|
||
|
goodsInfos, err := recook.Goods.GetListByKeyword(keyword, page.GetPage(), page.GetLimit())
|
||
|
if err != nil {
|
||
|
return nil
|
||
|
}
|
||
|
return goodsInfos
|
||
|
}
|
||
|
|
||
|
// @Title 品牌列表
|
||
|
func (g *Goods) BrandList(page lib.Page) *recook.BrandList {
|
||
|
list, _ := recook.Goods.GetBrandList(page.GetPage(), page.GetLimit())
|
||
|
return list
|
||
|
}
|
||
|
|
||
|
// @Title 指定品牌商品列表
|
||
|
func (g *Goods) GoodsListByBrandId(brandId uint, page lib.Page) *recook.GoodsList {
|
||
|
list, _ := recook.Goods.GetListByBrandId(brandId, page.GetPage(), page.GetLimit())
|
||
|
return list
|
||
|
}
|