角色查询-本推广号

master
liyang 4 years ago
parent 5cd8ca2857
commit 42a8fc94f7

@ -1764,9 +1764,11 @@ class QueryController extends BaseController
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
}
if ($isSelf) {
$map['promote_id'] = $queryPromote['id'];
$map['role.promote_id'] = $queryPromote['id'];
}
$orderBy = 'create_time desc';
$sortNameData = ['login_time', 'create_time', 'role_level', 'register_time', 'role.promote_account'];
if (!empty($sortName)) {
@ -1815,8 +1817,11 @@ class QueryController extends BaseController
$subSql = M('user', 'tab_')->field('id')->where(['is_repeat' => 0])->select(false);
$map['_string'] = str_replace('role.promote_id', 'promote_id', $map['_string']) . ' and user_id in (' . $subSql . ')';
$map['promote_id'] = $map['role.promote_id'];
unset($map['role.promote_id']);
$uniqueCountRow = M('user_play_info', 'tab_')->field(['count(distinct user_id) user_count, count(*) count'])->where($map)->find();
/* $users = [];
if (count($records) > 0) {
$userIds = array_column($records, 'user_id');

Loading…
Cancel
Save