|
@@ -1,8 +1,10 @@
|
|
|
package com.ozs.web.controller.sdk;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
+import com.alibaba.fastjson2.JSONArray;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.google.gson.JsonArray;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
import com.ozs.common.core.domain.entity.SysUser;
|
|
|
import com.ozs.common.core.redis.RedisCache;
|
|
@@ -71,6 +73,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@@ -738,7 +742,8 @@ public class GeoHazardMonitorTokenController {
|
|
|
respHeartbeatVo.setAlarmList(null);
|
|
|
respHeartbeatVo.setAlarmInfo(null);
|
|
|
}
|
|
|
- heartbeatUtils.createHeartbeat(Constant.HERTBEA_KEY+heartbeatVo.getTerminalCode(), twoMap);
|
|
|
+ String string = JSON.toJSONString(twoMap);
|
|
|
+ heartbeatUtils.createHeartbeat(Constant.HERTBEA_KEY+heartbeatVo.getTerminalCode(), string);
|
|
|
jsonObject.put("resultCode", 1);
|
|
|
jsonObject.put("message", "ok");
|
|
|
jsonObject.put("data", respHeartbeatVo);
|
|
@@ -1127,6 +1132,23 @@ public class GeoHazardMonitorTokenController {
|
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(jsonObject), "4370780c9a8c43e5");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/test/{key}")
|
|
|
+ public void test(@PathVariable String key){
|
|
|
+ String heartbeat = heartbeatUtils.getHeartbeat(key);
|
|
|
+ Map maps2 = JSON.parseObject(heartbeat,Map.class);
|
|
|
+ System.out.println(maps2);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/testi")
|
|
|
+ public void testi(){
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
+ map.put("age","18");
|
|
|
+ map.put("name","小明");
|
|
|
+ map.put("gender","男");
|
|
|
+ String string = JSON.toJSONString(map);
|
|
|
+ heartbeatUtils.createHeartbeat("key",string);
|
|
|
+ }
|
|
|
|
|
|
private String objStr(HeartbeatVo heartbeatVoCH) {
|
|
|
JSONObject obj = new JSONObject();
|