Documentation ¶
Overview ¶
* @Author: lihuan * @Date: 2021-12-19 15:43:06 * @LastEditors: lihuan * @LastEditTime: 2021-12-23 21:16:46 * @Email: 17719495105@163.com
Index ¶
- type ProductDao
- func (p *ProductDao) DeleteProduct(id int64) error
- func (p *ProductDao) GetBanner() ([]*models.Banner, error)
- func (p *ProductDao) GetProduct(id int64) (*models.Product, error)
- func (p *ProductDao) GetProductList() ([]*models.Product, error)
- func (p *ProductDao) IncrementProduct(product *models.Product) error
- func (p *ProductDao) UpdateProduct(product *models.Product) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductDao ¶
type ProductDao struct {
// contains filtered or unexported fields
}
func NewProductDao ¶
func NewProductDao(ctx context.Context, db *gorm.DB) *ProductDao
func (*ProductDao) GetProduct ¶
func (p *ProductDao) GetProduct(id int64) (*models.Product, error)
获取商品
func (*ProductDao) GetProductList ¶
func (p *ProductDao) GetProductList() ([]*models.Product, error)
获取商品列表
func (*ProductDao) IncrementProduct ¶
func (p *ProductDao) IncrementProduct(product *models.Product) error
新增商品
func (*ProductDao) UpdateProduct ¶
func (p *ProductDao) UpdateProduct(product *models.Product) error
更新商品
Click to show internal directories.
Click to hide internal directories.