From b8cabf895fdd58bbc8dc691398106929f5c96b81 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 24 Jul 2024 11:02:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E9=85=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/station/service/impl/HikVideoServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/HikVideoServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/HikVideoServiceImpl.java index f3fd0ea..da7ed81 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/HikVideoServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/HikVideoServiceImpl.java @@ -53,6 +53,9 @@ public class HikVideoServiceImpl implements IHikVideoService { String contentType = "application/json"; String resultStr = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType, null); JSONObject resultObj = JSONObject.parseObject(resultStr); + if(ObjectUtil.isEmpty(resultObj)){ + throw new ServiceException("该平台信息录入有误,无法找到对应点位!"); + } Assert.isTrue("0".equals(resultObj.getString("code")),()-> { throw new ServiceException(resultObj.getString("msg")); });