mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 07:16:06 -06:00
remove old function
This commit is contained in:
parent
69d62725dc
commit
f97a2f4837
@ -142,7 +142,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->model->is_enabled('customfields')) {
|
if ($this->model->is_enabled('customfields')) {
|
||||||
$query = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->filterSearch($customParameters, $query);
|
$query = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->filterSearch($customParameters, $param, $query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -160,29 +160,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
$query = $query->whereRaw($column);
|
$query = $query->whereRaw($column);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($param as $para => $value) {
|
|
||||||
if (substr($para, 4, 3) === "cf_") {
|
|
||||||
$id = substr($para, 7);
|
|
||||||
$minmax = substr($para, 0, 3);
|
|
||||||
if ($minmax == 'min') {
|
|
||||||
|
|
||||||
$num = $param[$minmax . '_cf_' . $id];
|
|
||||||
$int = (int)$num;
|
|
||||||
$column = "JSON_EXTRACT(cf_json, '$.cf" . $id . "') >= '" . $int . "'";
|
|
||||||
$query = $query->whereRaw($column);
|
|
||||||
|
|
||||||
}
|
|
||||||
if ($minmax == 'max') {
|
|
||||||
|
|
||||||
$num = $param[$minmax . '_cf_' . $id];
|
|
||||||
$int = (int)$num;
|
|
||||||
$column = "JSON_EXTRACT(cf_json, '$.cf" . $id . "') <= '" . $int . "'";
|
|
||||||
$query = $query->whereRaw($column);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// //UPDATE `default_advs_advs` SET `coor` = (PointFromText('POINT(41.085022 28.804754)')) WHERE `default_advs_advs`.`id` = 8
|
// //UPDATE `default_advs_advs` SET `coor` = (PointFromText('POINT(41.085022 28.804754)')) WHERE `default_advs_advs`.`id` = 8
|
||||||
// //SELECT * FROM `default_advs_advs` WHERE ST_DISTANCE(ST_GeomFromText('POINT(41.0709052 28.829627)'), coor) < 20
|
// //SELECT * FROM `default_advs_advs` WHERE ST_DISTANCE(ST_GeomFromText('POINT(41.0709052 28.829627)'), coor) < 20
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user