19 lines
685 B
Go
19 lines
685 B
Go
package app
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
type OrderRouter struct{}
|
|
|
|
// InitOrderRouter 初始化订单路由
|
|
func (r *OrderRouter) InitOrderRouter(AppRouter *gin.RouterGroup) {
|
|
appRouter := AppRouter.Group("app_order")
|
|
{
|
|
appRouter.POST("", orderApi.CreateOrder) // 创建订单
|
|
appRouter.POST("/wechat/pay", orderApi.PayOrder) // 微信支付订单
|
|
appRouter.GET("/list", orderApi.GetOrderList) // 获取订单列表
|
|
appRouter.GET(":id", orderApi.GetOrderDetail) // 获取订单详情
|
|
appRouter.POST("/balance/pay", orderApi.BalancePay) // 余额支付
|
|
appRouter.POST("/notify", orderApi.NotifyOrder) // 微信支付回调通知
|
|
}
|
|
}
|