Documentation
¶
Index ¶
- type CommodityService
- func (svc *CommodityService) ConsumeCreateSpuMsg(ctx context.Context)
- func (svc *CommodityService) ConsumeDeleteSpuMsg(ctx context.Context)
- func (svc *CommodityService) ConsumeUpdateSpuMsg(ctx context.Context)
- func (svc *CommodityService) CreateSpu(ctx context.Context, spu *model.Spu) (int64, error)
- func (svc *CommodityService) CreateSpuImage(ctx context.Context, spuImage *model.SpuImage) (int64, error)
- func (svc *CommodityService) DeleteAllSpuImages(ctx context.Context, spuId int64) error
- func (svc *CommodityService) DeleteSpu(ctx context.Context, spuId int64, url string) error
- func (svc *CommodityService) DeleteSpuImage(ctx context.Context, imageId int64, url string) error
- func (svc *CommodityService) GetSpuFromImageId(ctx context.Context, imageId int64) (*model.Spu, *model.SpuImage, error)
- func (svc *CommodityService) GetSpuImages(ctx context.Context, spuId int64, offset, limit int) ([]*model.SpuImage, int64, error)
- func (svc *CommodityService) IdentifyUser(ctx context.Context, uid int64) error
- func (svc *CommodityService) IdentifyUserInStreamCtx(ctx context.Context, uid int64) error
- func (svc *CommodityService) IsSpuMappingExist(ctx context.Context) error
- func (svc *CommodityService) MatchDeleteSpuCondition(ctx context.Context, spuId int64) (*model.Spu, error)
- func (svc *CommodityService) SendCreateSpuMsg(ctx context.Context, spu *model.Spu)
- func (svc *CommodityService) SendDeleteSpuMsg(ctx context.Context, id int64)
- func (svc *CommodityService) SendUpdateSpuMsg(ctx context.Context, spu *model.Spu)
- func (svc *CommodityService) UpdateSpu(ctx context.Context, spu *model.Spu, originSpu *model.Spu) error
- func (svc *CommodityService) UpdateSpuImage(ctx context.Context, spuImage *model.SpuImage, originSpuImage *model.SpuImage) error
- func (svc *CommodityService) Verify(opts ...CommodityVerifyOps) error
- func (svc *CommodityService) VerifyForSaleStatus(status int) CommodityVerifyOps
- type CommodityVerifyOps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommodityService ¶
type CommodityService struct {
// contains filtered or unexported fields
}
func NewCommodityService ¶
func NewCommodityService(db repository.CommodityDB, sf *utils.Snowflake, cache repository.CommodityCache, mq repository.CommodityMQ, es repository.CommodityElastic, ) *CommodityService
func (*CommodityService) ConsumeCreateSpuMsg ¶
func (svc *CommodityService) ConsumeCreateSpuMsg(ctx context.Context)
func (*CommodityService) ConsumeDeleteSpuMsg ¶
func (svc *CommodityService) ConsumeDeleteSpuMsg(ctx context.Context)
func (*CommodityService) ConsumeUpdateSpuMsg ¶
func (svc *CommodityService) ConsumeUpdateSpuMsg(ctx context.Context)
func (*CommodityService) CreateSpuImage ¶
func (*CommodityService) DeleteAllSpuImages ¶
func (svc *CommodityService) DeleteAllSpuImages(ctx context.Context, spuId int64) error
func (*CommodityService) DeleteSpuImage ¶
func (*CommodityService) GetSpuFromImageId ¶
func (*CommodityService) GetSpuImages ¶
func (*CommodityService) IdentifyUser ¶
func (svc *CommodityService) IdentifyUser(ctx context.Context, uid int64) error
func (*CommodityService) IdentifyUserInStreamCtx ¶
func (svc *CommodityService) IdentifyUserInStreamCtx(ctx context.Context, uid int64) error
func (*CommodityService) IsSpuMappingExist ¶
func (svc *CommodityService) IsSpuMappingExist(ctx context.Context) error
func (*CommodityService) MatchDeleteSpuCondition ¶
func (*CommodityService) SendCreateSpuMsg ¶
func (svc *CommodityService) SendCreateSpuMsg(ctx context.Context, spu *model.Spu)
func (*CommodityService) SendDeleteSpuMsg ¶
func (svc *CommodityService) SendDeleteSpuMsg(ctx context.Context, id int64)
func (*CommodityService) SendUpdateSpuMsg ¶
func (svc *CommodityService) SendUpdateSpuMsg(ctx context.Context, spu *model.Spu)
func (*CommodityService) UpdateSpuImage ¶
func (*CommodityService) Verify ¶
func (svc *CommodityService) Verify(opts ...CommodityVerifyOps) error
func (*CommodityService) VerifyForSaleStatus ¶
func (svc *CommodityService) VerifyForSaleStatus(status int) CommodityVerifyOps
type CommodityVerifyOps ¶
type CommodityVerifyOps func() error
Click to show internal directories.
Click to hide internal directories.