Versions in this module Expand all Collapse all v0 v0.7.0 Mar 26, 2023 v0.6.0 Jan 18, 2023 Changes in this version type ICart + Bind func(buyerId int) error v0.5.0 Jan 5, 2023 v0.4.10 Jan 1, 2024 Changes in this version + type ICartAggregateRoot interface + Bind func(buyerId int) error + BuyerId func() int64 + CheckedItems func(checked map[int64][]int64) []*ItemPair + Clone func() ICartAggregateRoot + Code func() string + Destroy func() error + GetAggregateRootId func() int32 + Kind func() Kind + Prepare func() error + Put func(itemId, skuId int64, quantity int32, reset bool, checkOnly bool) error + Release func(checked map[int64][]int64) bool + Remove func(itemId, skuId int64, quantity int32) error + Save func() (int32, error) + SignItemChecked func(items []*ItemPair) error type ICartRepo + NewTempNormalCart func(buyerId int, code string) ICartAggregateRoot type RetailCartItem + FinalAmount int64 v0.4.9 Feb 10, 2022 v0.4.8 Jan 21, 2022 v0.4.4 Jan 20, 2022 v0.4.3 Dec 17, 2021 v0.4.2 Dec 16, 2021 v0.4.1 Dec 15, 2021 v0.4.0 Dec 15, 2021 Changes in this version + const FlagManualCreate + const FlagPriceEditable + var ErrCartNoBuyer = domain.NewError("err_cart_no_buyer", "购物车未绑定") + var ErrEmptyShoppingCart = domain.NewError("empty_shopping_cart", "购物车没有商品") + var ErrItemNoSku = domain.NewError("err_cart_item_no_sku", "请选择商品规格") + var ErrKindNotMatch = domain.NewError("err_cart_kind_not_match", "购物车类型不匹配") + var ErrNoChecked = domain.NewError("empty_shopping_cart_no_checked", "购物车没有结算的商品") + var ErrNoMatchItem = domain.NewError("err_cart_no_match_item", "购物车不存在该商品") + var ErrNoSuchCart = domain.NewError("empty_shopping_no_such_cart", "购物车无法使用") + type ICart interface + BuyerId func() int64 + CheckedItems func(checked map[int64][]int64) []*ItemPair + Clone func() ICart + Code func() string + Destroy func() error + GetAggregateRootId func() int32 + GetSettleData func() (s shop.IShop, d member.IDeliverAddress, paymentOpt int32) + Kind func() Kind + Prepare func() error + Put func(itemId, skuId int64, quantity int32) error + Release func(checked map[int64][]int64) bool + Remove func(itemId, skuId int64, quantity int32) error + Save func() (int32, error) + SetBuyerAddress func(addressId int64) error + SettlePersist func(shopId, paymentOpt, deliverOpt int32, addressId int64) error + SignItemChecked func(items []*ItemPair) error + Update func(itemId, skuId int64, quantity int32) error + type ICartRepo interface + BatchDeleteWsCartItem func(where string, v ...interface{}) (int64, error) + CreateNormalCart func(r *NormalCart) ICart + DeleteCart func(cartId int32) error + DeleteNormalCart func(primary interface{}) error + DeleteWsCart func(primary interface{}) error + EmptyCartItems func(cartId int32) error + GetLatestCart func(buyerId int64) *NormalCart + GetMyCart func(buyerId int64, k Kind) ICart + GetNormalCart func(id int32) ICart + GetShoppingCart func(key string) *NormalCart + GetShoppingCartByKey func(key string) ICart + NewNormalCart func(code string) ICart + RemoveCartItem func(id int32) error + SaveCartItem func(*NormalCartItem) (int32, error) + SaveNormalCart func(v *NormalCart) (int, error) + SaveShoppingCart func(*NormalCart) (int32, error) + SaveWsCart func(v *WsCart) (int, error) + SaveWsCartItem func(v *WsCartItem) (int, error) + SelectNormalCartItem func(where string, v ...interface{}) []*NormalCartItem + SelectWsCartItem func(where string, v ...interface{}) []*WsCartItem + type INormalCart interface + Combine func(ICart) ICart + GetItem func(itemId, skuId int64) *NormalCartItem + Items func() []*NormalCartItem + Value func() NormalCart + type IRetailCart interface + Items func() []RetailCartItem + ResetItems func(items []RetailCartItem) error + SetBuyer func(buyerId int) error + Value func() RetailCart + type IWholesaleCart interface + GetValue func() WsCart + Items func() []*WsCartItem + JdoData func(checkout bool, checked map[int64][]int64) *WCartJdo + QuickJdoData func(max int) string + type ItemPair struct + Checked int32 + ItemId int64 + Quantity int32 + SellerId int64 + SkuId int64 + type Kind int + const KNormal + const KRetail + const KWholesale + type NormalCart struct + BuyerId int64 + CartCode string + CreateTime int64 + DeliverId int64 + Id int32 + Items []*NormalCartItem + PaymentOpt int32 + UpdateTime int64 + type NormalCartItem struct + CartId int32 + Checked int32 + Id int32 + ItemId int64 + Quantity int32 + ShopId int64 + Sku *item.SkuMedia + SkuId int64 + VendorId int64 + type RetailCart struct + BuyerId int64 + BuyerName string + CartDesc string + CartFlag int64 + Code string + CreateTime int64 + ID int64 + PlaceId int64 + Priority int + ShopId int64 + SortNum int + TotalAmount int64 + UpdateTime int64 + VendorId int64 + type RetailCartAward struct + AwardValue int64 + CartId int64 + CartItemId int64 + ID int64 + OperatorId int64 + type RetailCartItem struct + AdjustAmount int64 + CardId int64 + CardItemId int64 + CartId int64 + Checked int + FinalFee int64 + FinalPrice int + ID int64 + ItemId int64 + ItemKind int + ItemTitle string + Quantity int + SkuId int64 + SkuText string + UnitPrice int + type WCartItemJdo struct + Data map[string]string + ItemId int64 + ItemImage string + ItemName string + Sku []WCartSkuJdo + type WCartJdo struct + Data map[string]string + Seller []WCartSellerJdo + type WCartSellerJdo struct + Data map[string]string + Item []WCartItemJdo + SellerId int64 + type WCartSkuJdo struct + CanSalesQuantity int32 + DiscountPrice int64 + JData string + Price int64 + Quantity int32 + SkuCode string + SkuId int64 + SkuImage string + SpecWord string + type WsCart struct + BuyerId int64 + Code string + CreateTime int64 + DeliverId int64 + ID int32 + Items []*WsCartItem + UpdateTime int64 + type WsCartItem struct + CartId int32 + ID int32 + ItemId int64 + Quantity int32 + SellerId int64 + ShopId int64 + Sku *item.SkuMedia + SkuId int64