mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改注释
This commit is contained in:
parent
1baab32868
commit
641cebe0ed
@ -77,7 +77,7 @@ class RebateService extends Service
|
|||||||
$this->order = $this->app->db->name('ShopOrder')->where($map)->find();
|
$this->order = $this->app->db->name('ShopOrder')->where($map)->find();
|
||||||
if (empty($this->order)) throw new Exception('订单不存在');
|
if (empty($this->order)) throw new Exception('订单不存在');
|
||||||
if ($this->order['payment_type'] === 'balance') return;
|
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['amount_total'] <= 0) throw new Exception('订单金额为零');
|
||||||
if ($this->order['rebate_amount'] <= 0) throw new Exception('订单返利为零');
|
if ($this->order['rebate_amount'] <= 0) throw new Exception('订单返利为零');
|
||||||
|
@ -23,9 +23,7 @@ class UserRebateService extends Service
|
|||||||
$count = $this->app->db->name('DataUserTransfer')->whereRaw("uid='{$uuid}' and status>0")->sum('amount');
|
$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');
|
$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');
|
$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([
|
$this->app->db->name('DataUser')->where(['id' => $uuid])->update(['rebate_total' => $total, 'rebate_used' => $count, 'rebate_lock' => $locks]);
|
||||||
'rebate_total' => $total, 'rebate_used' => $count, 'rebate_lock' => $locks,
|
|
||||||
]);
|
|
||||||
} else {
|
} else {
|
||||||
$count = $this->app->db->name('DataUserTransfer')->whereRaw("status>0")->sum('amount');
|
$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');
|
$total = $this->app->db->name('DataUserRebate')->whereRaw("status=1 and deleted=0")->sum('amount');
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?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);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\admin\\Library',
|
0 => 'think\\admin\\Library',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user