|
|
@ -795,13 +795,13 @@ class Auth extends BaseController |
|
|
|
{ |
|
|
|
{ |
|
|
|
$userInfo = $this->request->userInfo(); |
|
|
|
$userInfo = $this->request->userInfo(); |
|
|
|
$data = userModel::getDB()->order("uid desc") |
|
|
|
$data = userModel::getDB()->order("uid desc") |
|
|
|
->field("uid,phone,nickname,create_time,community_level,pay_count,spread_uid as sid,spread_uid2 as tid") |
|
|
|
->field("uid,phone,nickname,create_time,community_level,pay_count,spread_uid as sid,spread_uid2 as tid,pay_price") |
|
|
|
->where("spread_uid2", $userInfo->uid) |
|
|
|
->where("spread_uid2", $userInfo->uid) |
|
|
|
->select() |
|
|
|
->select() |
|
|
|
->toArray(); |
|
|
|
->toArray(); |
|
|
|
|
|
|
|
|
|
|
|
$users = userModel::getDB()->order("uid asc") |
|
|
|
$users = userModel::getDB()->order("uid asc") |
|
|
|
->field("uid,spread_uid as sid,spread_uid2 as tid,spread_count,spread_pay_price") |
|
|
|
->field("uid,spread_uid as sid,spread_uid2 as tid,spread_count,spread_pay_price,pay_price") |
|
|
|
->where('uid', '<>', $userInfo->uid) |
|
|
|
->where('uid', '<>', $userInfo->uid) |
|
|
|
->select() |
|
|
|
->select() |
|
|
|
->toArray(); |
|
|
|
->toArray(); |
|
|
@ -810,7 +810,7 @@ class Auth extends BaseController |
|
|
|
foreach ($data as &$item) { |
|
|
|
foreach ($data as &$item) { |
|
|
|
$item['community_level'] = $level[$item['community_level']] ?? ''; |
|
|
|
$item['community_level'] = $level[$item['community_level']] ?? ''; |
|
|
|
$item['invites'] = $this->countSpInvites($users, $item['uid']); |
|
|
|
$item['invites'] = $this->countSpInvites($users, $item['uid']); |
|
|
|
$item['referrals'] = $this->countSpReferrals($users, $item['tid'], 'spread_count'); |
|
|
|
$item['referrals'] = $this->countSpReferrals($users, $item['tid'], 'pay_price'); |
|
|
|
$item['amount'] = $this->countSpReferrals($users, $item['tid'], 'spread_pay_price'); |
|
|
|
$item['amount'] = $this->countSpReferrals($users, $item['tid'], 'spread_pay_price'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|