|
|
|
@ -567,14 +567,26 @@ class AjaxController extends ThinkController{
|
|
|
|
|
*/
|
|
|
|
|
public function getPromoteGameList() {
|
|
|
|
|
|
|
|
|
|
$game_ids = I('game_ids');
|
|
|
|
|
$company_id = $_REQUEST['company_id'];
|
|
|
|
|
|
|
|
|
|
$spendData = M("spend use index(user_id)","tab_")
|
|
|
|
|
->field("game_id")
|
|
|
|
|
->join("left join tab_promote on tab_spend.promote_id=tab_promote.id")
|
|
|
|
|
->where([
|
|
|
|
|
'company_id'=>$company_id,
|
|
|
|
|
'pay_status'=>1,
|
|
|
|
|
'pay_way'=>['egt',0]
|
|
|
|
|
])
|
|
|
|
|
->group("game_id")
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
if ($game_ids) {
|
|
|
|
|
$map['relation_game_id'] = ['in',$game_ids];
|
|
|
|
|
if ($spendData) {
|
|
|
|
|
$map['id'] = ['in',array_column($spendData,"game_id")];
|
|
|
|
|
} else {
|
|
|
|
|
$this->ajaxReturn([]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$data = M("game","tab_")
|
|
|
|
|
->field("relation_game_id,relation_game_name")
|
|
|
|
|
->where($map)
|
|
|
|
|