搜索条件生成增加魔术方法条件

This commit is contained in:
mkm 2024-05-27 09:56:44 +08:00
parent d919b4c6b3
commit b9085c25f6

View File

@ -22,6 +22,14 @@ trait ListsSearchTrait
return [];
}
$where = [];
$class_key=$this->request->__get('class_key');
foreach($class_key as $key => $value){
array_push($search[$key], $value); // 添加class_key的搜索条件
}
$class_value=$this->request->__get('class_value'); // 获取class_value的值
if($class_value){
$this->params=array_merge($this->params,$class_value);
}
foreach ($search as $whereType => $whereFields) {
switch ($whereType) {
case '=':