Documentation ¶
Index ¶
- type CartService
- func (c *CartService) AddCart(cart *models.Cart) (int64, error)
- func (c *CartService) DeleteCart(userId int64) error
- func (c *CartService) FindAll(UserId int64) ([]*models.Cart, error)
- func (c *CartService) FindAllByUserIdForCheckout(userid int64) ([]*models.Cart, error)
- func (c *CartService) FindCartByUserIDandSKUID(userid, skuid string) (*models.Cart, error)
- func (c *CartService) UpdateCart(cart *models.Cart) (int64, error)
- type CartServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartService ¶
func (*CartService) DeleteCart ¶
func (c *CartService) DeleteCart(userId int64) error
func (*CartService) FindAllByUserIdForCheckout ¶
func (c *CartService) FindAllByUserIdForCheckout(userid int64) ([]*models.Cart, error)
FindAllByUserIdForCheckout 根据userid 获取status为0的商品
func (*CartService) FindCartByUserIDandSKUID ¶
func (c *CartService) FindCartByUserIDandSKUID(userid, skuid string) (*models.Cart, error)
func (*CartService) UpdateCart ¶
func (c *CartService) UpdateCart(cart *models.Cart) (int64, error)
type CartServiceInterface ¶
type CartServiceInterface interface { AddCart(*models.Cart) (int64, error) DeleteCart(int64) error UpdateCart(*models.Cart) (int64, error) FindCartByUserIDandSKUID(userid, skuid string) (*models.Cart, error) FindAll(int64) ([]*models.Cart, error) FindAllByUserIdForCheckout(userid int64) ([]*models.Cart, error) }
func NewCartService ¶
func NewCartService(dao *dao.CartDAO) CartServiceInterface
Click to show internal directories.
Click to hide internal directories.