Browse Source

修复:增加视频配置错误提示

zhongwei
ty 4 months ago
parent
commit
b8cabf895f
  1. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/HikVideoServiceImpl.java

3
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 contentType = "application/json";
String resultStr = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType, null); String resultStr = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType, null);
JSONObject resultObj = JSONObject.parseObject(resultStr); JSONObject resultObj = JSONObject.parseObject(resultStr);
if(ObjectUtil.isEmpty(resultObj)){
throw new ServiceException("该平台信息录入有误,无法找到对应点位!");
}
Assert.isTrue("0".equals(resultObj.getString("code")),()-> { Assert.isTrue("0".equals(resultObj.getString("code")),()-> {
throw new ServiceException(resultObj.getString("msg")); throw new ServiceException(resultObj.getString("msg"));
}); });

Loading…
Cancel
Save