gomod引用

This commit is contained in:
2025-12-12 18:16:28 +08:00
parent a4ba4dd715
commit 465c138f21
11 changed files with 340 additions and 403 deletions

19
main.go
View File

@@ -2,30 +2,27 @@ package main
import (
"context"
"order/controller"
"gitee.com/red-future---jilin-g/common/http"
"gitee.com/red-future---jilin-g/common/jaeger"
_ "gitee.com/red-future---jilin-g/common/mongo"
_ "gitee.com/red-future---jilin-g/common/ragflow" // RAGFlow 客户端自动初始化
_ "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,
controller.PaymentConfig,
})
// 启动订单统计定时任务调度器
//ctx := context.Background()
//if err := scheduler.OrderStatisticsSchedulerInstance.StartScheduler(ctx); err != nil {
// g.Log().Errorf(ctx, "启动订单统计定时任务失败: %v", err)
//}
select {}
}