修改bug

master
ELF 5 years ago
parent e575e3107c
commit 270e24346d

@ -223,7 +223,7 @@ class PromoteRepository {
if (isset($params['begin_time']) && isset($params['begin_time'])) { if (isset($params['begin_time']) && isset($params['begin_time'])) {
$subMap['create_time'] = ['lt', $params['begin_time']]; $subMap['create_time'] = ['lt', $params['begin_time']];
} }
$subQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($subMap)->buildSql(); $subQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($subMap)->buildSql();
if (isset($map['_string'])) { if (isset($map['_string'])) {
$map['_string'] .= ' and user_id not in (' . $subQuery . ')'; $map['_string'] .= ' and user_id not in (' . $subQuery . ')';

@ -1991,40 +1991,15 @@ class QueryController extends BaseController
$records = []; $records = [];
if (intval($endTime - $beginTime) / (24 * 3600) <= 7) { if (intval($endTime - $beginTime) / (24 * 3600) <= 7) {
$promoteRepository = new PromoteRepository(); $promoteRepository = new PromoteRepository();
$time1 = microtime(true);
$createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params); $createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
$time2 = microtime(true);
echo $time2 - $time1;
echo "<br/>";
$createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params); $createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params);
$time3 = microtime(true);
echo $time3 - $time2;
echo "<br/>";
$newCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds($ids, $params); $newCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds($ids, $params);
$time4 = microtime(true);
echo $time4 - $time3;
echo "<br/>";
// $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params); // $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params); $newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
$time5 = microtime(true);
echo $time5 - $time4;
echo "<br/>";
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params); $loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
$time6 = microtime(true);
echo $time6 - $time5;
echo "<br/>";
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params); $rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
$time7 = microtime(true);
echo $time7 - $time6;
echo "<br/>";
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params); $rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
$time8 = microtime(true);
echo $time8 - $time7;
echo "<br/>";
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params); $rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
$time9 = microtime(true);
echo $time9 - $time8;
echo "<br/>";
if (I('p', 1) == 1) { if (I('p', 1) == 1) {
$selfParams = $params; $selfParams = $params;

Loading…
Cancel
Save