service

package
v0.0.0-...-d5996f0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOrderService

type IOrderService interface {
	// 入参订单id
	GetOrderById(int64) (*model.Order, error)
	DeleteOrderById(int64) bool
	UpdateOrder(*model.Order) error
	// 出参订单id
	InsertOrder(*model.Order) (int64, error)
	GetAllOrder() ([]*model.Order, error)
	GetAllOrderInfo() (map[int]map[string]string, error)
	// 让rabbitmq消费端调用 创建订单 返回订单id
	InsertOrderByMessage(*model.Message) (int64, error)
}

func NewOrderService

func NewOrderService(dao dao.IOrder) IOrderService

type IProductService

type IProductService interface {
	// 入参商品id
	GetProductById(int64) (*model.Product, error)
	GetAllProduct() ([]*model.Product, error)
	DeleteProductById(int64) bool
	// 返回插入商品的id
	InsertProduct(product *model.Product) (int64, error)
	UpdateProduct(product *model.Product) error
	// 让rabbitmq消费端调用 扣除商品数量
	SubNumberOne(productID int64) error
}

func NewProductService

func NewProductService(dao dao.IProduct) IProductService

type IUserService

type IUserService interface {
	IsPwdSuccess(userName string, pwd string) (user *model.User, isOk bool)
	AddUser(user *model.User) (userId int64, err error)
}

func NewUserService

func NewUserService(dao dao.IUser) IUserService

type OrderService

type OrderService struct {
	// contains filtered or unexported fields
}

func (*OrderService) DeleteOrderById

func (o *OrderService) DeleteOrderById(orderID int64) bool

func (*OrderService) GetAllOrder

func (o *OrderService) GetAllOrder() ([]*model.Order, error)

func (*OrderService) GetAllOrderInfo

func (o *OrderService) GetAllOrderInfo() (map[int]map[string]string, error)

func (*OrderService) GetOrderById

func (o *OrderService) GetOrderById(orderID int64) (order *model.Order, err error)

func (*OrderService) InsertOrder

func (o *OrderService) InsertOrder(order *model.Order) (orderID int64, err error)

func (*OrderService) InsertOrderByMessage

func (o *OrderService) InsertOrderByMessage(message *model.Message) (orderID int64, err error)

让rabbitmq消费端调用 创建订单 返回订单id

func (*OrderService) UpdateOrder

func (o *OrderService) UpdateOrder(order *model.Order) error

type ProductService

type ProductService struct {
	// contains filtered or unexported fields
}

func (*ProductService) DeleteProductById

func (p *ProductService) DeleteProductById(productID int64) bool

func (*ProductService) GetAllProduct

func (p *ProductService) GetAllProduct() ([]*model.Product, error)

func (*ProductService) GetProductById

func (p *ProductService) GetProductById(productID int64) (*model.Product, error)

func (*ProductService) InsertProduct

func (p *ProductService) InsertProduct(product *model.Product) (int64, error)

func (*ProductService) SubNumberOne

func (p *ProductService) SubNumberOne(productID int64) error

让rabbitmq消费端调用 扣除商品数量

func (*ProductService) UpdateProduct

func (p *ProductService) UpdateProduct(product *model.Product) error

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func (*UserService) AddUser

func (u *UserService) AddUser(user *model.User) (userId int64, err error)

func (*UserService) IsPwdSuccess

func (u *UserService) IsPwdSuccess(userName string, pwd string) (user *model.User, isOk bool)

Jump to

Keyboard shortcuts

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