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