core/SqlSelector.php
public function search(string $sql, $value, $type = SqlCondition::WITHOUT_EMPTY, $format = null)
    {
        if (substr_count($sql, '??') == 1 && is_array($value)) {
            if (!empty($value)) {
                $temp = [];
                foreach ($value as $item) {
                    $temp[] = '?';
                }
                $sql = str_replace('??', join(',', $temp), $sql);
                $this->condition->where($sql, $value);
            }
            return $this;
        }
        $this->condition->search($sql, $value, $type, $format);
        return $this;
    }
public function search(string $sql, $value, $type = SqlCondition::WITHOUT_EMPTY, $format = null)
    {
        if (substr_count($sql, '??') == 1 && is_array($value)) {
            if (!empty($value)) {
                $temp = [];
                foreach ($value as $item) {
                    $temp[] = '?';
                }
                $sql = str_replace('??', join(',', $temp), $sql);
                $this->condition->where($sql, $value);
            }
            return $this;
        }
        $this->condition->search($sql, $value, $type, $format);
        return $this;
    }
条件搜索,如果值为空 放弃筛选
@param string $sql
@param $value
@param int $type
@param null $format
@return $this