From c5e3650679f45b58d175445cfeecd9b164bbc491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 26 Mar 2021 16:31:40 +0800 Subject: [PATCH] Update UserRebateService.php --- app/data/service/UserRebateService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/data/service/UserRebateService.php b/app/data/service/UserRebateService.php index b4f5c6f72..a83f20863 100644 --- a/app/data/service/UserRebateService.php +++ b/app/data/service/UserRebateService.php @@ -23,7 +23,9 @@ class UserRebateService extends Service $count = $this->app->db->name('DataUserTransfer')->whereRaw("uid='{$uuid}' and status>0")->sum('amount'); $total = $this->app->db->name('DataUserRebate')->whereRaw("uid='{$uuid}' and status=1 and deleted=0")->sum('amount'); $locks = $this->app->db->name('DataUserRebate')->whereRaw("uid='{$uuid}' and status=0 and deleted=0")->sum('amount'); - $this->app->db->name('DataUser')->where(['id' => $uuid])->update(['rebate_total' => $total, 'rebate_used' => $count, 'rebate_lock' => $locks]); + $this->app->db->name('DataUser')->where(['id' => $uuid])->update([ + 'rebate_total' => $total, 'rebate_used' => $count, 'rebate_lock' => $locks, + ]); } else { $count = $this->app->db->name('DataUserTransfer')->whereRaw("status>0")->sum('amount'); $total = $this->app->db->name('DataUserRebate')->whereRaw("status=1 and deleted=0")->sum('amount');