Commit 54e31c08d05eb2f068edbade62c21dd3afdad906
1 parent
0bca86d7
反转义
Showing
3 changed files
with
8 additions
and
2 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| 1 | package com.bsth.controller.realcontrol; | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | ||
| 3 | +import java.io.UnsupportedEncodingException; | ||
| 4 | +import java.net.URLDecoder; | ||
| 3 | import java.util.Collection; | 5 | import java.util.Collection; |
| 4 | import java.util.List; | 6 | import java.util.List; |
| 5 | import java.util.Map; | 7 | import java.util.Map; |
| 6 | 8 | ||
| 9 | +import org.apache.commons.lang3.StringEscapeUtils; | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.web.bind.annotation.PathVariable; | 11 | import org.springframework.web.bind.annotation.PathVariable; |
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 12 | import org.springframework.web.bind.annotation.RequestMapping; |
| @@ -223,6 +226,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -223,6 +226,8 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 223 | */ | 226 | */ |
| 224 | @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST) | 227 | @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST) |
| 225 | public Map<String, Object> outgoAdjustAll(@RequestParam String params){ | 228 | public Map<String, Object> outgoAdjustAll(@RequestParam String params){ |
| 229 | + //反转义 | ||
| 230 | + params = StringEscapeUtils.unescapeHtml4(params); | ||
| 226 | return scheduleRealInfoService.outgoAdjustAll(params); | 231 | return scheduleRealInfoService.outgoAdjustAll(params); |
| 227 | } | 232 | } |
| 228 | 233 |
src/main/java/com/bsth/data/BasicData.java
| @@ -127,7 +127,7 @@ public class BasicData implements CommandLineRunner{ | @@ -127,7 +127,7 @@ public class BasicData implements CommandLineRunner{ | ||
| 127 | 127 | ||
| 128 | 128 | ||
| 129 | private void loadStationRouteInfo() { | 129 | private void loadStationRouteInfo() { |
| 130 | - Iterator<StationRoute> iterator = stationRouteRepository.findAll().iterator(); | 130 | + Iterator<StationRoute> iterator = stationRouteRepository.findAll2().iterator(); |
| 131 | Map<String, Integer> map = new HashMap<>(); | 131 | Map<String, Integer> map = new HashMap<>(); |
| 132 | StationRoute route; | 132 | StationRoute route; |
| 133 | 133 |
src/main/java/com/bsth/entity/StationRoute.java
| @@ -21,7 +21,8 @@ import java.util.Date; | @@ -21,7 +21,8 @@ import java.util.Date; | ||
| 21 | @Table(name = "bsth_c_stationroute") | 21 | @Table(name = "bsth_c_stationroute") |
| 22 | @NamedEntityGraphs({ | 22 | @NamedEntityGraphs({ |
| 23 | @NamedEntityGraph(name = "stationRoute_station", attributeNodes = { | 23 | @NamedEntityGraph(name = "stationRoute_station", attributeNodes = { |
| 24 | - @NamedAttributeNode("station") | 24 | + @NamedAttributeNode("station"), |
| 25 | + @NamedAttributeNode("line") | ||
| 25 | }) | 26 | }) |
| 26 | }) | 27 | }) |
| 27 | public class StationRoute { | 28 | public class StationRoute { |