lmstack 3 years ago
parent
commit
be0c9d35ff
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/java/com/lm/lib/controller/ShowDataController.java

+ 2 - 2
src/main/java/com/lm/lib/controller/ShowDataController.java

@@ -59,7 +59,7 @@ public class ShowDataController {
 
     @ApiOperation(value = "获取美团sn")
     @RequestMapping(value = "/getSn", method = RequestMethod.GET)
-    public Map<String, String> getSn() throws IOException {
+    public Map<String, Object> getSn() throws IOException {
         String sql = "select qrcode from py_battery where f_id=141";
         List<Map<String, Object>> snData = moyuJdbcTemplate.queryForList(sql);
         List<String> snList = new ArrayList();
@@ -76,7 +76,7 @@ public class ShowDataController {
     @ApiOperation(value = "获取gps数据")
     @RequestMapping(value = "/allrealtimeInfo", method = RequestMethod.GET)
     public Map<String, Object> gpsInfo() throws IOException {
-        String snString = this.getSn().get("snString");
+        String snString = this.getSn().get("snString").toString();
         Map<String, Object> res = new HashMap<>();
         String sql = "select t2.latitude, t2.longitude, t1.charge_state, t1.devcode from ff_battery_status t1 left join ff_location t2 on t1.devcode = t2.devcode where t2.devcode in (%s)";
         List<Map<String, Object>> realtimeData;