From 4e370810753fa4dd1ef9b082947dbb06949f82a7 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Thu, 5 Jan 2023 11:27:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=BB=99=E6=9E=97=E7=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xkrs/service/impl/FirePointServiceImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(); + } + } + /** * 检查重复数据 *