From 641cebe0edaa5377a453146f9c2fc70f31ce27fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 21 May 2021 13:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/data/service/RebateService.php | 2 +- app/data/service/UserRebateService.php | 4 +--- vendor/services.php | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/data/service/RebateService.php b/app/data/service/RebateService.php index dbc4a0269..3bdaff924 100644 --- a/app/data/service/RebateService.php +++ b/app/data/service/RebateService.php @@ -77,7 +77,7 @@ class RebateService extends Service $this->order = $this->app->db->name('ShopOrder')->where($map)->find(); if (empty($this->order)) throw new Exception('订单不存在'); if ($this->order['payment_type'] === 'balance') return; - //throw new Exception('余额支付不反利'); + // throw new Exception('余额支付不反利'); // 检查订单参与返利 if ($this->order['amount_total'] <= 0) throw new Exception('订单金额为零'); if ($this->order['rebate_amount'] <= 0) throw new Exception('订单返利为零'); diff --git a/app/data/service/UserRebateService.php b/app/data/service/UserRebateService.php index a83f20863..b4f5c6f72 100644 --- a/app/data/service/UserRebateService.php +++ b/app/data/service/UserRebateService.php @@ -23,9 +23,7 @@ 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'); diff --git a/vendor/services.php b/vendor/services.php index ac50b2872..5a9119d8a 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library',