From 34d07e15783796587cd6f1f746627e91624ea61a Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 28 Jul 2021 10:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=94=AF=E4=BB=98=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/SpendController.class.php | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) 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']));