From 65818173ad6b554926a1e7e54722e63382db6e98 Mon Sep 17 00:00:00 2001 From: weigang Date: Mon, 26 Oct 2020 11:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E8=B4=A6=E6=97=B6=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E9=87=91=E9=A2=9D=E4=B8=BA0=E5=88=99=E4=B8=8D?= =?UTF-8?q?=E8=AE=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/FinancialRecordService.php | 6 ++++++ 1 file changed, 6 insertions(+) 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) {