Documentation
¶
Overview ¶
Package userorder implements the user-facing order query subdomain of the billing module. Only the module facade may reach it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Orders ¶ added in v1.21.0
type Orders interface {
FindOneDetailsByOrderNo(ctx context.Context, orderNo string) (*order.Details, error)
QueryOrderListByPage(ctx context.Context, page, size int, status uint8, user, subscribe int64, search string) (int64, []*order.Details, error)
}
Orders reads the current user's orders.
type PlanReader ¶
type PlanReader interface {
FindOne(ctx context.Context, id int64) (*subscribeEntity.Subscribe, error)
}
PlanReader is the subdomain's read-only port onto the subscription domain's plan catalogue: the order rows only carry the plan ID, and the plan fields shown on an order detail are attached here instead of through a cross-domain SQL association (ADR-001 step 5).
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(orders Orders, plans PlanReader) *Service
func (*Service) QueryDetail ¶
func (s *Service) QueryDetail(ctx context.Context, req *dto.QueryOrderDetailRequest) (*dto.OrderDetail, error)
QueryDetail returns one of the current user's orders; ownership is enforced here and the referrer commission never leaves the module.
func (*Service) QueryList ¶
func (s *Service) QueryList(ctx context.Context, req *dto.QueryOrderListRequest) (*dto.QueryOrderListResponse, error)
Click to show internal directories.
Click to hide internal directories.