diff --git a/app/Service/v3/Implementations/FinancialRecordService.php b/app/Service/v3/Implementations/FinancialRecordService.php index c9343e0..46160d3 100644 --- a/app/Service/v3/Implementations/FinancialRecordService.php +++ b/app/Service/v3/Implementations/FinancialRecordService.php @@ -32,6 +32,12 @@ class FinancialRecordService implements FinancialRecordServiceInterface public function record($user_id, $record, $isLedger=false) { + + // 如果金额不存在或者金额为0时,不记账 + if (!isset($record['money']) || !boolval($record['money'])) { + return true; + } + $financialRecord = new FinancialRecord(); if (!$isLedger) {