修改bug

master
elf@home 5 years ago
parent 4c5473a27f
commit f7aaa9030e

@ -1826,10 +1826,20 @@ class QueryController extends BaseController
'grand_id' => $promote['id'], 'grand_id' => $promote['id'],
]; ];
if ($headmanPromoteId > 0) { if ($headmanPromoteId > 0) {
$map['parent_id'] = $headmanPromoteId; $map = [
'_logic' => 'or',
'id' => $headmanPromoteId,
'parent_id' => $headmanPromoteId,
'grand_id' => $headmanPromoteId,
];
} }
if ($promoteId > 0) { if ($promoteId > 0) {
$map['id'] = $promoteId; $map = [
'_logic' => 'or',
'id' => $promoteId,
'parent_id' => $promoteId,
'grand_id' => $promoteId,
];
} }
$ids = M('promote', 'tab_')->where($map)->getField('id', true); $ids = M('promote', 'tab_')->where($map)->getField('id', true);
@ -1922,10 +1932,20 @@ class QueryController extends BaseController
'grand_id' => $promote['id'], 'grand_id' => $promote['id'],
]; ];
if ($headmanPromoteId > 0) { if ($headmanPromoteId > 0) {
$map['parent_id'] = $headmanPromoteId; $map = [
'_logic' => 'or',
'id' => $headmanPromoteId,
'parent_id' => $headmanPromoteId,
'grand_id' => $headmanPromoteId,
];
} }
if ($promoteId > 0) { if ($promoteId > 0) {
$map['id'] = $promoteId; $map = [
'_logic' => 'or',
'id' => $promoteId,
'parent_id' => $promoteId,
'grand_id' => $promoteId,
];
} }
$ids = M('promote', 'tab_')->where($map)->getField('id', true); $ids = M('promote', 'tab_')->where($map)->getField('id', true);

Loading…
Cancel
Save