Documentation ¶
Overview ¶
*
- Copyright 2015 @ z3q.net.
- name : cash_back
- author : jarryliu
- date : -- :
- description :
- history :
*
- Copyright 2015 @ z3q.net.
- name : factor
- author : jarryliu
- date : -- :
- description :
- history :
Index ¶
- func DeletePromotion(p promotion.IPromotion) error
- func FactoryPromotion(rep promotion.IPromotionRep, goodsRep sale.IGoodsRep, memRep member.IMemberRep, ...) promotion.IPromotion
- type CashBackPromotion
- func (this *CashBackPromotion) GetDataTag() map[string]string
- func (this *CashBackPromotion) GetDomainId() int
- func (this *CashBackPromotion) GetRelationValue() interface{}
- func (this *CashBackPromotion) Save() (int, error)
- func (this *CashBackPromotion) SetDetailsValue(v *promotion.ValueCashBack) error
- func (this *CashBackPromotion) TypeName() string
- type Coupon
- func (this *Coupon) ApplyTake(couponTakeId int) error
- func (this *Coupon) Bind(memberId int) error
- func (this *Coupon) Binds(memberIds []string) error
- func (this *Coupon) CanTake() bool
- func (this *Coupon) CanUse(m member.IMember, fee float32) (bool, error)
- func (this *Coupon) GetBind(memberId int) (*promotion.ValueCouponBind, error)
- func (this *Coupon) GetBinds() []promotion.ValueCouponBind
- func (this *Coupon) GetCouponFee(orderFee float32) float32
- func (this *Coupon) GetDescribe() string
- func (this *Coupon) GetDetailsValue() promotion.ValueCoupon
- func (this *Coupon) GetDomainId() int
- func (this *Coupon) GetRelationValue() interface{}
- func (this *Coupon) GetTake(memberId int) (*promotion.ValueCouponTake, error)
- func (this *Coupon) GetTakes() []promotion.ValueCouponTake
- func (this *Coupon) Save() (int, error)
- func (this *Coupon) SetDetailsValue(v *promotion.ValueCoupon) error
- func (this *Coupon) Take(memberId int) error
- func (this *Coupon) TypeName() string
- func (this *Coupon) UseCoupon(couponBindId int) error
- type Promotion
- func (this *Promotion) ApplyFor() int
- func (this *Promotion) GetAggregateRootId() int
- func (this *Promotion) GetRelationValue() interface{}
- func (this *Promotion) GetValue() *promotion.ValuePromotion
- func (this *Promotion) Save() (int, error)
- func (this *Promotion) SetValue(v *promotion.ValuePromotion) error
- func (this *Promotion) Type() int
- func (this *Promotion) TypeName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeletePromotion ¶
func DeletePromotion(p promotion.IPromotion) error
func FactoryPromotion ¶
func FactoryPromotion(rep promotion.IPromotionRep, goodsRep sale.IGoodsRep, memRep member.IMemberRep, v *promotion.ValuePromotion) promotion.IPromotion
Types ¶
type CashBackPromotion ¶
type CashBackPromotion struct { *Promotion // contains filtered or unexported fields }
func (*CashBackPromotion) GetDataTag ¶
func (this *CashBackPromotion) GetDataTag() map[string]string
获取自定义数据
func (*CashBackPromotion) GetRelationValue ¶
func (this *CashBackPromotion) GetRelationValue() interface{}
获取相关的值
func (*CashBackPromotion) SetDetailsValue ¶
func (this *CashBackPromotion) SetDetailsValue(v *promotion.ValueCashBack) error
设置详细的促销信息
type Coupon ¶
type Coupon struct { *Promotion // contains filtered or unexported fields }
优惠券,一张优惠券有数量,对应唯一的促销码。 优惠内容包含:送金额,送积分,订单折扣。仅在消费时有效。 使用需要达到最低金额和最低等级。 优惠券包含了开始时间和结束时间,超出时间则过期。 优惠券可以设置启用和停用 是否允许绑定,如果不绑定。则可以任意使用.只要有绑定和使用后,就不允许修改此属性。
func (*Coupon) GetBind ¶
func (this *Coupon) GetBind(memberId int) (*promotion.ValueCouponBind, error)
获取绑定
func (*Coupon) GetBinds ¶
func (this *Coupon) GetBinds() []promotion.ValueCouponBind
func (*Coupon) GetCouponFee ¶
获取优惠的金额(四舍五入)
func (*Coupon) GetDomainId ¶
func (*Coupon) GetTake ¶
func (this *Coupon) GetTake(memberId int) (*promotion.ValueCouponTake, error)
获取占用
func (*Coupon) GetTakes ¶
func (this *Coupon) GetTakes() []promotion.ValueCouponTake
func (*Coupon) SetDetailsValue ¶
func (this *Coupon) SetDetailsValue(v *promotion.ValueCoupon) error
设置促销内容
Click to show internal directories.
Click to hide internal directories.