Documentation ¶
Index ¶
- func NewPromotion(partnerId int, promRep promotion.IPromotionRep, memberRep member.IMemberRep) promotion.IPromotion
- 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) GetDomainId() int
- func (this *Coupon) GetTake(memberId int) (*promotion.ValueCouponTake, error)
- func (this *Coupon) GetTakes() []promotion.ValueCouponTake
- func (this *Coupon) GetValue() promotion.ValueCoupon
- func (this *Coupon) Save() (id int, err error)
- func (this *Coupon) SetValue(v *promotion.ValueCoupon) error
- func (this *Coupon) Take(memberId int) error
- func (this *Coupon) UseCoupon(couponBindId int) error
- type Promotion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPromotion ¶
func NewPromotion(partnerId int, promRep promotion.IPromotionRep, memberRep member.IMemberRep) promotion.IPromotion
Types ¶
type Coupon ¶
type Coupon struct {
// 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) GetValue ¶
func (this *Coupon) GetValue() promotion.ValueCoupon
type Promotion ¶
type Promotion struct {
// contains filtered or unexported fields
}
func (*Promotion) CreateCoupon ¶
func (this *Promotion) CreateCoupon(val *promotion.ValueCoupon) promotion.ICoupon
func (*Promotion) GetAggregateRootId ¶
Click to show internal directories.
Click to hide internal directories.