gomod引用

This commit is contained in:
2025-12-12 16:20:47 +08:00
parent 0393931e91
commit a4ba4dd715
27 changed files with 2886 additions and 87 deletions

11
main.go
View File

@@ -9,12 +9,23 @@ import (
_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
_ "github.com/gogf/gf/contrib/nosql/redis/v2"
"order/controller"
"order/scheduler"
"github.com/gogf/gf/v2/frame/g"
)
func main() {
defer jaeger.ShutDown(context.Background())
// 启动订单统计定时任务调度器
ctx := context.Background()
if err := scheduler.OrderStatisticsSchedulerInstance.StartScheduler(ctx); err != nil {
g.Log().Errorf(ctx, "启动订单统计定时任务失败: %v", err)
}
http.RouteRegister([]interface{}{
controller.Order,
controller.OrderStatistics,
})
select {}
}