修改注释

This commit is contained in:
邹景立 2021-05-21 13:55:07 +08:00
parent 1baab32868
commit 641cebe0ed
3 changed files with 3 additions and 5 deletions

View File

@ -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('订单返利为零');

View File

@ -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');

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2021-05-20 13:55:29
// This file is automatically generated at:2021-05-21 13:45:01
declare (strict_types = 1);
return array (
0 => 'think\\admin\\Library',