order

package
v0.0.0-...-f0a2dc7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Epay            = "epay"
	AlipayF2f       = "alipay_f2f"
	StripeAlipay    = "stripe_alipay"
	StripeWeChatPay = "stripe_wechat_pay"
	Balance         = "balance"
)
View Source
const (
	CloseOrderTimeMinutes = 15
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseOrderLogic

type CloseOrderLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewCloseOrderLogic

func NewCloseOrderLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CloseOrderLogic

NewCloseOrderLogic Close order

func (*CloseOrderLogic) CloseOrder

func (l *CloseOrderLogic) CloseOrder(req *types.CloseOrderRequest) error

type PreCreateOrderLogic

type PreCreateOrderLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewPreCreateOrderLogic

func NewPreCreateOrderLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PreCreateOrderLogic

NewPreCreateOrderLogic creates a new pre-create order logic instance for order preview operations. It initializes the logger with context and sets up the service context for database operations.

func (*PreCreateOrderLogic) PreCreateOrder

func (l *PreCreateOrderLogic) PreCreateOrder(req *types.PurchaseOrderRequest) (resp *types.PreOrderResponse, err error)

PreCreateOrder calculates order pricing preview including discounts, coupons, gift amounts, and fees without actually creating an order. It validates subscription plans, coupons, and payment methods to provide accurate pricing information for the frontend order preview.

type PurchaseLogic

type PurchaseLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewPurchaseLogic

func NewPurchaseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PurchaseLogic

NewPurchaseLogic creates a new purchase logic instance for subscription purchase operations. It initializes the logger with context and sets up the service context for database operations.

func (*PurchaseLogic) Purchase

Purchase processes new subscription purchase orders including validation, discount calculation, coupon processing, gift amount deduction, fee calculation, and order creation with database transaction. It handles the complete purchase workflow from user validation to order creation and task scheduling.

type QueryOrderDetailLogic

type QueryOrderDetailLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewQueryOrderDetailLogic

func NewQueryOrderDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryOrderDetailLogic

Get order

func (*QueryOrderDetailLogic) QueryOrderDetail

func (l *QueryOrderDetailLogic) QueryOrderDetail(req *types.QueryOrderDetailRequest) (resp *types.OrderDetail, err error)

type QueryOrderListLogic

type QueryOrderListLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewQueryOrderListLogic

func NewQueryOrderListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryOrderListLogic

Get order list

func (*QueryOrderListLogic) QueryOrderList

type RechargeLogic

type RechargeLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewRechargeLogic

func NewRechargeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RechargeLogic

Recharge

func (*RechargeLogic) Recharge

type RenewalLogic

type RenewalLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewRenewalLogic

func NewRenewalLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RenewalLogic

NewRenewalLogic creates a new renewal logic instance for subscription renewal operations

func (*RenewalLogic) Renewal

func (l *RenewalLogic) Renewal(req *types.RenewalOrderRequest) (resp *types.RenewalOrderResponse, err error)

Renewal processes subscription renewal orders including discount calculation, coupon validation, gift amount deduction, fee calculation, and order creation

type ResetTrafficLogic

type ResetTrafficLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func NewResetTrafficLogic

func NewResetTrafficLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ResetTrafficLogic

Reset traffic

func (*ResetTrafficLogic) ResetTraffic

Jump to

Keyboard shortcuts

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