初始化项目
This commit is contained in:
7
init.go
7
init.go
@@ -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(), "路由初始化完成")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user