|
|
@ -33,10 +33,17 @@ class TestingResourceController extends BaseController
|
|
|
|
'_string' => '1=1'
|
|
|
|
'_string' => '1=1'
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
|
|
|
$visibleGameIds = $promoteService->getVisibleGameIds($loginPromote);
|
|
|
|
|
|
|
|
$strCondition = 'game_id in (0)';
|
|
|
|
|
|
|
|
if (count($visibleGameIds) > 0) {
|
|
|
|
|
|
|
|
$strCondition = 'game_id in (' . implode(',', $visibleGameIds) . ')';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @todo 仅有游戏猫
|
|
|
|
* @todo 仅有游戏猫
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
$strCondition = 'game_id in (229, 230)';
|
|
|
|
$strCondition .= ' and game_id in (229, 230)';
|
|
|
|
|
|
|
|
|
|
|
|
if ($createTimeStart) {
|
|
|
|
if ($createTimeStart) {
|
|
|
|
$strCondition .= ' and create_time >=' . strtotime($createTimeStart . ' 00:00:00');
|
|
|
|
$strCondition .= ' and create_time >=' . strtotime($createTimeStart . ' 00:00:00');
|
|
|
@ -48,7 +55,6 @@ class TestingResourceController extends BaseController
|
|
|
|
$subSql = M('testing_user', 'tab_')->field(['user_id'])->where($subConditions)->select(false);
|
|
|
|
$subSql = M('testing_user', 'tab_')->field(['user_id'])->where($subConditions)->select(false);
|
|
|
|
$strCondition .= ' and user_id in (' . $subSql . ')';
|
|
|
|
$strCondition .= ' and user_id in (' . $subSql . ')';
|
|
|
|
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
|
|
|
$strCondition .= ' and promote_id in (' . $promoteService->subInSql($loginPromote) . ')';
|
|
|
|
$strCondition .= ' and promote_id in (' . $promoteService->subInSql($loginPromote) . ')';
|
|
|
|
|
|
|
|
|
|
|
|
if ($account) {
|
|
|
|
if ($account) {
|
|
|
@ -708,6 +714,13 @@ class TestingResourceController extends BaseController
|
|
|
|
$map = [
|
|
|
|
$map = [
|
|
|
|
'id' => ['in', [229, 230]]
|
|
|
|
'id' => ['in', [229, 230]]
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
$loginPromote = $this->getLoginPromote();
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
|
|
|
$visibleGameIds = $promoteService->getVisibleGameIds($loginPromote);
|
|
|
|
|
|
|
|
$map['_string'] = 'id in (0)';
|
|
|
|
|
|
|
|
if (count($visibleGameIds) > 0) {
|
|
|
|
|
|
|
|
$map['_string'] = 'id in (' . implode(',', $visibleGameIds) . ')';
|
|
|
|
|
|
|
|
}
|
|
|
|
return M('game', 'tab_')->field('id,game_name')->where($map)->select();
|
|
|
|
return M('game', 'tab_')->field('id,game_name')->where($map)->select();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|