处理数据权限筛选时,不覆盖原有的搜索字段promote_id

master
liuweiwen 5 years ago
parent a9a6b49148
commit 62f5098df7

@ -1611,7 +1611,15 @@ function setPowerPromoteIds(&$map, $column = 'promote_id') {
if (empty($promoteIds)) { if (empty($promoteIds)) {
$map[$column] = -1; $map[$column] = -1;
} elseif ($promoteIds != 'all') { } elseif ($promoteIds != 'all') {
$map[$column] = array('in', $promoteIds); if (isset($map[$column])) {
if (isset($map['_string'])) {//查询字段中已存在promote_id不覆盖此条件而处理
$map['_string'] .= " and $column in($promoteIds)";
} else {
$map['_string'] = " $column in($promoteIds)";
}
} else {
$map[$column] = array('in', $promoteIds);
}
} }
} }

Loading…
Cancel
Save