Selaa lähdekoodia

中心端识别程序心跳接口开发

gao.qiang 1 viikko sitten
vanhempi
commit
3d39b16009

+ 5 - 0
hazard-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -395,6 +395,11 @@ public class GeoHazardMonitorTokenController {
             BaseUser admin = baseUserService.getUserName("admin");
             lw.eq(BaseDeviceDynamicManagement::getCameraCode, reqDeviceVo.getCameraCode());
             BaseDeviceDynamicManagement baseDynamicManagement = baseDeviceDynamicManagementService.getOne(lw);
+            if (ObjectUtils.isEmpty(baseDynamicManagement)){
+                jsonObject.put("resultCode", 0);
+                jsonObject.put("message", "相机编码不存在");
+                return SM4Utils.encryptData_ECB(JSONObject.toJSONString(jsonObject), "4370780c9a8c43e5");
+            }
             SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             Date targetDate = dateFormat.parse("2024-10-25 00:00:00");
             log.info("修改时间----" + baseDynamicManagement.getUpdateTime());