|
@@ -181,7 +181,7 @@ func (m *ClientPayTrans) GetPayTransSuccessByMerchantID(pageSize int, pageIndex
|
|
|
|
|
|
}
|
|
|
|
|
|
-func (m *ClientPayTrans) SettleAdd(merchantAmount, clientAmount decimal.Decimal, merchantOpenId, clientOpenId string) error {
|
|
|
+func (m *ClientPayTrans) SettleAdd(merchantAmount, clientAmount decimal.Decimal, merchantOpenId, clientOpenId string, payTransId int64) error {
|
|
|
// 使用事务 添加
|
|
|
var err error
|
|
|
var clientAccount MerchantClientAccount
|
|
@@ -256,7 +256,7 @@ func (m *ClientPayTrans) SettleAdd(merchantAmount, clientAmount decimal.Decimal,
|
|
|
merchantAccountLog.ReviewAmountAfter = merchantAccount.ReviewAmount
|
|
|
merchantAccountLog.ReviewAmountPre = merchantAccount.ReviewAmount
|
|
|
merchantAccountLog.Amount = merchantAmount
|
|
|
-
|
|
|
+ merchantAccountLog.PayTransId = payTransId
|
|
|
err = tx.Table("merchant_account_log").Create(&merchantAccountLog).Error
|
|
|
if err != nil {
|
|
|
return err
|
|
@@ -281,6 +281,7 @@ func (m *ClientPayTrans) SettleAdd(merchantAmount, clientAmount decimal.Decimal,
|
|
|
clientAccountLog.ReviewAmountAfter = clientAccount.ReviewAmount
|
|
|
clientAccountLog.ReviewAmountPre = clientAccount.ReviewAmount
|
|
|
clientAccountLog.Amount = clientAmount
|
|
|
+ clientAccountLog.PayTransId = payTransId
|
|
|
|
|
|
err = tx.Table("merchant_client_account_log").Create(&clientAccountLog).Error
|
|
|
if err != nil {
|