services

package
v0.0.0-...-deffa86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartService

type CartService struct {
	CartDAO dao.CartDAO
}

func (*CartService) AddCart

func (c *CartService) AddCart(cart *models.Cart) (int64, error)

func (*CartService) DeleteCart

func (c *CartService) DeleteCart(userId int64) error

func (*CartService) FindAll

func (c *CartService) FindAll(UserId int64) ([]*models.Cart, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL