domain

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoodsService

type GoodsService struct {
	Worker           freedom.Worker
	GoodsRepo        *repository.GoodsRepository
	EventTransaction *domainevent.EventTransaction //事务组件
}

GoodsService .

func (*GoodsService) Get

func (srv *GoodsService) Get(ID int) (rep vo.GoodsRep, e error)

Get .

func (*GoodsService) GetAll

func (srv *GoodsService) GetAll() (result []vo.GoodsRep, e error)

GetAll .

func (*GoodsService) ShopEvent added in v1.8.6

func (srv *GoodsService) ShopEvent(shopEvent *event.ShopGoods) error

ShopEvent .

type OrderService

type OrderService struct {
	Worker           freedom.Worker
	GoodsRepo        *repository.GoodsRepository
	OrderRepo        *repository.OrderRepository
	EventTransaction *domainevent.EventTransaction //事务组件
}

OrderService .

func (*OrderService) Get

func (srv *OrderService) Get(ID, userID int) (result vo.OrderRep, e error)

Get .

func (*OrderService) GetAll

func (srv *OrderService) GetAll(userID int) (result []vo.OrderRep, e error)

GetAll .

func (*OrderService) Shop added in v1.8.6

func (srv *OrderService) Shop(goodsID, num, userID int) (e error)

Shop 这不是一个正确的示例,只是为展示领域事件和Kafka的结合, 请参考fshop的聚合根.

Directories

Path Synopsis
Package po generated by 'freedom new-po'
Package po generated by 'freedom new-po'
Package vo code generated by 'freedom new-project infra-example'
Package vo code generated by 'freedom new-project infra-example'

Jump to

Keyboard shortcuts

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