diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index ec08c8661..e043c5c0f 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -86,6 +86,18 @@ class SpendController extends ThinkController unset($_REQUEST['merchant_id']); } + if (isset($_REQUEST['promote_id'])) { + $promoteId = intval($_REQUEST['promote_id']); + if ($promoteId == 0) { + $map['promote_id'] = 0; + } else { + $promoteMap['chain'] = ['like', "%/$promoteId/%"]; + $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); + $promoteIds[] = $promoteId; + $map['promote_id'] = ['in', $promoteIds]; + } + } + $marketAdminId = 0; $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { @@ -99,18 +111,7 @@ class SpendController extends ThinkController } else { setPowerPromoteIds($map,'promote_id'); } - - if (isset($_REQUEST['promote_id'])) { - $promoteId = intval($_REQUEST['promote_id']); - if ($promoteId == 0) { - $map['promote_id'] = 0; - } else { - $promoteMap['chain'] = ['like', "%/$promoteId/%"]; - $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); - $promoteIds[] = $promoteId; - $map['promote_id'] = ['in', $promoteIds]; - } - } + if ($_REQUEST['data_order'] != '') { $data_order = reset(explode(',', $_REQUEST['data_order'])); $data_order_type = end(explode(',', $_REQUEST['data_order']));