|
|
|
@ -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) {
|
|
|
|
@ -100,17 +112,6 @@ class SpendController extends ThinkController
|
|
|
|
|
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']));
|
|
|
|
|