Files
observer/server/biz/controller/order.go
T

29 lines
749 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package controller
import (
"context"
"observer-server/biz/model/dto"
"observer-server/biz/service"
)
// cOrder 订单接口:薄透传,组装在 service
type cOrder struct{}
var Order = &cOrder{}
// ListPlans 套餐列表(config.yml plans
func (c *cOrder) ListPlans(ctx context.Context, req *dto.ListPlansReq) (*dto.ListPlansRes, error) {
return service.Order.ListPlans(ctx, req)
}
// Create 创建支付订单
func (c *cOrder) Create(ctx context.Context, req *dto.CreateOrderReq) (*dto.CreateOrderRes, error) {
return service.Order.Create(ctx, req)
}
// Confirm 确认支付结果
func (c *cOrder) Confirm(ctx context.Context, req *dto.ConfirmOrderReq) (*dto.ConfirmOrderRes, error) {
return service.Order.Confirm(ctx, req)
}