用户管理增加余额调账功能
支持后台加减可用余额并写入资金流水与审计,优化操作列按钮样式。
This commit is contained in:
@@ -165,6 +165,11 @@ func AppendEntries(tx *gorm.DB, entries ...Entry) error {
|
||||
}
|
||||
|
||||
func ensureAccount(tx *gorm.DB, userID uint64) error {
|
||||
return EnsureAccountTx(tx, userID)
|
||||
}
|
||||
|
||||
// EnsureAccountTx 在事务内确保用户钱包账户存在(幂等)。
|
||||
func EnsureAccountTx(tx *gorm.DB, userID uint64) error {
|
||||
account := model.WalletAccount{
|
||||
UserID: userID,
|
||||
AvailableBalanceCent: 0,
|
||||
|
||||
Reference in New Issue
Block a user