sale

package
v0.0.0-...-33ecd2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

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

View Source
const MAX_CACHE_SIZE int = 1000

Variables

This section is empty.

Functions

func NewSale

func NewSale(partnerId int, saleRep sale.ISaleRep, goodsRep sale.IGoodsRep,
	tagRep sale.ISaleTagRep, promRep promotion.IPromotionRep) sale.ISale

func NewSaleGoods

func NewSaleGoods(s sale.ISale, goods sale.IItem, value *sale.ValueGoods, rep sale.ISaleRep,
	goodsRep sale.IGoodsRep, promRep promotion.IPromotionRep) sale.IGoods

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) GetChildId

func (this *Category) GetChildId() []int

获取子栏目的编号

func (*Category) GetDomainId

func (this *Category) GetDomainId() int

func (*Category) GetValue

func (this *Category) GetValue() sale.ValueCategory

func (*Category) Save

func (this *Category) Save() (int, error)

func (*Category) SetValue

func (this *Category) SetValue(v *sale.ValueCategory) error

type Item

type Item struct {
	// contains filtered or unexported fields
}

func (*Item) GetDomainId

func (this *Item) GetDomainId() int

func (*Item) GetSaleTags

func (this *Item) GetSaleTags() []*sale.ValueSaleTag

获取商品的销售标签

func (*Item) GetValue

func (this *Item) GetValue() sale.ValueItem

func (*Item) IsOnShelves

func (this *Item) IsOnShelves() bool

是否上架

func (*Item) Save

func (this *Item) Save() (int, error)

保存

func (*Item) SaveSaleTags

func (this *Item) SaveSaleTags(tagIds []int) error

保存销售标签

func (*Item) SetValue

func (this *Item) SetValue(v *sale.ValueItem) error

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 (this *Sale) CreateGoods(item sale.IItem, v *sale.ValueGoods) sale.IGoods

创建商品

func (*Sale) CreateItem

func (this *Sale) CreateItem(v *sale.ValueItem) sale.IItem

func (*Sale) CreateSaleTag

func (this *Sale) CreateSaleTag(v *sale.ValueSaleTag) sale.ISaleTag

创建销售标签

func (*Sale) DeleteCategory

func (this *Sale) DeleteCategory(id int) error

删除分类

func (*Sale) DeleteGoods

func (this *Sale) DeleteGoods(goodsId int) error

删除商品

func (*Sale) DeleteItem

func (this *Sale) DeleteItem(id int) error

删除货品

func (*Sale) DeleteSaleTag

func (this *Sale) DeleteSaleTag(id int) error

删除销售标签

func (*Sale) GetAggregateRootId

func (this *Sale) GetAggregateRootId() int

func (*Sale) GetAllSaleTags

func (this *Sale) GetAllSaleTags() []sale.ISaleTag

获取所有的销售标签

func (*Sale) GetCategories

func (this *Sale) GetCategories() []sale.ICategory

获取所有分类

func (*Sale) GetCategory

func (this *Sale) GetCategory(id int) sale.ICategory

获取分类

func (*Sale) GetGoods

func (this *Sale) GetGoods(goodsId int) sale.IGoods

根据产品编号获取商品

func (*Sale) GetGoodsBySku

func (this *Sale) GetGoodsBySku(itemId, sku int) sale.IGoods

根据产品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) GetItem

func (this *Sale) GetItem(itemId int) sale.IItem

根据产品编号获取产品

func (*Sale) GetSaleTag

func (this *Sale) GetSaleTag(id int) sale.ISaleTag

获取销售标签

func (*Sale) GetSaleTagByCode

func (this *Sale) GetSaleTagByCode(code string) sale.ISaleTag

根据Code获取销售标签

func (*Sale) InitSaleTags

func (this *Sale) InitSaleTags() error

初始化销售标签

type SaleGoods

type SaleGoods struct {
	// contains filtered or unexported fields
}

func (*SaleGoods) AddSaleNum

func (this *SaleGoods) AddSaleNum(quantity int) error

更新销售数量

func (*SaleGoods) CancelSale

func (this *SaleGoods) CancelSale(quantity int, orderNo string) error

取消销售

func (*SaleGoods) GenerateSnapshot

func (this *SaleGoods) GenerateSnapshot() (int, error)

生成快照

func (*SaleGoods) GetDomainId

func (this *SaleGoods) GetDomainId() int

获取领域对象编号

func (*SaleGoods) GetItem

func (this *SaleGoods) GetItem() sale.IItem

获取货品

func (*SaleGoods) GetLatestSnapshot

func (this *SaleGoods) GetLatestSnapshot() *sale.GoodsSnapshot

获取最新的快照

func (*SaleGoods) GetLevelPrice

func (this *SaleGoods) GetLevelPrice(level int) (bool, float32)

获取会员价销价

func (*SaleGoods) GetLevelPrices

func (this *SaleGoods) GetLevelPrices() []*sale.MemberPrice

获取会员价

func (*SaleGoods) GetPackedValue

func (this *SaleGoods) GetPackedValue() *valueobject.Goods

获取包装过的商品信息

func (*SaleGoods) GetPromotionDescribe

func (this *SaleGoods) GetPromotionDescribe() map[string]string

获取促销描述

func (*SaleGoods) GetPromotionPrice

func (this *SaleGoods) GetPromotionPrice(level int) float32

获取促销价

func (*SaleGoods) GetPromotions

func (this *SaleGoods) GetPromotions() []promotion.IPromotion

获取促销信息

func (*SaleGoods) GetValue

func (this *SaleGoods) GetValue() *sale.ValueGoods

设置值

func (*SaleGoods) Save

func (this *SaleGoods) Save() (int, error)

保存

func (*SaleGoods) SaveLevelPrice

func (this *SaleGoods) SaveLevelPrice(v *sale.MemberPrice) (int, error)

保存会员价

func (*SaleGoods) SetValue

func (this *SaleGoods) SetValue(v *sale.ValueGoods) error

设置值

type SaleTag

type SaleTag struct {
	// contains filtered or unexported fields
}

func (*SaleTag) GetDomainId

func (this *SaleTag) GetDomainId() int

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

获取标签下的商品

func (*SaleTag) Save

func (this *SaleTag) Save() (int, error)

func (*SaleTag) SetValue

func (this *SaleTag) SetValue(v *sale.ValueSaleTag) error

设置值

func (*SaleTag) System

func (this *SaleTag) System() bool

是否为系统内置

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL