火点转发

This commit is contained in:
liuchengqian 2022-10-25 19:57:03 +08:00
parent 6e22d1b952
commit 9505fe33b4
2 changed files with 13 additions and 1 deletions

View File

@ -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.*;
@ -264,6 +265,7 @@ public class FirePointServiceImpl implements FirePointService {
FirePointEntity firePoint = getFirePointByShanDongFirePoint(shanDongFirePoint);
log.info("-------转存新火点");
firePointDao.save(firePoint);
forwardPoint(firePoint);
//发送消息通知
sendBroadcast(firePoint);
return true;
@ -404,6 +406,7 @@ public class FirePointServiceImpl implements FirePointService {
FirePointEntity firePoint = getFirePointByShanDongFirePoint(existShanDongFirePoint);
log.info("-------转存新火点");
firePointDao.save(firePoint);
forwardPoint(firePoint);
//发送消息通知
sendBroadcast(firePoint);
}
@ -504,6 +507,15 @@ public class FirePointServiceImpl implements FirePointService {
return content;
}
private void forwardPoint(FirePointEntity firePointEntity) {
try {
String url = "http://118.24.27.47:10734/insertfirepointchannelThree";
HttpClientUtils.sendHttpPost(url, new ObjectMapper().writeValueAsString(firePointEntity));
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 下载VIP用户火点数据
*/

View File

@ -57,7 +57,7 @@ public class GaoDeApiUtil {
public static void main(String[] args) {
List<String> location = new ArrayList<>();
location.add("117.849,35.59209");
location.add("118.06454,37.8562");
GaoDeIgGeocodeVo geocode = geocode(location);
System.out.println("sdfghjm");