初始化项目

This commit is contained in:
2025-12-10 13:51:09 +08:00
parent 3c55577df8
commit 0486f468d6
19 changed files with 1078 additions and 1010 deletions

View File

@@ -1,13 +1,14 @@
package main
import (
"context"
"github.com/gogf/gf/v2/frame/g"
"order/service"
)
// initServices 初始化服务
func initServices() error {
return service.InitServices()
// 服务自动初始化,无需手动调用
return nil
}
// initRoutes 初始化路由
@@ -28,5 +29,5 @@ func initRoutes() {
paymentGroup.POST("/notify", "order.controller.Order.PaymentNotify")
paymentGroup.POST("/refund-notify", "order.controller.Order.RefundNotify")
g.Log().Info(g.Request().GetCtx(), "路由初始化完成")
g.Log().Info(context.Background(), "路由初始化完成")
}