* Modify.

This commit is contained in:
宋辰轩
2022-05-10 15:21:06 +08:00
parent 01344d05b9
commit b21e8bf480
14 changed files with 8 additions and 35 deletions
+5 -2
View File
@@ -500,9 +500,12 @@ class apiModel extends model
public function getStructListByRelease($release, $where = '1 = 1 ', $orderBy = 'id')
{
$strJoin = array();
foreach($release->snap['structs'] as $struct)
if(isset($release->snap['structs']))
{
$strJoin[] = "(object.id = {$struct['id']} and spec.version = {$struct['version']} )";
foreach($release->snap['structs'] as $struct)
{
$strJoin[] = "(object.id = {$struct['id']} and spec.version = {$struct['version']} )";
}
}
if($strJoin) $where .= 'and (' . implode(' or ', $strJoin) . ')';