|
|
@ -755,7 +755,7 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
|
|
$timeout = 0;
|
|
|
|
$timeout = 0;
|
|
|
|
$records = [];
|
|
|
|
$records = [];
|
|
|
|
if (intval($endTime - $beginTime) / (24 * 3600) <= 30) {
|
|
|
|
if (intval($endTime - $beginTime) / (24 * 3600) <= 31) {
|
|
|
|
$userRepository = new UserRepository();
|
|
|
|
$userRepository = new UserRepository();
|
|
|
|
$spendRepository = new SpendRepository();
|
|
|
|
$spendRepository = new SpendRepository();
|
|
|
|
$payGameCountList = $spendRepository->getPayGameCountGroupByDay($params);
|
|
|
|
$payGameCountList = $spendRepository->getPayGameCountGroupByDay($params);
|
|
|
@ -2009,13 +2009,21 @@ class QueryController extends BaseController
|
|
|
|
|
|
|
|
|
|
|
|
$rows = [];
|
|
|
|
$rows = [];
|
|
|
|
if (count($ids) > 0) {
|
|
|
|
if (count($ids) > 0) {
|
|
|
|
$rows = M('promote', 'tab_')->field(['id', 'parent_id'])->where(['parent_id' => ['in', $ids]])->select();
|
|
|
|
$rows = M('promote', 'tab_')
|
|
|
|
|
|
|
|
->field(['id', 'chain'])
|
|
|
|
|
|
|
|
->where(['chain' => ['like', [$parent['chain'] . $parent['id'] . '/%']], 'level' => ['gt', $parent['level'] + 1]])
|
|
|
|
|
|
|
|
->select();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$basicPromotes = [];
|
|
|
|
$basicPromotes = [];
|
|
|
|
|
|
|
|
foreach ($ids as $id) {
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
foreach ($rows as $row) {
|
|
|
|
$basicPromotes[$row['id']] = $row['parent_id'];
|
|
|
|
$needChain = $parent['chain'] . $parent['id'] . '/' . $id . '/';
|
|
|
|
|
|
|
|
if (strpos($row['chain'], $needChain) !== false) {
|
|
|
|
|
|
|
|
$basicPromotes[$row['id']] = $id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$params = [
|
|
|
|
$params = [
|
|
|
|
'isContainSubs' => true,
|
|
|
|
'isContainSubs' => true,
|
|
|
|
'basicPromotes' => $basicPromotes,
|
|
|
|
'basicPromotes' => $basicPromotes,
|
|
|
|