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',