|
|
@@ -77,8 +77,6 @@ class WorkerAccountLogLogic extends BaseLogic
|
|
|
break;
|
|
|
// 其他
|
|
|
}
|
|
|
- $worker->user_money = $left_amount + ($action==1?$changeAmount:-$changeAmount);
|
|
|
- $worker->save();
|
|
|
$data = [
|
|
|
'sn' => generate_sn(MasterWorkerAccountLog::class, 'sn', 20),
|
|
|
'title'=>$title,
|
|
|
@@ -86,12 +84,15 @@ class WorkerAccountLogLogic extends BaseLogic
|
|
|
'change_object' => $changeObject,
|
|
|
'change_type' => $changeType,
|
|
|
'action' => $action,
|
|
|
- 'left_amount' => $worker->user_money,
|
|
|
+ 'left_amount' => $left_amount,
|
|
|
'change_amount' => $changeAmount,
|
|
|
'work_sn' => '',
|
|
|
'remark' => $remark,
|
|
|
'extra' => $extra ? json_encode($extra, JSON_UNESCAPED_UNICODE) : '',
|
|
|
];
|
|
|
+
|
|
|
+ $worker->user_money = $left_amount + ($action==1?$changeAmount:-$changeAmount);
|
|
|
+ $worker->save();
|
|
|
return MasterWorkerAccountLog::create($data);
|
|
|
}
|
|
|
}
|