收口审计治理与套餐任务进展
Constraint: 在线热修前必须保存当前迭代分支全部有效代码进展 Confidence: medium Scope-risk: broad Directive: 后续修改需保持审计事件与业务事务边界一致 Tested: git diff --cached --check Not-tested: 未运行全量测试,提交用于切换分支前保存既有工作
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/internal/service/commission_calculation"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/auditcontext"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -46,6 +48,10 @@ func (h *CommissionCalculationHandler) HandleCommissionCalculation(ctx context.C
|
||||
)
|
||||
return asynq.SkipRetry
|
||||
}
|
||||
ctx = auditcontext.With(ctx, auditcontext.Context{
|
||||
ActorKind: constants.AuditActorSystemTask, ActorID: constants.AuditActorIDCommissionCalculationWorker,
|
||||
ActorName: "订单佣金计算任务", Source: constants.AuditSourceWorker,
|
||||
})
|
||||
|
||||
if err := h.service.CalculateCommission(ctx, payload.OrderID); err != nil {
|
||||
h.logger.Error("佣金计算失败",
|
||||
|
||||
Reference in New Issue
Block a user