* [refac] filter empty value.

This commit is contained in:
liugang
2024-11-28 17:33:35 +08:00
committed by 朱金勇
parent 8471c3bca3
commit 4ce078940b
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -565,7 +565,7 @@ class baseMao
if(is_string($value)) $value = explode(',', str_replace(' ', '', $value));
if(is_array($value))
{
$rawResult = $this->cache->fetchAll($this->table, $value);
$rawResult = $this->cache->fetchAll($this->table, array_filter($value));
break;
}
}
+5 -1
View File
@@ -653,7 +653,11 @@ class cache
if(empty($objectIdList)) $objectIdList = $allObjectIdList;
$keys = [];
foreach($objectIdList as $objectID) $keys[$objectID] = $this->getRawCacheKey($code, $objectID);
foreach($objectIdList as $objectID)
{
if(!$objectID) continue;
$keys[$objectID] = $this->getRawCacheKey($code, $objectID);
}
$objects = $this->cache->getMultiple(array_values($keys));