Documentation
¶
Overview ¶
*
- Copyright 2015 @ z3q.net.
- name : cash_back
- author : jarryliu
- date : -- :
- description :
- history :
*
- Copyright 2015 @ z3q.net.
- name : log_info
- author : jarryliu
- date : -- :
- description :
- history :
*
- Copyright 2015 @ z3q.net.
- name : util
- author : jarryliu
- date : -- :
- description :
- history :
Index ¶
- Variables
- func HandleCashBackDataTag(m member.IMember, order *shopping.ValueOrder, c promotion.ICashBackPromotion, ...)
- func NewShopping(partnerId int, partnerRep partner.IPartnerRep, rep shopping.IShoppingRep, ...) shopping.IShopping
- type Cart
- func (this *Cart) AddItem(goodsId, num int) (*shopping.ValueCartItem, error)
- func (this *Cart) Combine(c shopping.ICart) (shopping.ICart, error)
- func (this *Cart) Destroy() (err error)
- func (this *Cart) GetCartGoods() []sale.IGoods
- func (this *Cart) GetDomainId() int
- func (this *Cart) GetFee() (totalFee float32, orderFee float32)
- func (this *Cart) GetJsonItems() []byte
- func (this *Cart) GetSettleData() (s partner.IShop, d member.IDeliver, paymentOpt, deliverOpt int)
- func (this *Cart) GetSummary() string
- func (this *Cart) GetValue() shopping.ValueCart
- func (this *Cart) RemoveItem(goodsId, num int) error
- func (this *Cart) Save() (int, error)
- func (this *Cart) SetBuyer(buyerId int) error
- func (this *Cart) SettlePersist(shopId, paymentOpt, deliverOpt, deliverId int) error
- type Order
- func (this *Order) AddRemark(remark string)
- func (this *Order) AppendLog(t enum.OrderLogType, system bool, message string) error
- func (this *Order) ApplyCoupon(coupon promotion.ICouponPromotion) error
- func (this *Order) Cancel(reason string) error
- func (this *Order) CmPaymentWithBalance() error
- func (this *Order) Complete() error
- func (this *Order) Confirm() error
- func (this *Order) Deliver() error
- func (this *Order) GetAvailableOrderPromotions() []promotion.IPromotion
- func (this *Order) GetBestSavePromotion() (p promotion.IPromotion, saveFee float32, integral int)
- func (this *Order) GetCoupons() []promotion.ICouponPromotion
- func (this *Order) GetDomainId() int
- func (this *Order) GetOrderNo() string
- func (this *Order) GetPaymentFee() float32
- func (this *Order) GetPromotionBinds() []*shopping.OrderPromotionBind
- func (this *Order) GetValue() shopping.ValueOrder
- func (this *Order) IsOver() bool
- func (this *Order) PaymentForOnlineTrade(serverProvider string, tradeNo string) error
- func (this *Order) PaymentWithBalance() error
- func (this *Order) Process() error
- func (this *Order) Save() (int, error)
- func (this *Order) SetDeliver(deliverAddressId int) error
- func (this *Order) SetPayment(payment int)
- func (this *Order) SetShop(shopId int) error
- func (this *Order) SignReceived() error
- func (this *Order) Submit() (string, error)
- func (this *Order) Suspend(reason string) error
- func (this *Order) UseBalanceDiscount()
- type Shopping
- func (this *Shopping) BindCartBuyer(cartKey string, buyerId int) error
- func (this *Shopping) BuildOrder(memberId int, couponCode string) (shopping.IOrder, shopping.ICart, error)
- func (this *Shopping) CheckCart(cart shopping.ICart) error
- func (this *Shopping) CreateOrder(val *shopping.ValueOrder, cart shopping.ICart) shopping.IOrder
- func (this *Shopping) GetAggregateRootId() int
- func (this *Shopping) GetCartByKey(key string) (shopping.ICart, error)
- func (this *Shopping) GetCurrentCart(buyerId int) (shopping.ICart, error)
- func (this *Shopping) GetFreeOrderNo() string
- func (this *Shopping) GetOrderByNo(orderNo string) (shopping.IOrder, error)
- func (this *Shopping) GetShoppingCart(buyerId int, cartKey string) shopping.ICart
- func (this *Shopping) NewCart(buyerId int) shopping.ICart
- func (this *Shopping) OrderAutoSetup(f func(error))
- func (this *Shopping) ParseShoppingCart(memberId int) (shopping.IOrder, member.IMember, shopping.ICart, error)
- func (this *Shopping) SmartChoiceShop(address string) (partner.IShop, error)
- func (this *Shopping) SmartConfirmOrder(order shopping.IOrder) error
- func (this *Shopping) SubmitOrder(memberId int, couponCode string, useBalanceDiscount bool) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EXP_BIT float32
)
Functions ¶
func HandleCashBackDataTag ¶
func HandleCashBackDataTag(m member.IMember, order *shopping.ValueOrder, c promotion.ICashBackPromotion, memberRep member.IMemberRep)
func NewShopping ¶
func NewShopping(partnerId int, partnerRep partner.IPartnerRep, rep shopping.IShoppingRep, saleRep sale.ISaleRep, goodsRep sale.IGoodsRep, promRep promotion.IPromotionRep, memberRep member.IMemberRep, deliveryRep delivery.IDeliveryRep) shopping.IShopping
Types ¶
type Cart ¶
type Cart struct {
// contains filtered or unexported fields
}
func (*Cart) AddItem ¶
func (this *Cart) AddItem(goodsId, num int) (*shopping.ValueCartItem, error)
添加项
func (*Cart) GetDomainId ¶
func (*Cart) GetSettleData ¶
获取结算数据
func (*Cart) SettlePersist ¶
结算数据持久化
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
func (*Order) ApplyCoupon ¶
func (this *Order) ApplyCoupon(coupon promotion.ICouponPromotion) error
应用优惠券
func (*Order) GetAvailableOrderPromotions ¶
func (this *Order) GetAvailableOrderPromotions() []promotion.IPromotion
获取可用的促销,不包含优惠券
func (*Order) GetBestSavePromotion ¶
func (this *Order) GetBestSavePromotion() (p promotion.IPromotion, saveFee float32, integral int)
获取最省的促销
func (*Order) GetDomainId ¶
func (*Order) GetPromotionBinds ¶
func (this *Order) GetPromotionBinds() []*shopping.OrderPromotionBind
获取促销绑定
func (*Order) GetValue ¶
func (this *Order) GetValue() shopping.ValueOrder
func (*Order) PaymentForOnlineTrade ¶
在线交易支付
type Shopping ¶
type Shopping struct {
// contains filtered or unexported fields
}
func (*Shopping) BindCartBuyer ¶
绑定购物车会员编号
func (*Shopping) BuildOrder ¶
func (this *Shopping) BuildOrder(memberId int, couponCode string) (shopping.IOrder, shopping.ICart, error)
生成订单
func (*Shopping) CreateOrder ¶
func (*Shopping) GetAggregateRootId ¶
func (*Shopping) GetCartByKey ¶
根据数据获取购物车
func (*Shopping) GetCurrentCart ¶
获取没有结算的购物车
func (*Shopping) GetFreeOrderNo ¶
func (*Shopping) GetOrderByNo ¶
func (*Shopping) GetShoppingCart ¶
func (*Shopping) ParseShoppingCart ¶
func (this *Shopping) ParseShoppingCart(memberId int) (shopping.IOrder, member.IMember, shopping.ICart, error)
将购物车转换为订单
func (*Shopping) SmartChoiceShop ¶
智能选择门店
func (*Shopping) SmartConfirmOrder ¶
Click to show internal directories.
Click to hide internal directories.