mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
Update UserRebateService.php
This commit is contained in:
parent
22db40f324
commit
ccf431caae
@ -23,9 +23,7 @@ class UserRebateService extends Service
|
||||
$count = abs($this->app->db->name('DataUserTransfer')->whereRaw("uid='{$uuid}' and status>0")->sum('amount'));
|
||||
$total = abs($this->app->db->name('DataUserRebate')->whereRaw("uid='{$uuid}' and status=1 and deleted=0")->sum('amount'));
|
||||
$locks = abs($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 = abs($this->app->db->name('DataUserTransfer')->whereRaw("status>0")->sum('amount'));
|
||||
$total = abs($this->app->db->name('DataUserRebate')->whereRaw("status=1 and deleted=0")->sum('amount'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user