This commit is contained in:
liangzai 2025-05-06 22:27:23 +08:00
parent 7e85016068
commit 20c96d1a40

View File

@ -268,7 +268,17 @@ func (l *AgentWithdrawalLogic) updateWithdrawalStatus(outBizNo string, status in
return err
}
}
if status == StatusSuccess {
wallet, err := l.svcCtx.AgentWalletModel.FindOneByAgentId(ctx, record.AgentId)
if err != nil {
return err
}
wallet.FrozenBalance -= record.Amount
if err := l.svcCtx.AgentWalletModel.UpdateWithVersion(ctx, session, wallet); err != nil {
return err
}
}
return nil
})