mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 05:12:32 +08:00
This commit is contained in:
@@ -32,7 +32,6 @@ func Init(ctx context.Context) {
|
||||
g.Log().Fatal(ctx, "配置读取异常:", err, "\r\n你确定 config/config.yaml 文件存在且格式正确吗?\r\n")
|
||||
return
|
||||
}
|
||||
//g.SetDebug(debug.Bool())
|
||||
|
||||
// 默认上海时区
|
||||
if err = gtime.SetTimeZone("Asia/Shanghai"); err != nil {
|
||||
@@ -55,6 +54,12 @@ func Init(ctx context.Context) {
|
||||
// 加载ip访问黑名单
|
||||
service.SysBlacklist().Load(ctx)
|
||||
|
||||
// 初始化功能库配置
|
||||
service.SysConfig().InitConfig(ctx)
|
||||
|
||||
// 注册支付成功回调方法
|
||||
payNotifyCall()
|
||||
|
||||
// 初始化生成代码配置
|
||||
hggen.InIt(ctx)
|
||||
}
|
||||
|
13
server/internal/global/pay.go
Normal file
13
server/internal/global/pay.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package global
|
||||
|
||||
import (
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/library/payment"
|
||||
"hotgo/internal/service"
|
||||
)
|
||||
|
||||
// 注册支付成功回调方法
|
||||
func payNotifyCall() {
|
||||
payment.RegisterNotifyCall(consts.OrderGroupAdminOrder, service.AdminOrder().PayNotify) // 后台充值订单
|
||||
// ...
|
||||
}
|
Reference in New Issue
Block a user