模块化定时任务,方便在插件中注册任务;增加日志分组

This commit is contained in:
孟帅
2023-06-05 20:14:57 +08:00
parent 62ecbb7f26
commit 48f8c20d9c
79 changed files with 820 additions and 783 deletions

View File

@@ -29,6 +29,13 @@ func RegisterNotifyCall(group string, f NotifyCallFunc) {
notifyCall[group] = f
}
// RegisterNotifyCallMap 注册支付成功回调方法
func RegisterNotifyCallMap(calls map[string]NotifyCallFunc) {
for group, f := range calls {
RegisterNotifyCall(group, f)
}
}
// NotifyCall 执行订单分组的异步回调
func NotifyCall(ctx context.Context, in payin.NotifyCallFuncInp) {
f, ok := notifyCall[in.Pay.OrderGroup]