Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartAddCmd ¶
添加购物车聚合根
func NewCartAddCmd ¶
func NewCartAddCmd(userRepo repository.UserRepo, cartRepo repository.CartRepo, goodsRepo repository.GoodsRepo) *CartAddCmd
NewCartAddCmd 创建添加购物车聚合根,传入相关仓库的接口
func (*CartAddCmd) LoadEntity ¶
func (cmd *CartAddCmd) LoadEntity(goodsId, userId int) error
LoadEntity 加载依赖实体
func (*CartAddCmd) Run ¶
func (cmd *CartAddCmd) Run(goodsNum int) error
type CartItemQuery ¶
购物车项查询聚合根
func NewCartItemQuery ¶
func NewCartItemQuery(userRepo repository.UserRepo, cartRepo repository.CartRepo, goodsRepo repository.GoodsRepo) *CartItemQuery
CartItemQuery 购物车项查询聚合根,传入相关仓库的接口
func (*CartItemQuery) AllItemTotalPrice ¶
func (query *CartItemQuery) AllItemTotalPrice() (totalPrice int)
AllItemTotalPrice 全部商品总价
func (*CartItemQuery) LoadEntity ¶
func (query *CartItemQuery) LoadEntity(userId int) error
LoadEntity 加载依赖实体
func (*CartItemQuery) QueryAllItem ¶
func (query *CartItemQuery) QueryAllItem() (e error)
QueryAllItem 查询购物车内全部商品
func (*CartItemQuery) VisitAllItem ¶
func (query *CartItemQuery) VisitAllItem(f func(id, goodsId int, goodsName string, goodsNum, totalPrice int))
VisitAllItem 读取全部商品
type DeliveryCmd ¶ added in v1.6.5
订单发货聚合根
func NewDeliveryCmd ¶ added in v1.6.5
func NewDeliveryCmd(adminRepo repository.AdminRepo, orderRepo repository.OrderRepo, deliveryRepo repository.DeliveryRepo, tx transaction.Transaction) *DeliveryCmd
NewDeliveryCmd 订单发货聚合根,传入相关仓库的接口
func (*DeliveryCmd) LoadEntity ¶ added in v1.6.5
func (cmd *DeliveryCmd) LoadEntity(orderNo string, adminId int) error
LoadEntity 加载依赖实体
func (*DeliveryCmd) Run ¶ added in v1.6.5
func (cmd *DeliveryCmd) Run(trackingNumber string) error
Run .
type OrderPayCmd ¶ added in v1.6.1
支付订单聚合根
func NewOrderPayCmd ¶ added in v1.6.1
func NewOrderPayCmd(userRepo repository.UserRepo, orderRepo repository.OrderRepo, tx transaction.Transaction) *OrderPayCmd
NewOrderPayCmd 订单支付聚合根,传入相关仓库的接口
func (*OrderPayCmd) LoadEntity ¶ added in v1.6.1
func (cmd *OrderPayCmd) LoadEntity(orderNo string, userId int) error
LoadEntity 加载依赖实体
type ShopCartGoodsCmd ¶ added in v1.6.1
购买商品聚合根
func NewShopCartGoodsCmd ¶ added in v1.6.1
func NewShopCartGoodsCmd(userRepo repository.UserRepo, orderRepo repository.OrderRepo, goodsRepo repository.GoodsRepo, cartRepo repository.CartRepo, tx transaction.Transaction) *ShopCartGoodsCmd
NewShopCartGoodsCmd 创建购物车购买商品聚合根,传入相关仓库的接口
func (*ShopCartGoodsCmd) LoadEntity ¶ added in v1.6.1
func (cmd *ShopCartGoodsCmd) LoadEntity(userId int) error
LoadEntity 加载依赖实体
type ShopGoodsCmd ¶
购买商品聚合根
func NewShopGoodsCmd ¶
func NewShopGoodsCmd(userRepo repository.UserRepo, orderRepo repository.OrderRepo, goodsRepo repository.GoodsRepo, tx transaction.Transaction) *ShopGoodsCmd
NewShopGoodsCmd 创建购买商品聚合根,传入相关仓库的接口
func (*ShopGoodsCmd) LoadEntity ¶
func (cmd *ShopGoodsCmd) LoadEntity(goodsId, userId int) error
LoadEntity 加载依赖实体
Click to show internal directories.
Click to hide internal directories.