调试平台手续费分润退款

This commit is contained in:
luofei 2023-05-27 10:40:45 +08:00
parent 7d9aaeda1e
commit cdef3b8d84

View File

@ -42,6 +42,7 @@ class AfterRefund
$merchant->is_margin = MerchantRepository::NeedMargin;
}
$merchant->save();
$this->addMoney($financialRecord);
$this->saveFinanceRecord($financialRecord);
}
}
@ -56,6 +57,14 @@ class AfterRefund
$merchantRepository->subLockMoney($financialRecord['mer_id'], 'order', $this->refundOrder['order_id'], (float)$financialRecord['number']);
}
public function addMoney($financialRecord)
{
Log::info("refundCommission, mer_id: {$financialRecord['mer_id']}, money: {$financialRecord['number']}");
/** @var MerchantRepository $merchantRepository */
$merchantRepository = app()->make(MerchantRepository::class);
$merchantRepository->addMoney($financialRecord['mer_id'], (float)$financialRecord['number']);
}
public function saveFinanceRecord($financialRecord)
{
/** @var FinancialRecordRepository $financialRecordRepository */