|
|
@ -32,6 +32,12 @@ class FinancialRecordService implements FinancialRecordServiceInterface |
|
|
|
|
|
|
|
|
public function record($user_id, $record, $isLedger=false) |
|
|
public function record($user_id, $record, $isLedger=false) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
// 如果金额不存在或者金额为0时,不记账
|
|
|
|
|
|
if (!isset($record['money']) || !boolval($record['money'])) { |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$financialRecord = new FinancialRecord(); |
|
|
$financialRecord = new FinancialRecord(); |
|
|
|
|
|
|
|
|
if (!$isLedger) { |
|
|
if (!$isLedger) { |
|
|
|