dao

package
v0.0.0-...-8625c6b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 3 Imported by: 0

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

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) DeleteProduct

func (p *ProductDao) DeleteProduct(id int64) error

删除商品

func (*ProductDao) GetBanner

func (p *ProductDao) GetBanner() ([]*models.Banner, error)

获取轮播图

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

更新商品

Jump to

Keyboard shortcuts

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