|
|
|
@ -125,7 +125,7 @@ class ApplyController extends BaseController
|
|
|
|
|
|
|
|
|
|
$join = '';
|
|
|
|
|
if ($parentPromoteId > 0) {
|
|
|
|
|
$map['tab_apply.promote_id'] = $parentPromoteId;
|
|
|
|
|
$map['tab_apply.promote_id'] = PID;
|
|
|
|
|
if (!empty($where)) {
|
|
|
|
|
$map['_logic'] = 'and';
|
|
|
|
|
$map['_complex'] = $where;
|
|
|
|
@ -888,7 +888,7 @@ class ApplyController extends BaseController
|
|
|
|
|
$gameRelationName = M('game', 'tab_')->where(array('id' => $_POST['game_id']))->getField('relation_game_name');
|
|
|
|
|
$gameData = M('game', 'tab_')
|
|
|
|
|
->field('tab_game.*')
|
|
|
|
|
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . $promoteData['parent_id'])
|
|
|
|
|
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . PID)
|
|
|
|
|
->where(array('tab_game.relation_game_name' => $gameRelationName))
|
|
|
|
|
->select();
|
|
|
|
|
} else {
|
|
|
|
@ -901,7 +901,7 @@ class ApplyController extends BaseController
|
|
|
|
|
if ($promoteData['parent_id'] > 0) {
|
|
|
|
|
$gameData = M('game', 'tab_')
|
|
|
|
|
->field('tab_game.*')
|
|
|
|
|
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . $promoteData['parent_id'])
|
|
|
|
|
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . PID)
|
|
|
|
|
->where($gameMap)->select();
|
|
|
|
|
} else {
|
|
|
|
|
$gameData = M('game', 'tab_')->where($gameMap)->select();
|
|
|
|
@ -1469,6 +1469,7 @@ class ApplyController extends BaseController
|
|
|
|
|
function getGameInfo()
|
|
|
|
|
{
|
|
|
|
|
$gameId = I('game_id');
|
|
|
|
|
$promoteType = I('promote_type');
|
|
|
|
|
$gameData = array();
|
|
|
|
|
|
|
|
|
|
if ($gameId > 0) {
|
|
|
|
@ -1481,7 +1482,6 @@ class ApplyController extends BaseController
|
|
|
|
|
|
|
|
|
|
$gameData['sdk_name'] = getSDKTypeName($gameData['sdk_version']);
|
|
|
|
|
|
|
|
|
|
$promoteType = 2;
|
|
|
|
|
$promoteData = D('Promote')->where(array('id' => PID))->find();
|
|
|
|
|
if ($promoteData['parent_id'] > 0 && $promoteData['grand_id'] == 0) {
|
|
|
|
|
$promoteType = 3;
|
|
|
|
@ -1530,7 +1530,7 @@ class ApplyController extends BaseController
|
|
|
|
|
foreach ($promoteIds as $value) {
|
|
|
|
|
$thisPromoteData = D('Promote')->where(array('id' => $value))->find();
|
|
|
|
|
|
|
|
|
|
if (empty($thisPromoteData) || $thisPromoteData['parent_id'] != PID) {
|
|
|
|
|
if (empty($thisPromoteData) || !hasPromotePermission(PID, $value)) {
|
|
|
|
|
$data['status'] = -1;
|
|
|
|
|
$data['msg'] = '渠道权限异常';
|
|
|
|
|
|
|
|
|
|