Update ConversionLogic.php
This commit is contained in:
@@ -319,9 +319,12 @@ class ConversionLogic
|
|||||||
->whereNull('a.delete_time');
|
->whereNull('a.delete_time');
|
||||||
if ($visibleAdminIds !== null) {
|
if ($visibleAdminIds !== null) {
|
||||||
if ($visibleAdminIds === []) {
|
if ($visibleAdminIds === []) {
|
||||||
return [];
|
// 与 HasDataScopeFilter::applyDataScopeByOwner 对齐:空集合用 0=1 闸门让 SQL 自然返回空,
|
||||||
|
// 避免和"未传 visibleAdminIds (=SCOPE_ALL)"在调用侧产生混淆。
|
||||||
|
$query->whereRaw('0 = 1');
|
||||||
|
} else {
|
||||||
|
$query->whereIn('a.id', $visibleAdminIds);
|
||||||
}
|
}
|
||||||
$query->whereIn('a.id', $visibleAdminIds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $query
|
return $query
|
||||||
@@ -575,9 +578,11 @@ class ConversionLogic
|
|||||||
}
|
}
|
||||||
if ($visibleAdminIds !== null) {
|
if ($visibleAdminIds !== null) {
|
||||||
if ($visibleAdminIds === []) {
|
if ($visibleAdminIds === []) {
|
||||||
return [];
|
// 与 HasDataScopeFilter::applyDataScopeByOwner 对齐:空集合用 0=1 闸门让 SQL 自然返回空。
|
||||||
|
$query->whereRaw('0 = 1');
|
||||||
|
} else {
|
||||||
|
$query->whereIn('a.id', $visibleAdminIds);
|
||||||
}
|
}
|
||||||
$query->whereIn('a.id', $visibleAdminIds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$rows = $query->order('a.id asc')->select()->toArray();
|
$rows = $query->order('a.id asc')->select()->toArray();
|
||||||
@@ -1798,9 +1803,11 @@ class ConversionLogic
|
|||||||
|
|
||||||
if ($visibleAdminIds !== null) {
|
if ($visibleAdminIds !== null) {
|
||||||
if ($visibleAdminIds === []) {
|
if ($visibleAdminIds === []) {
|
||||||
return [];
|
// 与 HasDataScopeFilter::applyDataScopeByOwner 对齐:空集合用 0=1 闸门让 SQL 自然返回空。
|
||||||
|
$query->whereRaw('0 = 1');
|
||||||
|
} else {
|
||||||
|
$query->whereIn('a.id', $visibleAdminIds);
|
||||||
}
|
}
|
||||||
$query->whereIn('a.id', $visibleAdminIds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mediaChannel !== null) {
|
if ($mediaChannel !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user