Merge branch 'sprint/168_zenggang_15773' into 'sprint/168'

* Fix bug#15773

See merge request easycorp/zentaopms!198
This commit is contained in:
孙广明
2021-10-28 08:36:36 +00:00
+18 -2
View File
@@ -132,11 +132,27 @@ class searchModel extends model
$condition = '';
if($operator == "include")
{
$condition = ' LIKE ' . $this->dbh->quote("%$value%");
if($this->post->$fieldName == 'module')
{
$allModules = $this->loadModel('tree')->getAllChildId($value);
if($allModules) $condition = helper::dbIN($allModules);
}
else
{
$condition = ' LIKE ' . $this->dbh->quote("%$value%");
}
}
elseif($operator == "notinclude")
{
$condition = ' NOT LIKE ' . $this->dbh->quote("%$value%");
if($this->post->$fieldName == 'module')
{
$allModules = $this->loadModel('tree')->getAllChildId($value);
if($allModules) $condition = " NOT " . helper::dbIN($allModules);
}
else
{
$condition = ' NOT LIKE ' . $this->dbh->quote("%$value%");
}
}
elseif($operator == 'belong')
{