优化功能,通知功能,任务功能

This commit is contained in:
PandaGoAdmin
2021-12-24 16:50:06 +08:00
parent d71b0154f6
commit 816791f148
31 changed files with 521 additions and 72 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"pandax/apps/job/jobs"
"pandax/base/config"
"pandax/base/ctx"
"pandax/base/global"
@@ -12,8 +13,16 @@ import (
func main() {
global.Db = starter.GormInit(config.Conf.Server.DbType)
initialize.InitTable()
// gin后置 函数
ctx.UseAfterHandlerInterceptor(middleware.OperationHandler)
// gin前置 函数
ctx.UseBeforeHandlerInterceptor(ctx.PermissionHandler)
// gin后置 函数
ctx.UseAfterHandlerInterceptor(ctx.LogHandler)
go func() {
// 启动系统调度任务
jobs.InitJob()
jobs.Setup()
}()
starter.RunWebServer(initialize.InitRouter())
}