| | |
| | | * @param wrapper |
| | | * @param filter |
| | | */ |
| | | public <T> void addFilterWrapper(QueryWrapper<T> wrapper, String filter) { |
| | | public void addFilterWrapper(QueryWrapper wrapper, String filter) { |
| | | if (StringHelper.isEmpty(filter)) { |
| | | return; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private <T> void addWrapper(QueryWrapper<T> wrapper, String field, String express, String value) { |
| | | private void addWrapper(QueryWrapper wrapper, String field, String express, String value) { |
| | | switch (express) { |
| | | case "like": |
| | | wrapper.like(field, value); |
| | |
| | | * @param srid 空间引用标识符 |
| | | * @throws Exception 异常 |
| | | */ |
| | | public void addGeomWrapper(BaseMapper baseMapper, QueryWrapper<Object> wrapper, String wkt, Integer srid) throws Exception { |
| | | public void addGeomWrapper(BaseMapper baseMapper, QueryWrapper wrapper, String wkt, Integer srid) throws Exception { |
| | | if (baseMapper instanceof GeomBaseMapper && !StringHelper.isEmpty(wkt) && srid != null) { |
| | | wkt = AesHelper.decrypt(wkt); |
| | | wrapper.apply(String.format("ST_Intersects(geom, ST_PolygonFromText('%s', %d))", wkt, srid)); |