|
|
@ -260,10 +260,10 @@ class PromoteRepository {
|
|
|
|
if (count($ids) == 0) {
|
|
|
|
if (count($ids) == 0) {
|
|
|
|
return [];
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$params['time_column'] = 'login_time';
|
|
|
|
$params['time_column'] = 'create_time';
|
|
|
|
$map = $this->getPublicAchievementMap($ids, $params);
|
|
|
|
$map = $this->getPublicAchievementMap($ids, $params);
|
|
|
|
|
|
|
|
$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];
|
|
|
|
/* $promoteIds = $map['promote_id'][1];
|
|
|
|
$tempRows = [];
|
|
|
|
$tempRows = [];
|
|
|
|
$tempCount = 0;
|
|
|
|
$tempCount = 0;
|
|
|
|
$items = [];
|
|
|
|
$items = [];
|
|
|
@ -272,13 +272,13 @@ class PromoteRepository {
|
|
|
|
$tempRows[] = $promoteId;
|
|
|
|
$tempRows[] = $promoteId;
|
|
|
|
if ($tempCount == 20) {
|
|
|
|
if ($tempCount == 20) {
|
|
|
|
$map['promote_id'] = ['in', $tempRows];
|
|
|
|
$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 = [];
|
|
|
|
$tempRows = [];
|
|
|
|
$tempCount = 0;
|
|
|
|
$tempCount = 0;
|
|
|
|
$items = array_merge($items, $rows);
|
|
|
|
$items = array_merge($items, $rows);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
$records = [];
|
|
|
|
$records = [];
|
|
|
|
foreach ($items as $item) {
|
|
|
|
foreach ($items as $item) {
|
|
|
|
$promoteId = $item['promote_id'];
|
|
|
|
$promoteId = $item['promote_id'];
|
|
|
|