enhance(calculate): 完善计算部分

This commit is contained in:
2023-08-07 15:15:11 +08:00
84 changed files with 3173 additions and 5398 deletions

View File

@@ -25,24 +25,24 @@ func init() {
}
func App() *fiber.App {
app := fiber.New(fiber.Config{
BodyLimit: 30 * 1024 * 1024,
EnablePrintRoutes: true,
EnableTrustedProxyCheck: false,
Prefork: false,
ErrorHandler: errorHandler,
JSONEncoder: json.Marshal,
JSONDecoder: json.Unmarshal,
app := fiber.New(fiber.Config{ //创建fiber实例的时候选择配置选项
BodyLimit: 30 * 1024 * 1024, //设置请求正文允许的最大大小。
EnablePrintRoutes: true, //自定义方案,用于启动消息
EnableTrustedProxyCheck: false, //禁用受信代理
Prefork: false, //禁止预处理如果要启用预处理则需要通过shell脚本运行
ErrorHandler: errorHandler, //相应全局处理错误
JSONEncoder: json.Marshal, //json编码
JSONDecoder: json.Unmarshal, //json解码
})
app.Use(compress.New())
app.Use(compress.New()) //压缩中间件
app.Use(recover.New(recover.Config{
EnableStackTrace: true,
StackTraceHandler: stackTraceHandler,
}))
})) //恢复中间件
app.Use(logger.NewLogMiddleware(logger.LogMiddlewareConfig{
Logger: logger.Named("App"),
}))
app.Use(security.SessionRecovery)
})) //日志中间件
app.Use(security.SessionRecovery) //会话恢复中间件
controller.InitializeUserHandlers(app)
controller.InitializeRegionHandlers(app)
@@ -54,6 +54,11 @@ func App() *fiber.App {
controller.InitializeTopUpHandlers(app)
controller.InitializeReportHandlers(app)
controller.InitializeWithdrawHandlers(app) // 公示撤回
controller.InitializeFoundationHandlers(app) // 基础数据
controller.InitializeStatisticsController(app) // 首页信息
controller.InitializeGmController(app) // 天神模式
return app
}