dever 7 jaren geleden
bovenliggende
commit
f6eae15b6a
2 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 1 1
      database/admin.php
  2. 3 2
      src/Database.php

+ 1 - 1
database/admin.php

@@ -162,7 +162,7 @@ return array
 				'yes' => '有值',
 				'no' => '没有值',
 				'no|2832' => '没有值或者有值为2832',
-				'yes|2832' => '有值或者有值为2829',
+				'yes|2832' => '有值并且过滤值为2829',
 				'2832' => '查找',
 			);
 			* 如果search的值为数组,则认为是接口,需要从接口获取数据后再进行查找

+ 3 - 2
src/Database.php

@@ -1367,11 +1367,12 @@ class Database
                     } elseif (strpos($v, '|')) {
                         # 有无值或者自定义的值
                         $temp = explode('|', $v);
-                        $param['option'][$k] = array('yes', '=', 'and(');
                         $param['option_' . $k] = $temp[1];
                         if ($temp[0] == 'yes') {
-                            $param['option'][$k . '_t1'] = array('yes-' . $k, '!=', 'or)');
+                            $param['option'][$k] = array('yes', '!=');
+                            $param['option'][$k . '_t1'] = array('yes-' . $k, '!=');
                         } else {
+                            $param['option'][$k] = array('yes', '=', 'and(');
                             $param['option'][$k . '_t1'] = array('yes-' . $k, '=', 'or)');
                         }
                         $param['option_' . $k . '_t1'] = 'null';