Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommodityCase ¶
func NewCommodityCase(db repository.CommodityDB, svc *service.CommodityService, cache repository.CommodityCache, mq repository.CommodityMQ, es repository.CommodityElastic, ) *useCase
Types ¶
type CommodityUseCase ¶
type CommodityUseCase interface { CreateCategory(ctx context.Context, category *model.Category) (int64, error) DeleteCategory(ctx context.Context, category *model.Category) (err error) UpdateCategory(ctx context.Context, category *model.Category) (err error) ViewCategory(ctx context.Context, pageNum, pageSize int) (resp []*kmodel.CategoryInfo, err error) CreateSpu(ctx context.Context, spu *model.Spu) (id int64, err error) CreateSpuImage(ctx context.Context, spuImage *model.SpuImage) (int64, error) DeleteSpu(ctx context.Context, spuId int64) error UpdateSpu(ctx context.Context, spu *model.Spu) error UpdateSpuImage(ctx context.Context, spuImage *model.SpuImage) error DeleteSpuImage(ctx context.Context, imageId int64) error ViewSpuImages(ctx context.Context, spuId int64, offset, limit int) ([]*model.SpuImage, int64, error) ViewSpus(ctx context.Context, req *commodity.ViewSpuReq) ([]*model.Spu, int64, error) }
Click to show internal directories.
Click to hide internal directories.