Explorar o código

模拟预警信息接口开发

gao.qiang hai 5 meses
pai
achega
da691602fa

+ 1 - 1
vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -243,7 +243,7 @@ public class GeoHazardMonitorTokenController {
      */
     @PostMapping("/api/alarm")
     @Transactional(rollbackFor = Exception.class)
-    public String alarm(@RequestBody ParameterVo parameterVo, HttpServletRequest request) throws Exception {
+    public synchronized String alarm(@RequestBody ParameterVo parameterVo, HttpServletRequest request) throws Exception {
         long begin = System.currentTimeMillis();
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
         log.info("报警信息数据传输开始时间: " + simpleDateFormat.format(new Date(begin)));