feat: 实现平台抽成、提现审批、异步任务集成及安全审计功能

This commit is contained in:
2025-12-30 14:54:19 +08:00
parent 5e8dbec806
commit ee1acae3ed
25 changed files with 985 additions and 60 deletions

View File

@@ -0,0 +1,24 @@
package services
import (
"context"
"quyun/v2/pkg/consts"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
)
// @provider
type audit struct{}
func (s *audit) Log(ctx context.Context, action, targetID, detail string) {
operatorID := cast.ToInt64(ctx.Value(consts.CtxKeyUser))
logrus.WithFields(logrus.Fields{
"audit": true,
"operator": operatorID,
"action": action,
"target": targetID,
"detail": detail,
}).Info("Audit Log")
}