Commit a24be17f262034566a93fc445765daf71665649d
1 parent
53690663
解决mysql ST_AsText函数 版本过低
Showing
3 changed files
with
12 additions
and
12 deletions
src/main/java/com/bsth/repository/CarParkRepository.java
| @@ -66,9 +66,9 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{ | @@ -66,9 +66,9 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{ | ||
| 66 | "k.update_date AS carParkUpdateDate," + | 66 | "k.update_date AS carParkUpdateDate," + |
| 67 | "k.versions AS carParkVersions," + | 67 | "k.versions AS carParkVersions," + |
| 68 | "k.b_center_point AS carParkBcenterPoint," + | 68 | "k.b_center_point AS carParkBcenterPoint," + |
| 69 | - "AsText(k.b_park_point) AS carParkBparkPoint," + | 69 | + "ST_AsText(k.b_park_point) AS carParkBparkPoint," + |
| 70 | "k.g_center_point AS carParkGcenterPoint," + | 70 | "k.g_center_point AS carParkGcenterPoint," + |
| 71 | - "AsText(k.g_park_point) AS carParkGparkPoint, " + | 71 | + "ST_AsText(k.g_park_point) AS carParkGparkPoint, " + |
| 72 | "k.db_type AS carParkDBtype," + | 72 | "k.db_type AS carParkDBtype," + |
| 73 | "k.radius AS carParkRadius," + | 73 | "k.radius AS carParkRadius," + |
| 74 | "k.shapes_type AS carParkShapesType FROM bsth_c_car_park k where k.id = ?1", nativeQuery=true) | 74 | "k.shapes_type AS carParkShapesType FROM bsth_c_car_park k where k.id = ?1", nativeQuery=true) |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| @@ -51,8 +51,8 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -51,8 +51,8 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 51 | " b.middle_node AS sectionMiddleNode," + | 51 | " b.middle_node AS sectionMiddleNode," + |
| 52 | " b.section_type AS sectionType," + | 52 | " b.section_type AS sectionType," + |
| 53 | " b.csection_vector AS sectionCsectionVector," + | 53 | " b.csection_vector AS sectionCsectionVector," + |
| 54 | - " AsText(b.bsection_vector) AS sectionBsectionVector," + | ||
| 55 | - " AsText(b.gsection_vector) AS sectionGsectionVector," + | 54 | + " ST_AsText(b.bsection_vector) AS sectionBsectionVector," + |
| 55 | + " ST_AsText(b.gsection_vector) AS sectionGsectionVector," + | ||
| 56 | " b.road_coding AS sectionRoadCoding," + | 56 | " b.road_coding AS sectionRoadCoding," + |
| 57 | " b.section_distance AS sectionDistance," + | 57 | " b.section_distance AS sectionDistance," + |
| 58 | " b.section_time AS sectionTime," + | 58 | " b.section_time AS sectionTime," + |
| @@ -101,9 +101,9 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -101,9 +101,9 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 101 | "b.start_node AS sectionStartNode," + | 101 | "b.start_node AS sectionStartNode," + |
| 102 | "b.middle_node AS sectionMiddleNode," + | 102 | "b.middle_node AS sectionMiddleNode," + |
| 103 | "b.section_type AS sectionType," + | 103 | "b.section_type AS sectionType," + |
| 104 | - "AsText(b.csection_vector) AS sectionCsectionVector," + | ||
| 105 | - "AsText(b.bsection_vector) AS sectionBsectionVector," + | ||
| 106 | - "AsText(b.gsection_vector) AS sectionGsectionVector," + | 104 | + "ST_AsText(b.csection_vector) AS sectionCsectionVector," + |
| 105 | + "ST_AsText(b.bsection_vector) AS sectionBsectionVector," + | ||
| 106 | + "ST_AsText(b.gsection_vector) AS sectionGsectionVector," + | ||
| 107 | "b.section_distance AS sectionDistance," + | 107 | "b.section_distance AS sectionDistance," + |
| 108 | "b.section_time AS sectionTime," + | 108 | "b.section_time AS sectionTime," + |
| 109 | "b.db_type AS sectionDbtype," + | 109 | "b.db_type AS sectionDbtype," + |
| @@ -151,7 +151,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -151,7 +151,7 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 151 | */ | 151 | */ |
| 152 | @Query(value = "SELECT " + | 152 | @Query(value = "SELECT " + |
| 153 | "c.directions," + | 153 | "c.directions," + |
| 154 | - "AsText(s.bsection_vector) as bsection_vector," + | 154 | + "ST_AsText(s.bsection_vector) as bsection_vector," + |
| 155 | "s.speed_limit," + | 155 | "s.speed_limit," + |
| 156 | "s.section_name " + | 156 | "s.section_name " + |
| 157 | " FROM bsth_c_sectionroute c " + | 157 | " FROM bsth_c_sectionroute c " + |
src/main/java/com/bsth/repository/StationRouteRepository.java
| @@ -63,8 +63,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -63,8 +63,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 63 | "b.y AS 'station.y'," + | 63 | "b.y AS 'station.y'," + |
| 64 | "b.shapes_type AS 'station.shapesType'," + | 64 | "b.shapes_type AS 'station.shapesType'," + |
| 65 | "b.radius AS 'station.radius'," + | 65 | "b.radius AS 'station.radius'," + |
| 66 | - "AsText(b.g_polygon_grid) AS 'station.gPolygonGrid'," + | ||
| 67 | - "AsText(b.b_polygon_grid) AS 'station.bPolygonGrid'," + | 66 | + "ST_AsText(b.g_polygon_grid) AS 'station.gPolygonGrid'," + |
| 67 | + "ST_AsText(b.b_polygon_grid) AS 'station.bPolygonGrid'," + | ||
| 68 | "b.destroy AS 'station.destroy'," + | 68 | "b.destroy AS 'station.destroy'," + |
| 69 | "b.versions AS 'station.versions'," + | 69 | "b.versions AS 'station.versions'," + |
| 70 | "b.descriptions AS 'station.descriptions' FROM (" + | 70 | "b.descriptions AS 'station.descriptions' FROM (" + |
| @@ -191,8 +191,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -191,8 +191,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 191 | " b.g_laty AS stationGlaty," + | 191 | " b.g_laty AS stationGlaty," + |
| 192 | " b.x AS stationX," + | 192 | " b.x AS stationX," + |
| 193 | " b.y AS stationY," + | 193 | " b.y AS stationY," + |
| 194 | - " AsText(b.b_polygon_grid) as stationBPolyonGrid," + | ||
| 195 | - " AsText(b.g_polygon_grid) AS stationGPloyonGrid, " + | 194 | + " ST_AsText(b.b_polygon_grid) as stationBPolyonGrid," + |
| 195 | + " ST_AsText(b.g_polygon_grid) AS stationGPloyonGrid, " + | ||
| 196 | " b.destroy AS stationDestroy," + | 196 | " b.destroy AS stationDestroy," + |
| 197 | " b.radius AS stationRadius," + | 197 | " b.radius AS stationRadius," + |
| 198 | " b.shapes_type AS stationShapesType," + | 198 | " b.shapes_type AS stationShapesType," + |