|
|
|
@ -1663,4 +1663,29 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取推广员可推广游戏
|
|
|
|
|
public function getPromoteGame()
|
|
|
|
|
{
|
|
|
|
|
if (IS_AJAX) {
|
|
|
|
|
//获取所有游戏
|
|
|
|
|
$promoteId = I('id', 0, 'intval');
|
|
|
|
|
$promote = M('promote', 'tab_')->field('id,account,game_ids,company_id')->where(['id'=>$promoteId])->find();
|
|
|
|
|
$company = M('promote_company', 'tab_')->field('game_ids')->where(['id' => $promote['company_id']])->find();
|
|
|
|
|
$data = [];
|
|
|
|
|
|
|
|
|
|
$games = M('game', 'tab_')
|
|
|
|
|
->field('relation_game_id id,relation_game_name game_name,short')
|
|
|
|
|
->where(['game_status'=>1])
|
|
|
|
|
->group("relation_game_id")
|
|
|
|
|
->select();
|
|
|
|
|
$data['data']['game_list'] = empty($games) ? '' : $games;
|
|
|
|
|
|
|
|
|
|
$data['msg'] = '请求成功';
|
|
|
|
|
$data['code'] = 1;
|
|
|
|
|
|
|
|
|
|
$this->ajaxReturn($data);
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|