🎨 完善订单和微信支付功能

This commit is contained in:
2025-07-25 23:02:43 +08:00
parent 8fd1968cf6
commit bb2a68fb61
9 changed files with 572 additions and 41 deletions

18
router/app/order.go Normal file
View File

@@ -0,0 +1,18 @@
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) // 微信支付回调通知
}
}