Documentation ¶
Overview ¶
*
- Copyright 2015 @ z3q.net.
- name : sale_goods
- author : jarryliu
- date : -- :
- description :
- history :
*
- Copyright 2015 @ z3q.net.
- name : sale_tag
- author : jarryliu
- date : -- :
- description :
- history :
Index ¶
- Constants
- func NewSale(partnerId int, saleRep sale.ISaleRep, goodsRep sale.IGoodsRep, ...) sale.ISale
- func NewSaleGoods(s sale.ISale, goods sale.IItem, value *sale.ValueGoods, rep sale.ISaleRep, ...) sale.IGoods
- func NewSaleTag(partnerId int, value *sale.ValueSaleTag, rep sale.ISaleTagRep) sale.ISaleTag
- type Category
- type Item
- func (this *Item) GetDomainId() int
- func (this *Item) GetSaleTags() []*sale.ValueSaleTag
- func (this *Item) GetValue() sale.ValueItem
- func (this *Item) IsOnShelves() bool
- func (this *Item) Save() (int, error)
- func (this *Item) SaveSaleTags(tagIds []int) error
- func (this *Item) SetValue(v *sale.ValueItem) error
- type Sale
- func (this *Sale) CreateCategory(v *sale.ValueCategory) sale.ICategory
- func (this *Sale) CreateGoods(item sale.IItem, v *sale.ValueGoods) sale.IGoods
- func (this *Sale) CreateItem(v *sale.ValueItem) sale.IItem
- func (this *Sale) CreateSaleTag(v *sale.ValueSaleTag) sale.ISaleTag
- func (this *Sale) DeleteCategory(id int) error
- func (this *Sale) DeleteGoods(goodsId int) error
- func (this *Sale) DeleteItem(id int) error
- func (this *Sale) DeleteSaleTag(id int) error
- func (this *Sale) GetAggregateRootId() int
- func (this *Sale) GetAllSaleTags() []sale.ISaleTag
- func (this *Sale) GetCategories() []sale.ICategory
- func (this *Sale) GetCategory(id int) sale.ICategory
- func (this *Sale) GetGoods(goodsId int) sale.IGoods
- func (this *Sale) GetGoodsBySku(itemId, sku int) sale.IGoods
- func (this *Sale) GetGoodsSnapshot(id int) *sale.GoodsSnapshot
- func (this *Sale) GetGoodsSnapshotByKey(key string) *sale.GoodsSnapshot
- func (this *Sale) GetItem(itemId int) sale.IItem
- func (this *Sale) GetSaleTag(id int) sale.ISaleTag
- func (this *Sale) GetSaleTagByCode(code string) sale.ISaleTag
- func (this *Sale) InitSaleTags() error
- type SaleGoods
- func (this *SaleGoods) AddSaleNum(quantity int) error
- func (this *SaleGoods) CancelSale(quantity int, orderNo string) error
- func (this *SaleGoods) GenerateSnapshot() (int, error)
- func (this *SaleGoods) GetDomainId() int
- func (this *SaleGoods) GetItem() sale.IItem
- func (this *SaleGoods) GetLatestSnapshot() *sale.GoodsSnapshot
- func (this *SaleGoods) GetLevelPrice(level int) (bool, float32)
- func (this *SaleGoods) GetLevelPrices() []*sale.MemberPrice
- func (this *SaleGoods) GetPackedValue() *valueobject.Goods
- func (this *SaleGoods) GetPromotionDescribe() map[string]string
- func (this *SaleGoods) GetPromotionPrice(level int) float32
- func (this *SaleGoods) GetPromotions() []promotion.IPromotion
- func (this *SaleGoods) GetValue() *sale.ValueGoods
- func (this *SaleGoods) Save() (int, error)
- func (this *SaleGoods) SaveLevelPrice(v *sale.MemberPrice) (int, error)
- func (this *SaleGoods) SetValue(v *sale.ValueGoods) error
- type SaleTag
- func (this *SaleTag) GetDomainId() int
- func (this *SaleTag) GetPagedValueGoods(begin, end int) (int, []*valueobject.Goods)
- func (this *SaleTag) GetValue() *sale.ValueSaleTag
- func (this *SaleTag) GetValueGoods(begin, end int) []*valueobject.Goods
- func (this *SaleTag) Save() (int, error)
- func (this *SaleTag) SetValue(v *sale.ValueSaleTag) error
- func (this *SaleTag) System() bool
Constants ¶
View Source
const MAX_CACHE_SIZE int = 1000
Variables ¶
This section is empty.
Functions ¶
func NewSaleGoods ¶
func NewSaleTag ¶
func NewSaleTag(partnerId int, value *sale.ValueSaleTag, rep sale.ISaleTagRep) sale.ISaleTag
Types ¶
type Category ¶
type Category struct {
// contains filtered or unexported fields
}
func (*Category) GetDomainId ¶
func (*Category) GetValue ¶
func (this *Category) GetValue() sale.ValueCategory
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (*Item) GetDomainId ¶
type Sale ¶
type Sale struct {
// contains filtered or unexported fields
}
func (*Sale) CreateCategory ¶
func (this *Sale) CreateCategory(v *sale.ValueCategory) sale.ICategory
创建分类
func (*Sale) CreateGoods ¶
创建商品
func (*Sale) CreateSaleTag ¶
func (this *Sale) CreateSaleTag(v *sale.ValueSaleTag) sale.ISaleTag
创建销售标签
func (*Sale) GetAggregateRootId ¶
func (*Sale) GetGoodsBySku ¶
根据产品SKU获取商品
func (*Sale) GetGoodsSnapshot ¶
func (this *Sale) GetGoodsSnapshot(id int) *sale.GoodsSnapshot
获取指定的商品快照
func (*Sale) GetGoodsSnapshotByKey ¶
func (this *Sale) GetGoodsSnapshotByKey(key string) *sale.GoodsSnapshot
根据Key获取商品快照
func (*Sale) GetSaleTagByCode ¶
根据Code获取销售标签
type SaleGoods ¶
type SaleGoods struct {
// contains filtered or unexported fields
}
func (*SaleGoods) CancelSale ¶
取消销售
func (*SaleGoods) GetLatestSnapshot ¶
func (this *SaleGoods) GetLatestSnapshot() *sale.GoodsSnapshot
获取最新的快照
func (*SaleGoods) GetLevelPrice ¶
获取会员价销价
func (*SaleGoods) GetLevelPrices ¶
func (this *SaleGoods) GetLevelPrices() []*sale.MemberPrice
获取会员价
func (*SaleGoods) GetPackedValue ¶
func (this *SaleGoods) GetPackedValue() *valueobject.Goods
获取包装过的商品信息
func (*SaleGoods) GetPromotionDescribe ¶
获取促销描述
func (*SaleGoods) GetPromotionPrice ¶
获取促销价
func (*SaleGoods) GetPromotions ¶
func (this *SaleGoods) GetPromotions() []promotion.IPromotion
获取促销信息
func (*SaleGoods) SaveLevelPrice ¶
func (this *SaleGoods) SaveLevelPrice(v *sale.MemberPrice) (int, error)
保存会员价
type SaleTag ¶
type SaleTag struct {
// contains filtered or unexported fields
}
func (*SaleTag) GetDomainId ¶
func (*SaleTag) GetPagedValueGoods ¶
func (this *SaleTag) GetPagedValueGoods(begin, end int) (int, []*valueobject.Goods)
获取标签下的分页商品
func (*SaleTag) GetValue ¶
func (this *SaleTag) GetValue() *sale.ValueSaleTag
func (*SaleTag) GetValueGoods ¶
func (this *SaleTag) GetValueGoods(begin, end int) []*valueobject.Goods
获取标签下的商品
Click to show internal directories.
Click to hide internal directories.