-
Notifications
You must be signed in to change notification settings - Fork 0
/
goods_rep.go
47 lines (35 loc) · 1.04 KB
/
goods_rep.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* Copyright 2015 @ z3q.net.
* name : goods_rep
* author : jarryliu
* date : -- :
* description :
* history :
*/
package sale
import "go2o/src/core/domain/interface/valueobject"
// 商品仓储
type IGoodsRep interface {
// 获取商品
GetValueGoods(itemId int, sku int) *ValueGoods
// 获取商品
GetValueGoodsById(goodsId int) *ValueGoods
// 根据SKU获取商品
GetValueGoodsBySku(itemId, sku int) *ValueGoods
// 保存商品
SaveValueGoods(*ValueGoods) (int, error)
// 获取在货架上的商品
GetOnShelvesGoods(partnerId int, start, end int,
sortBy string) []*valueobject.Goods
// 获取在货架上的商品
GetPagedOnShelvesGoods(partnerId int, catIds []int, start, end int,
where, orderBy string) (total int, goods []*valueobject.Goods)
// 根据编号获取商品
GetGoodsByIds(ids ...int) ([]*valueobject.Goods, error)
// 获取会员价
GetGoodsLevelPrice(goodsId int) []*MemberPrice
// 保存会员价
SaveGoodsLevelPrice(*MemberPrice) (int, error)
// 移除会员价
RemoveGoodsLevelPrice(id int) error
}