|
|
|
@ -260,10 +260,10 @@ class PromoteRepository {
|
|
|
|
|
if (count($ids) == 0) {
|
|
|
|
|
return [];
|
|
|
|
|
}
|
|
|
|
|
$params['time_column'] = 'login_time';
|
|
|
|
|
$params['time_column'] = 'create_time';
|
|
|
|
|
$map = $this->getPublicAchievementMap($ids, $params);
|
|
|
|
|
|
|
|
|
|
$promoteIds = $map['promote_id'][1];
|
|
|
|
|
$items = M('login_daily_record', 'tab_')->field(['count(DISTINCT user_id) as count', 'promote_id'])->where($map)->group('promote_id')->select();
|
|
|
|
|
/* $promoteIds = $map['promote_id'][1];
|
|
|
|
|
$tempRows = [];
|
|
|
|
|
$tempCount = 0;
|
|
|
|
|
$items = [];
|
|
|
|
@ -272,13 +272,13 @@ class PromoteRepository {
|
|
|
|
|
$tempRows[] = $promoteId;
|
|
|
|
|
if ($tempCount == 20) {
|
|
|
|
|
$map['promote_id'] = ['in', $tempRows];
|
|
|
|
|
$rows = M('user_login_record', 'tab_')->field(['count(DISTINCT user_id) as count', 'promote_id'])->where($map)->group('promote_id')->select();
|
|
|
|
|
$rows = M('login_daily_record', 'tab_')->field(['count(DISTINCT user_id) as count', 'promote_id'])->where($map)->group('promote_id')->select();
|
|
|
|
|
$tempRows = [];
|
|
|
|
|
$tempCount = 0;
|
|
|
|
|
$items = array_merge($items, $rows);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
$records = [];
|
|
|
|
|
foreach ($items as $item) {
|
|
|
|
|
$promoteId = $item['promote_id'];
|
|
|
|
|