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