diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index 114b215..4149ca6 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -1,5 +1,6 @@ package com.xkrs.service.impl; +import com.fasterxml.jackson.databind.ObjectMapper; import com.xkrs.common.encapsulation.PromptMessageEnum; import com.xkrs.dao.*; import com.xkrs.model.entity.*; @@ -121,6 +122,7 @@ public class FirePointServiceImpl implements FirePointService { } log.info("-------发现新火点"); firePointDao.save(firePointEntity); + forwardPoint(firePointEntity); //发送消息通知 sendBroadcast(firePointEntity); return true; @@ -140,6 +142,15 @@ public class FirePointServiceImpl implements FirePointService { // } } + private void forwardPoint(FirePointEntity firePointEntity) { + try { + String url = "http://121.36.229.60:6811/insertfirepointchannelThree"; + HttpClientUtils.sendHttpPostTextPlain(url, new ObjectMapper().writeValueAsString(firePointEntity)); + } catch (Exception e) { + e.printStackTrace(); + } + } + /** * 检查重复数据 *