mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
add 增加工具示例
This commit is contained in:
parent
95ddcde9e0
commit
1cc0062258
@ -21,6 +21,16 @@ snail-job:
|
||||
# 详见 script/sql/snail_job.sql `sj_namespace` 表
|
||||
namespace: ${spring.profiles.active}
|
||||
|
||||
--- # 第三方请求
|
||||
forest:
|
||||
# 打开或关闭日志(默认为 true)
|
||||
log-enabled: true
|
||||
# 打开/关闭Forest请求日志(默认为 true)
|
||||
log-request: true
|
||||
# 打开/关闭Forest响应状态日志(默认为 true)
|
||||
log-response-status: true
|
||||
# 打开/关闭Forest响应内容日志(默认为 false)
|
||||
log-response-content: true
|
||||
|
||||
--- # 数据源配置
|
||||
spring:
|
||||
|
||||
25
ruoyi-client/pom.xml
Normal file
25
ruoyi-client/pom.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi-vue-plus</artifactId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<modules>
|
||||
<module>ruoyi-client-bom</module>
|
||||
<module>ruoyi-client-demo</module>
|
||||
<module>ruoyi-client-guide</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>ruoyi-client</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<description>
|
||||
ruoyi-client 客户端模块
|
||||
</description>
|
||||
|
||||
</project>
|
||||
41
ruoyi-client/ruoyi-client-bom/pom.xml
Normal file
41
ruoyi-client/ruoyi-client-bom/pom.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-client-bom</artifactId>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<description>
|
||||
ruoyi-client-bom client 依赖项
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<revision>5.1.2</revision>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<!-- demo第三方请求服务 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-client-demo</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 高德地图API -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-client-guide</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
||||
32
ruoyi-client/ruoyi-client-demo/pom.xml
Normal file
32
ruoyi-client/ruoyi-client-demo/pom.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-client</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-client-demo</artifactId>
|
||||
|
||||
<description>
|
||||
ruoyi-client-demo demo第三方请求服务示例
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-forest</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-crypto</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,29 @@
|
||||
package org.dromara.demo.client;
|
||||
|
||||
import com.dtflys.forest.annotation.BaseRequest;
|
||||
import com.dtflys.forest.annotation.JSONBody;
|
||||
import com.dtflys.forest.annotation.Post;
|
||||
import com.dtflys.forest.http.ForestResponse;
|
||||
|
||||
/**
|
||||
* demo第三方请求服务
|
||||
*/
|
||||
@BaseRequest(baseURL = "{thdahhrfs.ip}/fcj_zlf_caps_api",
|
||||
contentType = "application/json",
|
||||
charset = "UTF-8",
|
||||
interceptor = ThdahhrfsIntercepto.class
|
||||
)
|
||||
public interface ThdahhrfsClient {
|
||||
|
||||
/**
|
||||
* 企业信息验证接口
|
||||
*
|
||||
* @param companyName 企业名称
|
||||
* @param organizationCode 社会统一信用代码
|
||||
* @return 返回报文
|
||||
*/
|
||||
@Post(url = "/bank/ValidateEnterpriseInfo")
|
||||
ForestResponse<String> validateEnterpriselnfo(@JSONBody("CompanyName") String companyName,
|
||||
@JSONBody("OrganizationCode") String organizationCode);
|
||||
|
||||
}
|
||||
@ -0,0 +1,129 @@
|
||||
package org.dromara.demo.client;
|
||||
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import com.dtflys.forest.exceptions.ForestRuntimeException;
|
||||
import com.dtflys.forest.http.ForestRequest;
|
||||
import com.dtflys.forest.http.ForestRequestType;
|
||||
import com.dtflys.forest.http.ForestResponse;
|
||||
import com.dtflys.forest.interceptor.Interceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.demo.config.ThdahhrfsProperties;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* 请求拦截 请求前添加key
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@Slf4j
|
||||
public class ThdahhrfsIntercepto<T> implements Interceptor<T> {
|
||||
|
||||
public static final String TIMESTAMP = "Timestamp";
|
||||
public static final String APPID = "Appid";
|
||||
public static final String APP_SECRET = "AppSecret";
|
||||
public static final String U_KEY = "Ukey";
|
||||
public static final String SIGN = "Sign";
|
||||
private static final ThdahhrfsProperties THDAHHRFS = SpringUtils.getBean(ThdahhrfsProperties.class);
|
||||
private static String IP = SpringUtils.getProperty("forest.variables.thdahhrfs.ip");
|
||||
/**
|
||||
* 该方法在请求发送之前被调用, 若返回false则不会继续发送请求
|
||||
*/
|
||||
@Override
|
||||
public boolean beforeExecute(ForestRequest req) {
|
||||
// 取值:unix时间戳
|
||||
long timestamp = System.currentTimeMillis();
|
||||
String appid = THDAHHRFS.getAppid();
|
||||
// 对AppSecret加密后的字符串
|
||||
String appSecret = THDAHHRFS.getAppSecret();
|
||||
// 对Appid进行MD5加密生成32位的字符串
|
||||
String uKey = DigestUtil.md5Hex(appid);
|
||||
|
||||
req.addHeader(TIMESTAMP, timestamp);
|
||||
req.addHeader(APPID, appid);
|
||||
req.addHeader(APP_SECRET, appSecret);
|
||||
req.addHeader(U_KEY, uKey);
|
||||
|
||||
String signString = "";
|
||||
if (ForestRequestType.POST == req.getType() || ForestRequestType.GET == req.getType()) {
|
||||
//添加请求参数到签名字符串中
|
||||
Map<String, Object> signData = new HashMap<>();
|
||||
if(ForestRequestType.POST == req.getType()){
|
||||
//按照键的Unicode码点排序
|
||||
String body = sortJsonByKey(JsonUtils.parseObject(req.body().encodeToString(), Map.class));
|
||||
req.body().clear();
|
||||
req.addBody(body);
|
||||
signData.put("DATA", body);
|
||||
}else if(ForestRequestType.GET == req.getType()){
|
||||
for (String key:req.getQuery().keySet()){
|
||||
signData.put(key.toUpperCase(),req.getQuery(key));
|
||||
}
|
||||
}
|
||||
signData.put("URL", "{URL}");
|
||||
signData.put(TIMESTAMP.toUpperCase(), String.valueOf(timestamp));
|
||||
signData.put(APPID.toUpperCase(), appid);
|
||||
signData.put(U_KEY.toUpperCase(), uKey);
|
||||
signString = sortJsonByKey(signData).replace("{URL}", req.getUrl().replace(IP, ""))
|
||||
.replace("\\\\\\", "\\\\");
|
||||
log.info("--------------签名字符串未加密前信息---------------:{}", signString);
|
||||
}
|
||||
//通过MD5计算得到的32位hash值后,并转16进制且对结果转大写生成的字符串
|
||||
req.addHeader(SIGN, DigestUtil.md5Hex(signString).toUpperCase());
|
||||
return true;
|
||||
}
|
||||
|
||||
//@Override
|
||||
//public void afterExecute(ForestRequest request, ForestResponse response) {
|
||||
// Interceptor.super.afterExecute(request, response);
|
||||
//}
|
||||
|
||||
/**
|
||||
* 该方法在请求成功响应时被调用
|
||||
*/
|
||||
@Override
|
||||
public void afterExecute(ForestRequest request, ForestResponse res) {
|
||||
if (res.getStatusCode() != 200) {
|
||||
throw new ServiceException("HTTP响应状态码:" + res.getStatusCode());
|
||||
}
|
||||
// 解析响应体为Map对象
|
||||
Map<String, Object> result = JsonUtils.parseObject(res.getContent(), Map.class);
|
||||
// 检查是否缺少 'code' 字段
|
||||
if (!result.containsKey("code")) {
|
||||
throw new ServiceException("获取请求体失败:缺少 'code' 字段");
|
||||
}
|
||||
// 获取 'code' 字段的值并转换为整数
|
||||
int code = (int) result.get("code");
|
||||
// 检查是否缺少 'data' 字段
|
||||
if (!result.containsKey("data")) {
|
||||
throw new ServiceException("获取请求体失败:缺少 'data' 字段");
|
||||
}
|
||||
// 如果 'code' 不等于 200,抛出异常
|
||||
if (code != 200) {
|
||||
String errorMsg = result.containsKey("msg") ? result.get("msg").toString() : "未知错误";
|
||||
throw new ServiceException(errorMsg);
|
||||
}
|
||||
// 将 'data' 字段的值设置为结果
|
||||
res.setResult(JsonUtils.toJsonString(result.get("data")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 该方法在请求发送失败时被调用
|
||||
*/
|
||||
@Override
|
||||
public void onError(ForestRuntimeException ex, ForestRequest req, ForestResponse res) {
|
||||
throw new ServiceException("HTTP响应状态码:" + res.getStatusCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照键的Unicode码点排序
|
||||
*/
|
||||
private static String sortJsonByKey(Map<String, Object> map) {
|
||||
return JsonUtils.toJsonString((new TreeMap<>(map)));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package org.dromara.demo.client.gd;
|
||||
|
||||
import cn.hutool.core.util.CoordinateUtil;
|
||||
import com.dtflys.forest.annotation.BaseRequest;
|
||||
import com.dtflys.forest.annotation.Get;
|
||||
import com.dtflys.forest.annotation.Query;
|
||||
import com.dtflys.forest.annotation.Var;
|
||||
import org.dromara.demo.client.gd.vo.*;
|
||||
|
||||
/**
|
||||
* 高德请求工具
|
||||
*
|
||||
* @author bkywksj
|
||||
*/
|
||||
@BaseRequest(baseURL = "https://restapi.amap.com", interceptor = GdInterceptor.class)
|
||||
public interface GdClient {
|
||||
|
||||
|
||||
/**
|
||||
* 根据ip获取ip信息
|
||||
*
|
||||
* @param ip ip地址
|
||||
* @param type 4代表ipv4
|
||||
* @return 地址信息
|
||||
*/
|
||||
@Get(url = "/v3/ip")
|
||||
IPVO getLocationByIp(@Query("ip") String ip, @Query("type") String type);
|
||||
|
||||
/**
|
||||
* 根据位置获取经纬度信息 地理编码
|
||||
*
|
||||
* @param address 位置
|
||||
* @return 地理解析返回对象
|
||||
*/
|
||||
@Get(url = "/v3/geocode/geo?output=json")
|
||||
GeoVO geo(@Query("address") String address);
|
||||
|
||||
/**
|
||||
* 根据经纬度获取位置等信息 地理逆编码
|
||||
*
|
||||
* @param coord 经纬度
|
||||
* @return 地理解析返回对象
|
||||
*/
|
||||
@Get(url = "/v3/geocode/regeo?output=json&location=${coord.lng},${coord.lat}")
|
||||
RegeoVO regeo(@Var("coord") CoordinateUtil.Coordinate coord);
|
||||
|
||||
/**
|
||||
* 根据位置获取经纬度信息 地理编码
|
||||
*
|
||||
* @param adcode adcode
|
||||
* @return 地理解析返回对象
|
||||
*/
|
||||
@Get(url = "/v3/weather/weatherInfo")
|
||||
Weather getWeatherByAdcode(@Query("city") String adcode);
|
||||
|
||||
/**
|
||||
* 根据位置获取经纬度信息 地理编码
|
||||
*
|
||||
* @param start 起始经纬度
|
||||
* @param end 终止经纬度
|
||||
* @return 距离信息
|
||||
*/
|
||||
@Get(url = "/v3/distance?type=0&origins=${origins.lng},${origins.lat}&destination=${destination.lng},${destination.lat}")
|
||||
DistanceVo getDistance(@Var("origins") CoordinateUtil.Coordinate start, @Query("destination") CoordinateUtil.Coordinate end);
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package org.dromara.demo.client.gd;
|
||||
|
||||
import com.dtflys.forest.http.ForestRequest;
|
||||
import com.dtflys.forest.interceptor.Interceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 请求拦截 请求前添加key
|
||||
*
|
||||
* @author ye
|
||||
*/
|
||||
@Slf4j
|
||||
public class GdInterceptor implements Interceptor<String> {
|
||||
|
||||
/**
|
||||
* 密钥 xxxxxxxxxxxxxxxxxxxxxx
|
||||
*/
|
||||
private static final String KEY = "xxxxxxxxxxxxxxxxxxx";
|
||||
|
||||
|
||||
/**
|
||||
* 该方法在请求发送之前被调用, 若返回false则不会继续发送请求
|
||||
*
|
||||
* @param req Forest请求对象
|
||||
*/
|
||||
@Override
|
||||
public boolean beforeExecute(ForestRequest req) {
|
||||
// 添加URL的Query参数
|
||||
req.addQuery("key", KEY);
|
||||
// 继续执行请求返回true
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,235 @@
|
||||
package org.dromara.demo.client.gd;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.CoordinateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.dtflys.forest.config.ForestConfiguration;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.demo.client.gd.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 高德地图API
|
||||
*
|
||||
* @author ye
|
||||
*/
|
||||
public class GdUtil {
|
||||
|
||||
private static GdClient CLIENT;
|
||||
|
||||
static {
|
||||
try {
|
||||
CLIENT = SpringUtils.getBean(GdClient.class);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
//在springboot容器中拿不到就创建一个
|
||||
if (ObjectUtil.isNull(CLIENT)) {
|
||||
//创建默认forest配置,创建一个GdClient实例
|
||||
CLIENT = ForestConfiguration.createConfiguration().createInstance(GdClient.class);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据位置获取经纬度等信息 地理编码
|
||||
*
|
||||
* @param address 位置
|
||||
* @return 经纬度等信息
|
||||
*/
|
||||
public static GeoVO geo(String address) {
|
||||
return CLIENT.geo(address);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据位置获取经纬度
|
||||
*
|
||||
* @param address 位置
|
||||
* @return 经纬度
|
||||
*/
|
||||
public static CoordinateUtil.Coordinate getLocationByAddress(String address) {
|
||||
GeoVO geo = CLIENT.geo(address);
|
||||
//要进行非空判断
|
||||
if (ObjectUtil.isNull(geo)) {
|
||||
return null;
|
||||
}
|
||||
List<GeoVO.GeocodesDTO> geocodes = geo.getGeocodes();
|
||||
if (geocodes.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
String location = geocodes.get(0).getLocation();
|
||||
String[] split = location.split(",");
|
||||
if (split.length != 2) {
|
||||
return null;
|
||||
}
|
||||
return new CoordinateUtil.Coordinate(Double.parseDouble(split[0]), Double.parseDouble(split[1]));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据经纬度获取位置等信息 地理逆编码
|
||||
*
|
||||
* @param coord 经纬度
|
||||
* @return 地理解析返回对象
|
||||
*/
|
||||
public static RegeoVO regeo(CoordinateUtil.Coordinate coord) {
|
||||
if (ObjectUtil.isNull(coord.getLng()) || ObjectUtil.isNull(coord.getLat())) {
|
||||
return null;
|
||||
}
|
||||
return CLIENT.regeo(coord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据经纬度获取具体位置 地理逆编码
|
||||
*
|
||||
* @param coord 经纬度
|
||||
* @return 地址
|
||||
*/
|
||||
public static String getAddressByCoord(CoordinateUtil.Coordinate coord) {
|
||||
RegeoVO regeo = regeo(coord);
|
||||
if (ObjectUtil.isNull(regeo)) {
|
||||
return null;
|
||||
}
|
||||
RegeoVO.RegeocodeDTO regeocode = regeo.getRegeocode();
|
||||
if (ObjectUtil.isNull(regeocode)) {
|
||||
return null;
|
||||
}
|
||||
return regeocode.getFormattedAddress();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据经纬度获取adcode
|
||||
*
|
||||
* @param coord 经纬度
|
||||
* @return adcode
|
||||
*/
|
||||
public static String getAdcodeByCoord(CoordinateUtil.Coordinate coord) {
|
||||
RegeoVO regeo = regeo(coord);
|
||||
if (ObjectUtil.isNull(regeo)) {
|
||||
return null;
|
||||
}
|
||||
RegeoVO.RegeocodeDTO regeocode = regeo.getRegeocode();
|
||||
if (ObjectUtil.isNull(regeocode)) {
|
||||
return null;
|
||||
}
|
||||
RegeoVO.RegeocodeDTO.AddressComponentDTO addressComponent = regeocode.getAddressComponent();
|
||||
if (ObjectUtil.isNull(addressComponent)) {
|
||||
return null;
|
||||
}
|
||||
return addressComponent.getAdcode();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据位置获取adcode
|
||||
*
|
||||
* @param address 位置
|
||||
* @return adcode
|
||||
*/
|
||||
public static String getAdcodeByAddress(String address) {
|
||||
GeoVO geo = geo(address);
|
||||
if (geo == null) {
|
||||
return null;
|
||||
}
|
||||
List<GeoVO.GeocodesDTO> geocodes = geo.getGeocodes();
|
||||
if (CollUtil.isEmpty(geocodes)) {
|
||||
return null;
|
||||
}
|
||||
return geocodes.get(0).getAdcode();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据adcode获取天气等信息
|
||||
*
|
||||
* @param adcode adcode
|
||||
* @return 天气
|
||||
*/
|
||||
public static Weather.LivesDTO getWeatherByAdcode(@NotBlank String adcode) {
|
||||
Weather weather = CLIENT.getWeatherByAdcode(adcode);
|
||||
if (ObjectUtil.isNull(weather)) {
|
||||
return null;
|
||||
}
|
||||
List<Weather.LivesDTO> lives = weather.getLives();
|
||||
if (CollUtil.isEmpty(lives)) {
|
||||
return null;
|
||||
}
|
||||
return lives.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据经纬度获取天气
|
||||
*
|
||||
* @param coord 经纬度
|
||||
* @return 天气
|
||||
*/
|
||||
public static Weather.LivesDTO getWeatherByCoord(CoordinateUtil.Coordinate coord) {
|
||||
String adcode = getAdcodeByCoord(coord);
|
||||
if (StringUtils.isBlank(adcode)) {
|
||||
return null;
|
||||
}
|
||||
return getWeatherByAdcode(adcode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据位置获取天气
|
||||
*
|
||||
* @param address 位置
|
||||
* @return 天气
|
||||
*/
|
||||
public static Weather.LivesDTO getWeatherByAddress(String address) {
|
||||
String adcode = getAdcodeByAddress(address);
|
||||
if (StrUtil.isEmpty(adcode)) {
|
||||
return null;
|
||||
}
|
||||
return getWeatherByAdcode(adcode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ip获取ip信息
|
||||
*
|
||||
* @param ip ip地址
|
||||
* @param type 4代表ipv4
|
||||
* @return 地址信息
|
||||
*/
|
||||
public static IPVO getLocationByIp(@NotBlank String ip, @NotBlank String type) {
|
||||
return CLIENT.getLocationByIp(ip, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ip获取地址
|
||||
*
|
||||
* @param ip ip地址
|
||||
* @param type 4代表ipv4
|
||||
* @return 地址信息
|
||||
*/
|
||||
public static String getAddressByIp(String ip, String type) {
|
||||
IPVO ipvo = getLocationByIp(ip, type);
|
||||
if (ObjectUtil.isNull(ipvo)) {
|
||||
return null;
|
||||
}
|
||||
String location = ipvo.getLocation();
|
||||
String[] split = location.split(",");
|
||||
if (split.length != 2) {
|
||||
return null;
|
||||
}
|
||||
CoordinateUtil.Coordinate coord = new CoordinateUtil.Coordinate(Double.parseDouble(split[0]), Double.parseDouble(split[1]));
|
||||
return getAddressByCoord(coord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取起点和终点经纬度距离
|
||||
*
|
||||
* @param start 起点
|
||||
* @param end 终点
|
||||
*/
|
||||
public static Long getDistance(@NotNull CoordinateUtil.Coordinate start, @NotNull CoordinateUtil.Coordinate end) {
|
||||
DistanceVo distanceVo = CLIENT.getDistance(start, end);
|
||||
List<DistanceVo.ResultsDTO> results = distanceVo.getResults();
|
||||
if (CollUtil.isEmpty(results)) {
|
||||
return null;
|
||||
}
|
||||
DistanceVo.ResultsDTO resultsDTO = results.get(0);
|
||||
return Long.valueOf(resultsDTO.getDistance());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package org.dromara.demo.client.gd.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 距离信息
|
||||
*
|
||||
* @author ye
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DistanceVo {
|
||||
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
@JsonProperty("info")
|
||||
private String info;
|
||||
@JsonProperty("infocode")
|
||||
private String infocode;
|
||||
@JsonProperty("count")
|
||||
private String count;
|
||||
@JsonProperty("results")
|
||||
private List<ResultsDTO> results;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class ResultsDTO {
|
||||
@JsonProperty("origin_id")
|
||||
private String originId;
|
||||
@JsonProperty("dest_id")
|
||||
private String destId;
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
@JsonProperty("duration")
|
||||
private String duration;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package org.dromara.demo.client.gd.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 地理解析返回对象
|
||||
*
|
||||
* @author ye
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class GeoVO {
|
||||
|
||||
|
||||
/**
|
||||
* status : 1
|
||||
* info : OK
|
||||
* infocode : 10000
|
||||
* count : 1
|
||||
* geocodes : [{"formatted_address":"北京市朝阳区阜通东大街|6号","country":"中国","province":"北京市","citycode":"010","city":"北京市","district":"朝阳区","township":[],"neighborhood":{"name":[],"type":[]},"building":{"name":[],"type":[]},"adcode":"110105","street":"阜通东大街","number":"6号","location":"116.483038,39.990633","level":"门牌号"}]
|
||||
*/
|
||||
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
@JsonProperty("info")
|
||||
private String info;
|
||||
@JsonProperty("infocode")
|
||||
private String infocode;
|
||||
@JsonProperty("count")
|
||||
private String count;
|
||||
@JsonProperty("geocodes")
|
||||
private List<GeocodesDTO> geocodes;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class GeocodesDTO {
|
||||
/**
|
||||
* formatted_address : 北京市朝阳区阜通东大街|6号
|
||||
* country : 中国
|
||||
* province : 北京市
|
||||
* citycode : 010
|
||||
* city : 北京市
|
||||
* district : 朝阳区
|
||||
* township : []
|
||||
* neighborhood : {"name":[],"type":[]}
|
||||
* building : {"name":[],"type":[]}
|
||||
* adcode : 110105
|
||||
* street : 阜通东大街
|
||||
* number : 6号
|
||||
* location : 116.483038,39.990633
|
||||
* level : 门牌号
|
||||
*/
|
||||
|
||||
@JsonProperty("formatted_address")
|
||||
private String formattedAddress;
|
||||
@JsonProperty("country")
|
||||
private String country;
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
@JsonProperty("district")
|
||||
private String district;
|
||||
@JsonProperty("township")
|
||||
private List<String> township;
|
||||
@JsonProperty("neighborhood")
|
||||
private NeighborhoodDTO neighborhood;
|
||||
@JsonProperty("building")
|
||||
private BuildingDTO building;
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
@JsonProperty("street")
|
||||
private String street;
|
||||
@JsonProperty("number")
|
||||
private String number;
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
@JsonProperty("level")
|
||||
private String level;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class NeighborhoodDTO {
|
||||
@JsonProperty("name")
|
||||
private List<String> name;
|
||||
@JsonProperty("type")
|
||||
private List<String> type;
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BuildingDTO {
|
||||
@JsonProperty("name")
|
||||
private List<String> name;
|
||||
@JsonProperty("type")
|
||||
private List<String> type;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package org.dromara.demo.client.gd.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* ip获取位置传输对象
|
||||
*
|
||||
* @author ye
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class IPVO {
|
||||
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
@JsonProperty("info")
|
||||
private String info;
|
||||
@JsonProperty("infocode")
|
||||
private String infocode;
|
||||
@JsonProperty("country")
|
||||
private String country;
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
@JsonProperty("district")
|
||||
private String district;
|
||||
@JsonProperty("isp")
|
||||
private String isp;
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
@JsonProperty("ip")
|
||||
private String ip;
|
||||
}
|
||||
@ -0,0 +1,159 @@
|
||||
package org.dromara.demo.client.gd.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 逆地理返回传输对象
|
||||
*
|
||||
* @author ye
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class RegeoVO {
|
||||
|
||||
/**
|
||||
* status : 1
|
||||
* regeocode : {"addressComponent":{"city":[],"province":"北京市","adcode":"110108","district":"海淀区","towncode":"110108015000","streetNumber":{"number":"5号","location":"116.310454,39.992734","direction":"东北","distance":"94.5489","street":"颐和园路"},"country":"中国","township":"燕园街道","businessAreas":[{"location":"116.303364,39.976410","name":"万泉河","id":"110108"},{"location":"116.314222,39.982490","name":"中关村","id":"110108"},{"location":"116.294214,39.996850","name":"西苑","id":"110108"}],"building":{"name":"北京大学","type":"科教文化服务;学校;高等院校"},"neighborhood":{"name":"北京大学","type":"科教文化服务;学校;高等院校"},"citycode":"010"},"formatted_address":"北京市海淀区燕园街道北京大学"}
|
||||
* info : OK
|
||||
* infocode : 10000
|
||||
*/
|
||||
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
@JsonProperty("regeocode")
|
||||
private RegeocodeDTO regeocode;
|
||||
@JsonProperty("info")
|
||||
private String info;
|
||||
@JsonProperty("infocode")
|
||||
private String infocode;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class RegeocodeDTO {
|
||||
/**
|
||||
* addressComponent : {"city":[],"province":"北京市","adcode":"110108","district":"海淀区","towncode":"110108015000","streetNumber":{"number":"5号","location":"116.310454,39.992734","direction":"东北","distance":"94.5489","street":"颐和园路"},"country":"中国","township":"燕园街道","businessAreas":[{"location":"116.303364,39.976410","name":"万泉河","id":"110108"},{"location":"116.314222,39.982490","name":"中关村","id":"110108"},{"location":"116.294214,39.996850","name":"西苑","id":"110108"}],"building":{"name":"北京大学","type":"科教文化服务;学校;高等院校"},"neighborhood":{"name":"北京大学","type":"科教文化服务;学校;高等院校"},"citycode":"010"}
|
||||
* formatted_address : 北京市海淀区燕园街道北京大学
|
||||
*/
|
||||
|
||||
@JsonProperty("addressComponent")
|
||||
private AddressComponentDTO addressComponent;
|
||||
@JsonProperty("formatted_address")
|
||||
private String formattedAddress;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AddressComponentDTO {
|
||||
/**
|
||||
* city : []
|
||||
* province : 北京市
|
||||
* adcode : 110108
|
||||
* district : 海淀区
|
||||
* towncode : 110108015000
|
||||
* streetNumber : {"number":"5号","location":"116.310454,39.992734","direction":"东北","distance":"94.5489","street":"颐和园路"}
|
||||
* country : 中国
|
||||
* township : 燕园街道
|
||||
* businessAreas : [{"location":"116.303364,39.976410","name":"万泉河","id":"110108"},{"location":"116.314222,39.982490","name":"中关村","id":"110108"},{"location":"116.294214,39.996850","name":"西苑","id":"110108"}]
|
||||
* building : {"name":"北京大学","type":"科教文化服务;学校;高等院校"}
|
||||
* neighborhood : {"name":"北京大学","type":"科教文化服务;学校;高等院校"}
|
||||
* citycode : 010
|
||||
*/
|
||||
|
||||
@JsonProperty("city")
|
||||
private List<?> city;
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
@JsonProperty("district")
|
||||
private String district;
|
||||
@JsonProperty("towncode")
|
||||
private String towncode;
|
||||
@JsonProperty("streetNumber")
|
||||
private StreetNumberDTO streetNumber;
|
||||
@JsonProperty("country")
|
||||
private String country;
|
||||
@JsonProperty("township")
|
||||
private String township;
|
||||
@JsonProperty("businessAreas")
|
||||
private List<BusinessAreasDTO> businessAreas;
|
||||
@JsonProperty("building")
|
||||
private BuildingDTO building;
|
||||
@JsonProperty("neighborhood")
|
||||
private NeighborhoodDTO neighborhood;
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class StreetNumberDTO {
|
||||
/**
|
||||
* number : 5号
|
||||
* location : 116.310454,39.992734
|
||||
* direction : 东北
|
||||
* distance : 94.5489
|
||||
* street : 颐和园路
|
||||
*/
|
||||
|
||||
@JsonProperty("number")
|
||||
private String number;
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
@JsonProperty("street")
|
||||
private String street;
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BuildingDTO {
|
||||
/**
|
||||
* name : 北京大学
|
||||
* type : 科教文化服务;学校;高等院校
|
||||
*/
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class NeighborhoodDTO {
|
||||
/**
|
||||
* name : 北京大学
|
||||
* type : 科教文化服务;学校;高等院校
|
||||
*/
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusinessAreasDTO {
|
||||
/**
|
||||
* location : 116.303364,39.976410
|
||||
* name : 万泉河
|
||||
* id : 110108
|
||||
*/
|
||||
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package org.dromara.demo.client.gd.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询天气返回对象
|
||||
*
|
||||
* @author ye
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Weather {
|
||||
|
||||
/**
|
||||
* status : 1
|
||||
* count : 1
|
||||
* info : OK
|
||||
* infocode : 10000
|
||||
* lives : [{"province":"北京","city":"朝阳区","adcode":"110105","weather":"阴","temperature":"32","winddirection":"西南","windpower":"4","humidity":"41","reporttime":"2021-05-22 15:34:11"}]
|
||||
*/
|
||||
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
@JsonProperty("count")
|
||||
private String count;
|
||||
@JsonProperty("info")
|
||||
private String info;
|
||||
@JsonProperty("infocode")
|
||||
private String infocode;
|
||||
@JsonProperty("lives")
|
||||
private List<LivesDTO> lives;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class LivesDTO {
|
||||
/**
|
||||
* province : 北京
|
||||
* city : 朝阳区
|
||||
* adcode : 110105
|
||||
* weather : 阴
|
||||
* temperature : 32
|
||||
* winddirection : 西南
|
||||
* windpower : 4
|
||||
* humidity : 41
|
||||
* reporttime : 2021-05-22 15:34:11
|
||||
*/
|
||||
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
@JsonProperty("weather")
|
||||
private String weather;
|
||||
@JsonProperty("temperature")
|
||||
private String temperature;
|
||||
@JsonProperty("winddirection")
|
||||
private String winddirection;
|
||||
@JsonProperty("windpower")
|
||||
private String windpower;
|
||||
@JsonProperty("humidity")
|
||||
private String humidity;
|
||||
@JsonProperty("reporttime")
|
||||
private String reporttime;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package org.dromara.demo.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "client.thdahhrfs")
|
||||
public class ThdahhrfsProperties {
|
||||
|
||||
private String appid;
|
||||
|
||||
/**
|
||||
* 使用分配的Appid通过加密后生成
|
||||
*/
|
||||
private String appSecret;
|
||||
|
||||
/**
|
||||
* SM2公钥
|
||||
*/
|
||||
private String publicKey;
|
||||
|
||||
/**
|
||||
* SM2私钥
|
||||
*/
|
||||
private String privateKey;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package org.dromara.demo.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 企业信息验证接口
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class ThdahhrfsResult implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* true,false
|
||||
*/
|
||||
@JsonProperty("isSuccess")
|
||||
private Boolean success;
|
||||
|
||||
/**
|
||||
* 异常信息
|
||||
*/
|
||||
@JsonProperty("exception")
|
||||
private String exception;
|
||||
|
||||
/**
|
||||
* 结果
|
||||
*/
|
||||
@JsonProperty("result")
|
||||
private String result;
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package org.dromara.demo.util;
|
||||
|
||||
import com.dtflys.forest.Forest;
|
||||
import com.dtflys.forest.http.ForestResponse;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.forest.exception.ForestException;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.demo.client.ThdahhrfsClient;
|
||||
import org.dromara.demo.domain.ThdahhrfsResult;
|
||||
|
||||
/**
|
||||
* demo第三方请求服务请求工具
|
||||
*/
|
||||
public class ThdahhrfsUtil {
|
||||
private static ThdahhrfsClient CLIENT = Forest.client(ThdahhrfsClient.class);
|
||||
|
||||
/**
|
||||
* 企业信息验证接口
|
||||
*
|
||||
* @param companyName 企业名称
|
||||
* @param organizationCode 社会统一信用代码
|
||||
* @return 返回报文
|
||||
*/
|
||||
public static ThdahhrfsResult validateEnterpriselnfo(String companyName, String organizationCode) {
|
||||
ForestResponse<String> response = CLIENT.validateEnterpriselnfo(companyName, organizationCode);
|
||||
if (!response.isSuccess()) {
|
||||
throw new ForestException("请求第三方异常:" + response.getException());
|
||||
}
|
||||
String result = response.getResult();
|
||||
if (StringUtils.isBlank(result)) {
|
||||
return null;
|
||||
}
|
||||
return JsonUtils.parseObject(result, ThdahhrfsResult.class);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
org.dromara.demo.config.ThdahhrfsProperties
|
||||
@ -0,0 +1,16 @@
|
||||
forest:
|
||||
# 全局变量
|
||||
variables:
|
||||
# demo第三方请求服务
|
||||
thdahhrfs:
|
||||
# 请求地址
|
||||
ip: http://zlzjapi.sanshi.yunsee.cn:8090
|
||||
|
||||
client:
|
||||
# demo第三方请求服务
|
||||
thdahhrfs:
|
||||
appid: 84fd3bb528549d07
|
||||
appSecret: Wpe/t9fkrpDux6cv5dx8h1JW4THCpLBop0USj+wSBUbj+oPJA+UhQPCu0nPxMTZUXDU3e9jk60WnkMIQDuUbSeBOVftnpqONu35afozxOpyg50BRR9phyajD0mcI/mFlfuh0GMGkMQG54qg4UDc1c7h2iCtTkfvGQUGR1jsrSCn1YOLiEqKBOkFDdw7eEMFYkIoXf1R3FScwxmAUdBK2LFAv67yhjEJyajLFur+oQVQ232oGXZbCfzP6Nw6JtymdNFMravd5q5E7bDfuGJWlObYQtiUyOpq9HH4Yn9YhRHgMppE6uVaYON/sGEiv375Nm6cA4qiXeiUiFBCyjkTaYw==
|
||||
# SM2公私钥 非对称算法的公私钥
|
||||
publicKey: 049927d887e38ebd30d4418b5e5785f75014efaec36cc2dce9ce49bfad42d81c2d0b0b5bc360cc56d0f9d17d178d6cb091d8449adc3b57ab196f6d7ec61ffabcea
|
||||
privateKey: fc4a50a91c25a85bfc8c6ab4c60005c986007afb9ccf9503afc880c4001f1803
|
||||
27
ruoyi-client/ruoyi-client-guide/pom.xml
Normal file
27
ruoyi-client/ruoyi-client-guide/pom.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-client</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-client-guide</artifactId>
|
||||
|
||||
<description>
|
||||
ruoyi-client-guide 高德地图API
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-forest</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
||||
package org.dromara.guide.client;
|
||||
|
||||
import com.dtflys.forest.http.ForestRequest;
|
||||
import com.dtflys.forest.interceptor.Interceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
|
||||
/**
|
||||
* 请求拦截 请求前添加key
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@Slf4j
|
||||
public class GuideIntercepto<T> implements Interceptor<T> {
|
||||
|
||||
private static final String KEY = SpringUtils.getProperty("client.guide.key");
|
||||
|
||||
/**
|
||||
* 该方法在请求发送之前被调用, 若返回false则不会继续发送请求
|
||||
*
|
||||
* @param request Forest请求对象
|
||||
*/
|
||||
@Override
|
||||
public boolean beforeExecute(ForestRequest request) {
|
||||
request.addQuery("key", KEY);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package org.dromara.guide.client;
|
||||
|
||||
import com.dtflys.forest.annotation.BaseRequest;
|
||||
import com.dtflys.forest.annotation.Get;
|
||||
import com.dtflys.forest.annotation.Query;
|
||||
import org.dromara.guide.domain.vo.TrafficVo;
|
||||
|
||||
/**
|
||||
* 高德地图API请求服务
|
||||
* <p>参考文档:<a href="https://lbs.amap.com/api/webservice/guide/api/traffic-incident">GuideTrafficClient</a></p>
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@BaseRequest(baseURL = "https://et-api.amap.com", charset = "UTF-8")
|
||||
public interface GuideTrafficClient {
|
||||
|
||||
/**
|
||||
* 交通事件查询
|
||||
*
|
||||
* @param adcode 城市代码:授权城市ADCODE(城市级)
|
||||
* @param eventType 事件类型:仅获取对应类型事件,多个;分割
|
||||
* @param isExpressway 只获取高速:仅获取高速类事件。1-是 0-否
|
||||
* @return TrafficVo 事件信息
|
||||
*/
|
||||
@Get(url = "/event/queryByAdcode", interceptor = GuideTrafficIntercepto.class)
|
||||
TrafficVo queryByAdcode(@Query("adcode") String adcode, @Query("eventType") String eventType, @Query("isExpressway") String isExpressway);
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package org.dromara.guide.client;
|
||||
|
||||
import com.dtflys.forest.http.ForestRequest;
|
||||
import com.dtflys.forest.interceptor.Interceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
|
||||
/**
|
||||
* 请求拦截 请求前添加key
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@Slf4j
|
||||
public class GuideTrafficIntercepto<T> implements Interceptor<T> {
|
||||
|
||||
private static final String KEY = SpringUtils.getProperty("client.guide.clientKey");
|
||||
|
||||
/**
|
||||
* 该方法在请求发送之前被调用, 若返回false则不会继续发送请求
|
||||
*
|
||||
* @param request Forest请求对象
|
||||
*/
|
||||
@Override
|
||||
public boolean beforeExecute(ForestRequest request) {
|
||||
// 用户在高德开放平台官网申请Web服务API类型KEY
|
||||
request.addQuery("clientKey", KEY);
|
||||
// 时间戳:秒时间,例如1621243952 单位秒
|
||||
request.addQuery("timestamp", System.currentTimeMillis() / 1000);
|
||||
// 根据授权密钥计算出的动态鉴权信息
|
||||
request.addQuery("digest", "鉴权动态密钥");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package org.dromara.guide.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 高德基类
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@Data
|
||||
public class GuideEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 返回结果状态值(0表示失败;1表示成功)
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 返回状态说明(如果成功返回"ok",失败返回错误原因,具体见错误码说明)
|
||||
*/
|
||||
@JsonProperty("info")
|
||||
private String info;
|
||||
|
||||
/**
|
||||
* 返回状态说明(10000代表正确,详情参阅info状态表)
|
||||
*/
|
||||
@JsonProperty("infocode")
|
||||
private int infocode;
|
||||
|
||||
/**
|
||||
* 返回结果数目
|
||||
*/
|
||||
@JsonProperty("count")
|
||||
private int count;
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package org.dromara.guide.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 高德基类
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@Data
|
||||
public class GuideErrEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
* 30001错误表示抓路失败。当传入点数较少或较稀疏时,可能会导致抓路失败。
|
||||
*/
|
||||
@JsonProperty("errcode")
|
||||
private int errcode;
|
||||
|
||||
/**
|
||||
* 错误详情
|
||||
*/
|
||||
@JsonProperty("errdetail")
|
||||
private String errdetail;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@JsonProperty("errmsg")
|
||||
private String errmsg;
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package org.dromara.guide.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 轨迹纠偏
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DrivingBo {
|
||||
|
||||
/**
|
||||
* 经度
|
||||
* 小数点后最多6位
|
||||
*/
|
||||
@JsonProperty("x")
|
||||
private double x;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
* 小数点后最多6位
|
||||
*/
|
||||
@JsonProperty("y")
|
||||
private double y;
|
||||
|
||||
/**
|
||||
* 角度
|
||||
* 与正北方向的夹角,小数、整数均可
|
||||
* 需要注意的是,计算时需要参考到设备的角度来判别方向,如果 ag 参数是0,或者是不合法的参数,会比较大概率导致纠偏计算失败。
|
||||
*/
|
||||
@JsonProperty("ag")
|
||||
private double ag;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
* tm以秒为单位,第一个采集点的tm值从1970年0点开始,其他采集点为与第一个采集点时间的差值
|
||||
*/
|
||||
@JsonProperty("tm")
|
||||
private long tm;
|
||||
|
||||
/**
|
||||
* 速度
|
||||
* 车辆/设备的移动速度,单位:km/h ,小数、整数均可,在计算纠偏时如果速度值不合理,会比较大概率导致纠偏计算失败。在使用时请传入合理的速度值。
|
||||
*/
|
||||
@JsonProperty("sp")
|
||||
private double sp;
|
||||
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideErrEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 骑行路径规划
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class BicyclingVo extends GuideErrEntity {
|
||||
|
||||
/**
|
||||
* 数据体
|
||||
*/
|
||||
@JsonProperty("data")
|
||||
private BicyclingData data;
|
||||
|
||||
/**
|
||||
* 数据体实体类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BicyclingData {
|
||||
|
||||
/**
|
||||
* 起点坐标,格式:X,Y
|
||||
*/
|
||||
@JsonProperty("origin")
|
||||
private String origin;
|
||||
|
||||
/**
|
||||
* 终点坐标,格式:X,Y
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
|
||||
/**
|
||||
* 骑行方案列表信息
|
||||
*/
|
||||
@JsonProperty("paths")
|
||||
private List<Path> paths;
|
||||
}
|
||||
|
||||
/**
|
||||
* 骑行方案类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Path {
|
||||
|
||||
/**
|
||||
* 起终点的骑行距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 起终点的骑行时间,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 具体骑行结果列表
|
||||
*/
|
||||
@JsonProperty("steps")
|
||||
private List<Step> steps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 具体骑行结果类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Step {
|
||||
/**
|
||||
* 路段骑行指示,例如:“骑行54米右转”
|
||||
*/
|
||||
@JsonProperty("instruction")
|
||||
private String instruction;
|
||||
|
||||
/**
|
||||
* 此段路道路名称,可能为空
|
||||
*/
|
||||
@JsonProperty("road")
|
||||
private String road;
|
||||
|
||||
/**
|
||||
* 此段路骑行距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 此段路骑行方向,例如:“南”
|
||||
*/
|
||||
@JsonProperty("orientation")
|
||||
private String orientation;
|
||||
|
||||
/**
|
||||
* 此段路骑行耗时,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 此段路骑行的坐标点,格式:X,Y;X1,Y1;X2,Y2
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 此段路骑行主要动作,可能为空,也可能为左转、右转、向左前方行驶、向右前方行驶等
|
||||
*/
|
||||
@JsonProperty("action")
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 此段路骑行辅助动作,例如:“到达目的地”
|
||||
*/
|
||||
@JsonProperty("assistant_action")
|
||||
private String assistantAction;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,139 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
/**
|
||||
* 圆形区域内交通态势信息
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class CircleVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 交通态势信息
|
||||
*/
|
||||
@JsonProperty("trafficinfo")
|
||||
private TrafficDetails data;
|
||||
|
||||
/**
|
||||
* 交通态势详细信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class TrafficDetails {
|
||||
|
||||
/**
|
||||
* 路况综述
|
||||
*/
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 路况评价
|
||||
*/
|
||||
@JsonProperty("evaluation")
|
||||
private String evaluation;
|
||||
|
||||
/**
|
||||
* 畅通所占百分比
|
||||
*/
|
||||
@JsonProperty("expedite")
|
||||
private int expedite;
|
||||
|
||||
/**
|
||||
* 缓行所占百分比
|
||||
*/
|
||||
@JsonProperty("congested")
|
||||
private int congested;
|
||||
|
||||
/**
|
||||
* 拥堵所占百分比
|
||||
*/
|
||||
@JsonProperty("blocked")
|
||||
private int blocked;
|
||||
|
||||
/**
|
||||
* 未知路段所占百分比
|
||||
*/
|
||||
@JsonProperty("unknown")
|
||||
private int unknown;
|
||||
|
||||
/**
|
||||
* 路况
|
||||
* 0:未知;1:畅通;2:缓行;3:拥堵
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 道路描述
|
||||
*/
|
||||
@JsonProperty("description")
|
||||
private String roadDescription;
|
||||
|
||||
/**
|
||||
* 道路列表
|
||||
*/
|
||||
@JsonProperty("roads")
|
||||
private Road[] roads;
|
||||
}
|
||||
|
||||
/**
|
||||
* 道路信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Road {
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 路况
|
||||
* 0:未知;1:畅通;2:缓行;3:拥堵
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 方向描述
|
||||
*/
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 车行角度,判断道路正反向使用
|
||||
* 以正东方向为0度,逆时针方向为正,取值范围:[0,360]
|
||||
*/
|
||||
@JsonProperty("angle")
|
||||
private int angle;
|
||||
|
||||
/**
|
||||
* 负值表示反方向
|
||||
*/
|
||||
@JsonProperty("lcodes")
|
||||
private int[] lcodes;
|
||||
|
||||
/**
|
||||
* 平均速度
|
||||
* 单位:km/hr,四舍五入取整
|
||||
*/
|
||||
@JsonProperty("speed")
|
||||
private int speed;
|
||||
|
||||
/**
|
||||
* 道路坐标集,坐标集合
|
||||
* 经度和纬度使用","分隔,坐标之间使用";"分隔。例如:x1,y1;x2,y2
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
/**
|
||||
* 坐标转换结果
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class CoordinateConversionVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 转换之后的坐标。若有多个坐标,则用 “;” 进行区分和间隔
|
||||
*/
|
||||
@JsonProperty("locations")
|
||||
private String locations;
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 距离计算
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DistanceVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 距离信息列表
|
||||
*/
|
||||
@JsonProperty("results")
|
||||
private List<DistanceInfo> data;
|
||||
|
||||
/**
|
||||
* 距离信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DistanceInfo {
|
||||
|
||||
/**
|
||||
* 起点坐标序列号(从1开始)
|
||||
*/
|
||||
@JsonProperty("origin_id")
|
||||
private int originId;
|
||||
|
||||
/**
|
||||
* 终点坐标序列号(从1开始)
|
||||
*/
|
||||
@JsonProperty("dest_id")
|
||||
private int destId;
|
||||
|
||||
/**
|
||||
* 路径距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 预计行驶时间,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 仅在出错时显示的信息,大部分情况下为"未知错误"
|
||||
*/
|
||||
@JsonProperty("info")
|
||||
private String info;
|
||||
|
||||
/**
|
||||
* 仅在出错时显示的错误码
|
||||
*/
|
||||
@JsonProperty("code")
|
||||
private int code;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行政区域
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DistrictVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 建议结果列表
|
||||
*/
|
||||
@JsonProperty("suggestion")
|
||||
private Suggestion suggestion;
|
||||
|
||||
/**
|
||||
* 行政区列表
|
||||
*/
|
||||
@JsonProperty("districts")
|
||||
private List<District> districts;
|
||||
|
||||
/**
|
||||
* 建议结果
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Suggestion {
|
||||
|
||||
/**
|
||||
* 建议关键字列表
|
||||
*/
|
||||
@JsonProperty("keywords")
|
||||
private List<String> keywords;
|
||||
|
||||
/**
|
||||
* 建议城市列表
|
||||
*/
|
||||
@JsonProperty("cities")
|
||||
private List<String> cities;
|
||||
}
|
||||
|
||||
/**
|
||||
* 行政区信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class District {
|
||||
/**
|
||||
* 城市编码
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 行政区名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 行政区边界坐标点
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 区域中心点
|
||||
*/
|
||||
@JsonProperty("center")
|
||||
private String center;
|
||||
|
||||
/**
|
||||
* 行政区划级别,国家、省份、市、区县、街道
|
||||
*/
|
||||
@JsonProperty("level")
|
||||
private String level;
|
||||
|
||||
/**
|
||||
* 下级行政区列表
|
||||
*/
|
||||
@JsonProperty("districts")
|
||||
private List<District> districts;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,211 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 驾车路径规划
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DrivingV3Vo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 驾车路径规划信息列表
|
||||
*/
|
||||
@JsonProperty("route")
|
||||
private List<Route> data;
|
||||
|
||||
/**
|
||||
* 驾车路径规划信息类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Route {
|
||||
|
||||
/**
|
||||
* 起点坐标,规则: lon,lat(经度,纬度), “,”分割,如117.500244, 40.417801 经纬度小数点不超过6位
|
||||
*/
|
||||
@JsonProperty("origin")
|
||||
private String origin;
|
||||
|
||||
/**
|
||||
* 终点坐标,规则: lon,lat(经度,纬度), “,”分割,如117.500244, 40.417801 经纬度小数点不超过6位
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
|
||||
/**
|
||||
* 打车费用,单位:元,注意:extensions=all时才会返回
|
||||
*/
|
||||
@JsonProperty("taxi_cost")
|
||||
private double taxiCost;
|
||||
|
||||
/**
|
||||
* 驾车换乘方案列表
|
||||
*/
|
||||
@JsonProperty("paths")
|
||||
private List<Path> pathList;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 驾车换乘方案类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Path {
|
||||
/**
|
||||
* 行驶距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 预计行驶时间,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 导航策略
|
||||
*/
|
||||
@JsonProperty("strategy")
|
||||
private String strategy;
|
||||
|
||||
/**
|
||||
* 此导航方案道路收费,单位:元
|
||||
*/
|
||||
@JsonProperty("tolls")
|
||||
private double tolls;
|
||||
|
||||
/**
|
||||
* 限行结果,0 代表限行已规避或未限行,1 代表限行无法规避
|
||||
*/
|
||||
@JsonProperty("restriction")
|
||||
private int restriction;
|
||||
|
||||
/**
|
||||
* 红绿灯个数
|
||||
*/
|
||||
@JsonProperty("traffic_lights")
|
||||
private int trafficLights;
|
||||
|
||||
/**
|
||||
* 收费路段距离
|
||||
*/
|
||||
@JsonProperty("toll_distance")
|
||||
private int tollDistance;
|
||||
|
||||
/**
|
||||
* 导航路段列表
|
||||
*/
|
||||
@JsonProperty("steps")
|
||||
private List<Step> stepList;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航路段类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Step {
|
||||
/**
|
||||
* 行驶指示
|
||||
*/
|
||||
@JsonProperty("instruction")
|
||||
private String instruction;
|
||||
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
@JsonProperty("orientation")
|
||||
private String orientation;
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("road")
|
||||
private String road;
|
||||
|
||||
/**
|
||||
* 此路段距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 此段收费,单位:元
|
||||
*/
|
||||
@JsonProperty("tolls")
|
||||
private double tolls;
|
||||
|
||||
/**
|
||||
* 收费路段距离,单位:米
|
||||
*/
|
||||
@JsonProperty("toll_distance")
|
||||
private int tollDistance;
|
||||
|
||||
/**
|
||||
* 主要收费道路
|
||||
*/
|
||||
@JsonProperty("toll_road")
|
||||
private String tollRoad;
|
||||
|
||||
/**
|
||||
* 此路段坐标点串,格式为坐标串,如:116.481247,39.990704;116.481270,39.990726
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 导航主要动作
|
||||
*/
|
||||
@JsonProperty("action")
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 导航辅助动作
|
||||
*/
|
||||
@JsonProperty("assistant_action")
|
||||
private String assistantAction;
|
||||
|
||||
/**
|
||||
* 驾车导航详细信息列表
|
||||
*/
|
||||
@JsonProperty("tmcs")
|
||||
private List<Tmc> tmcList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 驾车导航详细信息类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Tmc {
|
||||
/**
|
||||
* 此段路的长度,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 此段路的交通情况,可能取值为未知、畅通、缓行、拥堵、严重拥堵
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 此段路的轨迹,规格:x1,y1;x2,y2
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,192 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 未来路径规划
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DrivingV4Vo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 返回结果数据
|
||||
*/
|
||||
@JsonProperty("data")
|
||||
private DrivingData data;
|
||||
|
||||
/**
|
||||
* 返回结果数据
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DrivingData {
|
||||
|
||||
/**
|
||||
* 路径规划方案列表
|
||||
*/
|
||||
@JsonProperty("paths")
|
||||
private List<Path> paths;
|
||||
|
||||
/**
|
||||
* 不同时间的规划以及信息列表
|
||||
*/
|
||||
@JsonProperty("time_infos")
|
||||
private List<TimeInfo> timeInfos;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 路径规划方案
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Path {
|
||||
|
||||
/**
|
||||
* 行驶距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 红绿灯个数
|
||||
*/
|
||||
@JsonProperty("traffic_lights")
|
||||
private int trafficLights;
|
||||
|
||||
/**
|
||||
* 导航路段列表
|
||||
*/
|
||||
@JsonProperty("steps")
|
||||
private List<Step> steps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航路段
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Step {
|
||||
|
||||
/**
|
||||
* 途径区域的区域代码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("road")
|
||||
private String road;
|
||||
|
||||
/**
|
||||
* 路段距离
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 道路属性字段,是否收费,0:不收费,1:收费。
|
||||
*/
|
||||
@JsonProperty("toll")
|
||||
private int toll;
|
||||
|
||||
/**
|
||||
* 路段坐标点串
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 不同时间的规划以及信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class TimeInfo {
|
||||
|
||||
/**
|
||||
* 出发时间,Unix 时间戳精确到毫秒
|
||||
*/
|
||||
@JsonProperty("starttime")
|
||||
private long starttime;
|
||||
|
||||
/**
|
||||
* 路线列表
|
||||
*/
|
||||
@JsonProperty("elements")
|
||||
private List<Element> elements;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 路线
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Element {
|
||||
|
||||
/**
|
||||
* 对应的路线
|
||||
*/
|
||||
@JsonProperty("pathindex")
|
||||
private int pathindex;
|
||||
|
||||
/**
|
||||
* 总时长,单位:分钟
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 总收费,单位:元
|
||||
*/
|
||||
@JsonProperty("tolls")
|
||||
private double tolls;
|
||||
|
||||
/**
|
||||
* 限行状态,0:代表限行已规避或未限行,1:代表限行无法规避
|
||||
*/
|
||||
@JsonProperty("restriction")
|
||||
private int restriction;
|
||||
|
||||
/**
|
||||
* 路况信息列表
|
||||
*/
|
||||
@JsonProperty("tmcs")
|
||||
private List<Tmc> tmcs;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 路况信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Tmc {
|
||||
|
||||
/**
|
||||
* 路况状态
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 路段坐标点
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideErrEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 轨迹纠偏
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class DrivingVo extends GuideErrEntity {
|
||||
|
||||
/**
|
||||
* 数据体
|
||||
*/
|
||||
@JsonProperty("data")
|
||||
private DrivingData data;
|
||||
|
||||
/**
|
||||
* 数据体实体类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class DrivingData {
|
||||
|
||||
/**
|
||||
* 总距离
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private double distance;
|
||||
|
||||
/**
|
||||
* 返回坐标合集
|
||||
*/
|
||||
@JsonProperty("points")
|
||||
private List<Point> points;
|
||||
|
||||
/**
|
||||
* 坐标点实体类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Point {
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@JsonProperty("x")
|
||||
private double x;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@JsonProperty("y")
|
||||
private double y;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 地理编码
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class GeocodeVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 地理编码信息列表,结果对象列表
|
||||
*/
|
||||
@JsonProperty("geocodes")
|
||||
private List<Geocode> data;
|
||||
|
||||
/**
|
||||
* 地理编码信息列表
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Geocode {
|
||||
|
||||
/**
|
||||
* 国家,默认返回中国
|
||||
*/
|
||||
@JsonProperty("country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 地址所在的省份名,例如:北京市
|
||||
* 注意:中国的四大直辖市也算作省级单位
|
||||
*/
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 地址所在的城市名,例如:北京市
|
||||
*/
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 城市编码,例如:010
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 地址所在的区,例如:朝阳区
|
||||
*/
|
||||
@JsonProperty("district")
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 街道,例如:阜通东大街
|
||||
*/
|
||||
@JsonProperty("street")
|
||||
private String street;
|
||||
|
||||
/**
|
||||
* 门牌,例如:6号
|
||||
*/
|
||||
@JsonProperty("number")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* 区域编码,例如:110101
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 坐标点,经度,纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 匹配级别,参见地理编码匹配级别列表
|
||||
*/
|
||||
@JsonProperty("level")
|
||||
private String level;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 三方数据空间检索结果
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class GeohubVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 符合关键字筛选条件的数据对象
|
||||
*/
|
||||
@JsonProperty("objects")
|
||||
private GeohubResults data;
|
||||
|
||||
/**
|
||||
* 符合关键字筛选条件的数据对象
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class GeohubResults {
|
||||
|
||||
/**
|
||||
* 点/线/面对象
|
||||
*/
|
||||
@JsonProperty("geometry")
|
||||
private Geometry geometry;
|
||||
|
||||
/**
|
||||
* 属性
|
||||
*/
|
||||
@JsonProperty("properties")
|
||||
private List<GeohubPrertie> properties;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点/线/面对象
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Geometry {
|
||||
|
||||
/**
|
||||
* 坐标信息
|
||||
*/
|
||||
@JsonProperty("coordinates")
|
||||
private List<String> coordinates;
|
||||
|
||||
/**
|
||||
* 类型:point/polyline/polygon/multipoint/multipolyline/multipolygon
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class GeohubPrertie {
|
||||
/**
|
||||
* 属性名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 属性值
|
||||
*/
|
||||
@JsonProperty("value")
|
||||
private Object value;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提示信息
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class InputtipsVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 建议提示列表
|
||||
*/
|
||||
@JsonProperty("tips")
|
||||
private List<Tip> data;
|
||||
|
||||
/**
|
||||
* 建议提示
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Tip {
|
||||
/**
|
||||
* 提示信息ID
|
||||
* 若数据为POI类型,则返回POI ID;若数据为bus类型,则返回bus id;若数据为busline类型,则返回busline id。
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 提示信息名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所属区域
|
||||
* 省+市+区(直辖市为“市+区”)
|
||||
*/
|
||||
@JsonProperty("district")
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
* 六位区县编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 提示中心点坐标
|
||||
* 当搜索数据为busline类型时,此字段不返回
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@JsonProperty("address")
|
||||
private String address;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,526 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公交路径规划
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class IntegratedVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 公交换乘信息列表
|
||||
*/
|
||||
@JsonProperty("route")
|
||||
private List<Route> routeList;
|
||||
|
||||
/**
|
||||
* 公交换乘信息类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Route {
|
||||
|
||||
/**
|
||||
* 起点坐标
|
||||
*/
|
||||
@JsonProperty("origin")
|
||||
private String origin;
|
||||
|
||||
/**
|
||||
* 终点坐标
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
|
||||
/**
|
||||
* 起点和终点的步行距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 出租车费用,单位:元
|
||||
*/
|
||||
@JsonProperty("taxi_cost")
|
||||
private double taxiCost;
|
||||
|
||||
/**
|
||||
* 公交换乘方案列表
|
||||
*/
|
||||
@JsonProperty("transits")
|
||||
private List<Transit> transitList;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 公交换乘方案类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Transit {
|
||||
|
||||
/**
|
||||
* 此换乘方案价格,单位:元
|
||||
*/
|
||||
@JsonProperty("cost")
|
||||
private double cost;
|
||||
|
||||
/**
|
||||
* 此换乘方案预期时间,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 是否是夜班车
|
||||
* 0:非夜班车;1:夜班车
|
||||
*/
|
||||
@JsonProperty("nightflag")
|
||||
private int nightFlag;
|
||||
|
||||
/**
|
||||
* 此方案总步行距离,单位:米
|
||||
*/
|
||||
@JsonProperty("walking_distance")
|
||||
private int walkingDistance;
|
||||
|
||||
/**
|
||||
* 换乘路段列表
|
||||
*/
|
||||
@JsonProperty("segments")
|
||||
private List<Segment> segmentList;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 换乘路段类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Segment {
|
||||
|
||||
/**
|
||||
* 步行导航信息
|
||||
*/
|
||||
@JsonProperty("walking")
|
||||
private List<Walking> walking;
|
||||
|
||||
/**
|
||||
* 公交导航信息
|
||||
*/
|
||||
@JsonProperty("bus")
|
||||
private List<Bus> bus;
|
||||
|
||||
/**
|
||||
* 地铁入口
|
||||
*/
|
||||
@JsonProperty("entrance")
|
||||
private List<Entrance> entrance;
|
||||
|
||||
/**
|
||||
* 地铁出口
|
||||
*/
|
||||
@JsonProperty("exit")
|
||||
private List<Entrance> exit;
|
||||
|
||||
/**
|
||||
* 乘坐火车的信息
|
||||
*/
|
||||
@JsonProperty("railway")
|
||||
private List<Railway> railway;
|
||||
}
|
||||
|
||||
/**
|
||||
* 步行导航信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Walking {
|
||||
/**
|
||||
* 起点坐标
|
||||
*/
|
||||
@JsonProperty("origin")
|
||||
private String origin;
|
||||
|
||||
/**
|
||||
* 终点坐标
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
|
||||
/**
|
||||
* 起点和终点的步行距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 步行预计时间,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 步行路段列表
|
||||
*/
|
||||
@JsonProperty("steps")
|
||||
private List<Step> stepList;
|
||||
|
||||
/**
|
||||
* 步行路段类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Step {
|
||||
/**
|
||||
* 此段路的行走介绍
|
||||
*/
|
||||
@JsonProperty("instruction")
|
||||
private String instruction;
|
||||
|
||||
/**
|
||||
* 路的名字
|
||||
*/
|
||||
@JsonProperty("road")
|
||||
private String road;
|
||||
|
||||
/**
|
||||
* 此段路的距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 此段路预计消耗时间,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 此段路的坐标
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 步行主要动作
|
||||
*/
|
||||
@JsonProperty("action")
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 步行辅助动作
|
||||
*/
|
||||
@JsonProperty("assistant_action")
|
||||
private String assistantAction;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 公交导航信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Bus {
|
||||
|
||||
/**
|
||||
* 步行路段列表
|
||||
*/
|
||||
@JsonProperty("buslines")
|
||||
private List<BusLine> busLines;
|
||||
|
||||
/**
|
||||
* 公交路线类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusLine {
|
||||
/**
|
||||
* 此段起乘站信息
|
||||
*/
|
||||
@JsonProperty("departure_stop")
|
||||
private Stop departureStop;
|
||||
|
||||
/**
|
||||
* 此段下车站
|
||||
*/
|
||||
@JsonProperty("arrival_stop")
|
||||
private Stop arrivalStop;
|
||||
|
||||
/**
|
||||
* 公交路线名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 公交路线id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 公交类型
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 公交行驶距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 公交预计行驶时间,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 此路段坐标集
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 首班车时间,格式如:0600,代表06:00
|
||||
*/
|
||||
@JsonProperty("start_time")
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 末班车时间,格式如:2300,代表23:00
|
||||
*/
|
||||
@JsonProperty("end_time")
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 此段途经公交站数
|
||||
*/
|
||||
@JsonProperty("via_num")
|
||||
private int viaNum;
|
||||
|
||||
/**
|
||||
* 此段途经公交站点列表
|
||||
*/
|
||||
@JsonProperty("via_stops")
|
||||
private List<Stop> viaStops;
|
||||
|
||||
/**
|
||||
* 公交站点类
|
||||
*/
|
||||
public static class Stop {
|
||||
/**
|
||||
* 途径公交站点信息
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 公交站点编号
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 公交站点经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 地铁出入口
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Entrance {
|
||||
|
||||
/**
|
||||
* 经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 乘坐火车的信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Railway {
|
||||
/**
|
||||
* 线路id编号
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 该线路车段耗时
|
||||
*/
|
||||
@JsonProperty("time")
|
||||
private String time;
|
||||
|
||||
/**
|
||||
* 线路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 线路车次号
|
||||
*/
|
||||
@JsonProperty("trip")
|
||||
private String trip;
|
||||
|
||||
/**
|
||||
* 该item换乘段的行车总距离
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
|
||||
/**
|
||||
* 线路车次类型
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 火车始发站信息
|
||||
*/
|
||||
@JsonProperty("departure_stop")
|
||||
private StopInfo departureStop;
|
||||
|
||||
/**
|
||||
* 火车到站信息
|
||||
*/
|
||||
@JsonProperty("arrival_stop")
|
||||
private StopInfo arrivalStop;
|
||||
|
||||
/**
|
||||
* 途径站点信息
|
||||
*/
|
||||
@JsonProperty("via_stop")
|
||||
private List<StopInfo> viaStops;
|
||||
|
||||
/**
|
||||
* 聚合的备选方案
|
||||
*/
|
||||
@JsonProperty("alters")
|
||||
private List<AlternativeRoute> alters;
|
||||
|
||||
/**
|
||||
* 仓位及价格信息
|
||||
*/
|
||||
@JsonProperty("spaces")
|
||||
private List<SpaceInfo> spaces;
|
||||
|
||||
|
||||
/**
|
||||
* 火车到站信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class StopInfo {
|
||||
/**
|
||||
* 站点ID
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 站点名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 站点经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 站点所在城市的adcode
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 时间信息
|
||||
*/
|
||||
@JsonProperty("time")
|
||||
private String time;
|
||||
|
||||
/**
|
||||
* 是否为起始站或终点站,1表示是,0表示否
|
||||
*/
|
||||
@JsonProperty("start")
|
||||
private int start;
|
||||
|
||||
/**
|
||||
* 是否为终点站,1表示是,0表示否
|
||||
*/
|
||||
@JsonProperty("end")
|
||||
private int end;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 聚合的备选方案
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AlternativeRoute {
|
||||
|
||||
/**
|
||||
* 备选方案ID
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 备选线路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 仓位及价格信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class SpaceInfo {
|
||||
|
||||
/**
|
||||
* 仓位编码
|
||||
*/
|
||||
@JsonProperty("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 仓位费用
|
||||
*/
|
||||
@JsonProperty("cost")
|
||||
private String cost;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
/**
|
||||
* IP定位
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class IpLocationVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 省份名称,若为直辖市则显示直辖市名称;如果在局域网IP网段内,则返回“局域网”;非法IP以及国外IP则返回空
|
||||
*/
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市名称,若为直辖市则显示直辖市名称;如果为局域网网段内IP或者非法IP或国外IP,则返回空
|
||||
*/
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 城市的adcode编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 所在城市矩形区域范围,所在城市范围的左下右上对标对
|
||||
*/
|
||||
@JsonProperty("rectangle")
|
||||
private String rectangle;
|
||||
|
||||
}
|
||||
@ -0,0 +1,189 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公交路线信息
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class LineidVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 公交线路信息列表
|
||||
*/
|
||||
@JsonProperty("buslines")
|
||||
private List<BusLine> data;
|
||||
|
||||
/**
|
||||
* 公交线路信息类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusLine {
|
||||
/**
|
||||
* 公交线路id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 公交类型
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 线路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 坐标串
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 城市的citycode
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 首发站
|
||||
*/
|
||||
@JsonProperty("start_stop")
|
||||
private String startStop;
|
||||
|
||||
/**
|
||||
* 末站
|
||||
*/
|
||||
@JsonProperty("end_stop")
|
||||
private String endStop;
|
||||
|
||||
/**
|
||||
* 首班车时间
|
||||
*/
|
||||
@JsonProperty("start_time")
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 末班车时间
|
||||
*/
|
||||
@JsonProperty("end_time")
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 线路 ui 颜色
|
||||
*/
|
||||
@JsonProperty("uicolor")
|
||||
private String uiColor;
|
||||
|
||||
/**
|
||||
* 线路详细时间
|
||||
*/
|
||||
@JsonProperty("timedesc")
|
||||
private String timeDesc;
|
||||
|
||||
/**
|
||||
* 全程里程,单位:公里
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private double distance;
|
||||
|
||||
/**
|
||||
* 是否环线,0:否,1:是
|
||||
*/
|
||||
@JsonProperty("loop")
|
||||
private int loop;
|
||||
|
||||
/**
|
||||
* 线路状态,0:停运,1:正常,2:规划中,3:在建
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 反向线路id,如果有反向线路,则记录对向线路,如果没有反向线路,则记录自身
|
||||
*/
|
||||
@JsonProperty("direc")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 所属公司
|
||||
*/
|
||||
@JsonProperty("company")
|
||||
private String company;
|
||||
|
||||
/**
|
||||
* 线路长度,单位:公里
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private double lineDistance;
|
||||
|
||||
/**
|
||||
* 起步价,单位:元
|
||||
*/
|
||||
@JsonProperty("basic_price")
|
||||
private double basicPrice;
|
||||
|
||||
/**
|
||||
* 全程票价,单位:元
|
||||
*/
|
||||
@JsonProperty("total_price")
|
||||
private double totalPrice;
|
||||
|
||||
/**
|
||||
* 矩形区域
|
||||
*/
|
||||
@JsonProperty("bounds")
|
||||
private String bounds;
|
||||
|
||||
/**
|
||||
* 途径站列表
|
||||
*/
|
||||
@JsonProperty("busstops")
|
||||
private List<BusStop> busstops;
|
||||
}
|
||||
|
||||
/**
|
||||
* 途径站信息类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusStop {
|
||||
/**
|
||||
* 公交站ID
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 公交站名
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 公交站经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 公交站序号
|
||||
*/
|
||||
@JsonProperty("sequence")
|
||||
private int sequence;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公交路线信息
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class LinenameVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 公交路线的集合
|
||||
*/
|
||||
@JsonProperty("buslines")
|
||||
private List<BusLine> data;
|
||||
|
||||
/**
|
||||
* 公交路
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusLine {
|
||||
|
||||
/**
|
||||
* 唯一id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 公交类型
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 线路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 线路的坐标串
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 城市的adcode
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 始发站
|
||||
*/
|
||||
@JsonProperty("start_stop")
|
||||
private String startStop;
|
||||
|
||||
/**
|
||||
* 终点站
|
||||
*/
|
||||
@JsonProperty("end_stop")
|
||||
private String endStop;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* AOI边界
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class PolylineVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* aoi返回的详细数据列表
|
||||
*/
|
||||
@JsonProperty("aois")
|
||||
private List<AOI> data;
|
||||
|
||||
/**
|
||||
* aoi返回的详细数据
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AOI {
|
||||
|
||||
/**
|
||||
* aoi名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* aoi唯一标识
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* aoi中心点经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 边界经纬度坐标串,以“_”分隔
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* aoi所属分类
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* aoi分类编码
|
||||
*/
|
||||
@JsonProperty("typecode")
|
||||
private String typecode;
|
||||
|
||||
/**
|
||||
* aoi所属省份
|
||||
*/
|
||||
@JsonProperty("pname")
|
||||
private String pname;
|
||||
|
||||
/**
|
||||
* aoi所属城市
|
||||
*/
|
||||
@JsonProperty("cityname")
|
||||
private String cityname;
|
||||
|
||||
/**
|
||||
* aoi所属区域
|
||||
*/
|
||||
@JsonProperty("adname")
|
||||
private String adname;
|
||||
|
||||
/**
|
||||
* aoi详细地址
|
||||
*/
|
||||
@JsonProperty("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* aoi所属省份编码
|
||||
*/
|
||||
@JsonProperty("pcode")
|
||||
private String pcode;
|
||||
|
||||
/**
|
||||
* aoi所属城市编码
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* aoi所属区域编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,125 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能硬件定位Vo 2.0
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Position2Vo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 返回的定位结果列表
|
||||
*/
|
||||
@JsonProperty("position")
|
||||
private List<Position> position;
|
||||
|
||||
/**
|
||||
* 可选差异化结果返回
|
||||
*/
|
||||
@JsonProperty("show_fields")
|
||||
private String showFields;
|
||||
|
||||
/**
|
||||
* 结构化地址信息
|
||||
*/
|
||||
@JsonProperty("formatted_address")
|
||||
private String formattedAddress;
|
||||
|
||||
/**
|
||||
* 地址元素列表
|
||||
*/
|
||||
@JsonProperty("addressComponent")
|
||||
private List<AddressComponent> addressComponent;
|
||||
|
||||
/**
|
||||
* 定位结果
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Position {
|
||||
|
||||
/**
|
||||
* 定位结果坐标
|
||||
* 如:116.473168,39.993015
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 定位精度半径,单位:米
|
||||
*/
|
||||
@JsonProperty("radius")
|
||||
private int radius;
|
||||
}
|
||||
|
||||
/**
|
||||
* 地址元素
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AddressComponent {
|
||||
|
||||
/**
|
||||
* 国
|
||||
*/
|
||||
@JsonProperty("country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 市
|
||||
*/
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区
|
||||
*/
|
||||
@JsonProperty("district")
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 城市编码
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 附近街道名称
|
||||
*/
|
||||
@JsonProperty("street")
|
||||
private String street;
|
||||
|
||||
/**
|
||||
* 周边道路名称
|
||||
*/
|
||||
@JsonProperty("road")
|
||||
private String road;
|
||||
|
||||
/**
|
||||
* 周边 POI 名称
|
||||
*/
|
||||
@JsonProperty("poi")
|
||||
private String poi;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 智能硬件定位Vo
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class PositionVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 定位结果列表
|
||||
*/
|
||||
@JsonProperty("result")
|
||||
private List<LocationItem> data;
|
||||
|
||||
/**
|
||||
* 定位结果
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class LocationItem {
|
||||
|
||||
/**
|
||||
* 定位类型
|
||||
* 0:没有得到定位结果;
|
||||
* 其他数字为:正常获取定位结果
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 手机 imei 号
|
||||
*/
|
||||
@JsonProperty("imei")
|
||||
private String imei;
|
||||
|
||||
/**
|
||||
* 定位经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 定位精度半径,单位:米
|
||||
*/
|
||||
@JsonProperty("radius")
|
||||
private double radius;
|
||||
|
||||
/**
|
||||
* 位置描述
|
||||
*/
|
||||
@JsonProperty("desc")
|
||||
private String desc;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@JsonProperty("country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 城市编码
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 道路名
|
||||
*/
|
||||
@JsonProperty("road")
|
||||
private String road;
|
||||
|
||||
/**
|
||||
* 定位附近的 poi 名称
|
||||
*/
|
||||
@JsonProperty("poi")
|
||||
private String poi;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 矩形区域内交通态势信息
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class RectangleVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 交通态势信息
|
||||
*/
|
||||
@JsonProperty("trafficinfo")
|
||||
public Trafficinfo data;
|
||||
|
||||
/**
|
||||
* 交通态势信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Trafficinfo {
|
||||
|
||||
/**
|
||||
* 路况综述
|
||||
*/
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 路况评价
|
||||
*/
|
||||
@JsonProperty("evaluation")
|
||||
private Evaluation evaluation;
|
||||
|
||||
/**
|
||||
* 道路列表
|
||||
*/
|
||||
@JsonProperty("roads")
|
||||
private List<Road> roads;
|
||||
}
|
||||
|
||||
/**
|
||||
* 路况评价
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Evaluation {
|
||||
|
||||
/**
|
||||
* 畅通所占百分比
|
||||
*/
|
||||
@JsonProperty("expedite")
|
||||
private int expedite;
|
||||
|
||||
/**
|
||||
* 缓行所占百分比
|
||||
*/
|
||||
@JsonProperty("congested")
|
||||
private int congested;
|
||||
|
||||
/**
|
||||
* 拥堵所占百分比
|
||||
*/
|
||||
@JsonProperty("blocked")
|
||||
private int blocked;
|
||||
|
||||
/**
|
||||
* 未知路段所占百分比
|
||||
*/
|
||||
@JsonProperty("unknown")
|
||||
private int unknown;
|
||||
|
||||
/**
|
||||
* 路况
|
||||
* 0:未知;1:畅通;2:缓行;3:拥堵
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 道路描述
|
||||
*/
|
||||
@JsonProperty("description")
|
||||
private String roadDescription;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 道路列表
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Road {
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 路况
|
||||
* 0:未知;1:畅通;2:缓行;3:拥堵
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 方向描述
|
||||
*/
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 车行角度,判断道路正反向使用
|
||||
* 以正东方向为0度,逆时针方向为正,取值范围:[0,360]
|
||||
*/
|
||||
@JsonProperty("angle")
|
||||
private int angle;
|
||||
|
||||
/**
|
||||
* 负值表示反方向
|
||||
*/
|
||||
@JsonProperty("lcodes")
|
||||
private int[] lcodes;
|
||||
|
||||
/**
|
||||
* 平均速度
|
||||
* 单位:km/hr,四舍五入取整
|
||||
*/
|
||||
@JsonProperty("speed")
|
||||
private int speed;
|
||||
|
||||
/**
|
||||
* 道路坐标集,坐标集合
|
||||
* 经度和纬度使用","分隔,坐标之间使用";"分隔。例如:x1,y1;x2,y2
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,468 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 逆地理编码
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class ReverseGeocodingVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 逆地理编码列表
|
||||
*/
|
||||
@JsonProperty("regeocode")
|
||||
private Regeocode data;
|
||||
|
||||
|
||||
/**
|
||||
* 逆地理编码列表
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class Regeocode {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonProperty("formatted_address")
|
||||
private String formattedAddress;
|
||||
|
||||
/**
|
||||
* 地址元素列表
|
||||
*/
|
||||
@JsonProperty("addressComponent")
|
||||
private AddressComponent addressComponent;
|
||||
|
||||
/**
|
||||
* 社区信息列表
|
||||
*/
|
||||
@JsonProperty("neighborhood")
|
||||
private Neighborhood neighborhood;
|
||||
|
||||
/**
|
||||
* 楼信息列表
|
||||
*/
|
||||
@JsonProperty("building")
|
||||
private Building building;
|
||||
|
||||
/**
|
||||
* 门牌信息列表
|
||||
*/
|
||||
@JsonProperty("streetNumber")
|
||||
private StreetNumber streetNumber;
|
||||
|
||||
/**
|
||||
* 经纬度所属商圈列表
|
||||
*/
|
||||
@JsonProperty("businessAreas")
|
||||
private List<BusinessArea> businessAreas;
|
||||
|
||||
/**
|
||||
* poi信息列表
|
||||
*/
|
||||
@JsonProperty("pois")
|
||||
private List<POI> pois;
|
||||
|
||||
/**
|
||||
* 道路信息列表
|
||||
*/
|
||||
@JsonProperty("roads")
|
||||
private List<Road> roads;
|
||||
|
||||
/**
|
||||
* 道路交叉口列表
|
||||
*/
|
||||
@JsonProperty("roadinters")
|
||||
private List<RoadIntersection> roadinters;
|
||||
|
||||
/**
|
||||
* aoi信息列表
|
||||
*/
|
||||
@JsonProperty("aois")
|
||||
private List<AOI> aois;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 地址元素列表
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AddressComponent {
|
||||
|
||||
/**
|
||||
* 坐标点所在国家名称 例如:中国
|
||||
*/
|
||||
@JsonProperty("country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 坐标点所在省名称 例如:北京市
|
||||
*/
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 坐标点所在城市名称 请注意:当城市是省直辖县时返回为空,以及城市为北京、上海、天津、重庆四个直辖市时,该字段返回为空;省直辖县列表
|
||||
*/
|
||||
@JsonProperty("city")
|
||||
private List<String> city;
|
||||
|
||||
/**
|
||||
* 城市编码 例如:010
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 坐标点所在区 例如:海淀区
|
||||
*/
|
||||
@JsonProperty("district")
|
||||
private String district;
|
||||
|
||||
/**
|
||||
* 行政区编码 例如:110108
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 坐标点所在乡镇/街道(此街道为社区街道,不是道路信息) 例如:燕园街道
|
||||
*/
|
||||
@JsonProperty("township")
|
||||
private String township;
|
||||
|
||||
/**
|
||||
* 乡镇街道编码 例如:110101001000
|
||||
*/
|
||||
@JsonProperty("towncode")
|
||||
private String towncode;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 社区信息列表
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Neighborhood {
|
||||
|
||||
/**
|
||||
* 社区名称 例如:北京大学
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* POI类型 例如:科教文化服务;学校;高等院校
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 楼信息列表
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Building {
|
||||
|
||||
/**
|
||||
* 建筑名称 例如:万达广场
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 类型 例如:科教文化服务;学校;高等院校
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 门牌信息列表
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class StreetNumber {
|
||||
|
||||
/**
|
||||
* 街道名称 例如:中关村北二条
|
||||
*/
|
||||
@JsonProperty("street")
|
||||
private String street;
|
||||
|
||||
/**
|
||||
* 门牌号 例如:3号
|
||||
*/
|
||||
@JsonProperty("number")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* 坐标点 经纬度坐标点:经度,纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 方向 坐标点所处街道方位
|
||||
*/
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 门牌地址到请求坐标的距离 单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 商圈信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusinessArea {
|
||||
|
||||
/**
|
||||
* 商圈中心点经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 商圈名称 例如:颐和园
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 商圈所在区域的adcode 例如:朝阳区/海淀区
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* poi信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class POI {
|
||||
|
||||
/**
|
||||
* poi的id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* poi点名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* poi类型
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@JsonProperty("tel")
|
||||
private String tel;
|
||||
|
||||
/**
|
||||
* 该POI的中心点到请求坐标的距离 单位:米
|
||||
*/
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 方向 为输入点相对建筑物的方位
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
|
||||
/**
|
||||
* poi地址信息
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 坐标点
|
||||
*/
|
||||
@JsonProperty("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonProperty("poiweight")
|
||||
private String poiweight;
|
||||
|
||||
/**
|
||||
* poi所在商圈名称
|
||||
*/
|
||||
@JsonProperty("businessarea")
|
||||
private String businessarea;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 道路信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Road {
|
||||
|
||||
/**
|
||||
* 道路id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 道路到请求坐标的距离 单位:米
|
||||
*/
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 方位 输入点和此路的相对方位
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
|
||||
/**
|
||||
* 坐标点
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 道路交叉口
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class RoadIntersection {
|
||||
|
||||
/**
|
||||
* 交叉路口到请求坐标的距离 单位:米
|
||||
*/
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 方位 输入点相对路口的方位
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
|
||||
/**
|
||||
* 路口经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 第一条道路id
|
||||
*/
|
||||
@JsonProperty("first_id")
|
||||
private String firstId;
|
||||
|
||||
/**
|
||||
* 第一条道路名称
|
||||
*/
|
||||
@JsonProperty("first_name")
|
||||
private String firstName;
|
||||
|
||||
/**
|
||||
* 第二条道路id
|
||||
*/
|
||||
@JsonProperty("second_id")
|
||||
private String secondId;
|
||||
|
||||
/**
|
||||
* 第二条道路名称
|
||||
*/
|
||||
@JsonProperty("second_name")
|
||||
private String secondName;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* aoi信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AOI {
|
||||
|
||||
/**
|
||||
* 所属 aoi的id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 所属 aoi 名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所属 aoi 所在区域编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 所属 aoi 中心点坐标
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 所属aoi点面积 单位:平方米
|
||||
*/
|
||||
@JsonProperty("area")
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 输入经纬度是否在aoi面之中 0,代表在aoi内其余整数代表距离AOI的距离
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private String distance;
|
||||
|
||||
/**
|
||||
* 所属 aoi 类型
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 指定线路交通态势信息
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class RoadVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 交通态势信息
|
||||
*/
|
||||
@JsonProperty("trafficinfo")
|
||||
private List<TrafficDetails> data;
|
||||
|
||||
/**
|
||||
* 交通态势详细信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class TrafficDetails {
|
||||
/**
|
||||
* 路况综述
|
||||
*/
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 路况评价
|
||||
*/
|
||||
@JsonProperty("evaluation")
|
||||
private String evaluation;
|
||||
|
||||
/**
|
||||
* 畅通所占百分比
|
||||
*/
|
||||
@JsonProperty("expedite")
|
||||
private int expedite;
|
||||
|
||||
/**
|
||||
* 缓行所占百分比
|
||||
*/
|
||||
@JsonProperty("congested")
|
||||
private int congested;
|
||||
|
||||
/**
|
||||
* 拥堵所占百分比
|
||||
*/
|
||||
@JsonProperty("blocked")
|
||||
private int blocked;
|
||||
|
||||
/**
|
||||
* 未知路段所占百分比
|
||||
*/
|
||||
@JsonProperty("unknown")
|
||||
private int unknown;
|
||||
|
||||
/**
|
||||
* 路况列表
|
||||
*/
|
||||
@JsonProperty("roads")
|
||||
private Road[] roads;
|
||||
}
|
||||
|
||||
/**
|
||||
* 道路信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Road {
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 路况
|
||||
* 0:未知; 1:畅通; 2:缓行; 3:拥堵
|
||||
*/
|
||||
@JsonProperty("status")
|
||||
private int status;
|
||||
|
||||
/**
|
||||
* 方向描述
|
||||
*/
|
||||
@JsonProperty("direction")
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 车行角度
|
||||
* 以正东方向为0度,逆时针方向为正,取值范围:[0,360]
|
||||
*/
|
||||
@JsonProperty("angle")
|
||||
private int angle;
|
||||
|
||||
/**
|
||||
* 负值表示反方向
|
||||
*/
|
||||
@JsonProperty("lcodes")
|
||||
private int[] lcodes;
|
||||
|
||||
/**
|
||||
* 平均速度
|
||||
* 单位:km/hr,四舍五入取整
|
||||
*/
|
||||
@JsonProperty("speed")
|
||||
private int speed;
|
||||
|
||||
/**
|
||||
* 道路坐标集
|
||||
* 坐标集合,经度和纬度使用","分隔,坐标之间使用";"分隔。例如:x1,y1;x2,y2
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公交站信息
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class StopidVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 公交车站信息列表
|
||||
*/
|
||||
@JsonProperty("busstops")
|
||||
private List<BusStop> data;
|
||||
|
||||
/**
|
||||
* 公交车站信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusStop {
|
||||
|
||||
/**
|
||||
* 公交站id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 公交站名
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 城市adcode
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 城市citycode
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 途径此站的公交路线列表
|
||||
*/
|
||||
@JsonProperty("buslines")
|
||||
private List<BusLine> buslines;
|
||||
}
|
||||
|
||||
/**
|
||||
* 公交路线信息类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BusLine {
|
||||
|
||||
/**
|
||||
* 公交线路唯一id
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 公交线路途径此站的经纬度
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 线路名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 首发站
|
||||
*/
|
||||
@JsonProperty("start_stop")
|
||||
private String startStop;
|
||||
|
||||
/**
|
||||
* 末站
|
||||
*/
|
||||
@JsonProperty("end_stop")
|
||||
private String endStop;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,421 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 搜索POI
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class TextVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 建议提示列表
|
||||
*/
|
||||
@JsonProperty("suggestion")
|
||||
private Suggestion suggestion;
|
||||
|
||||
/**
|
||||
* POI信息列表
|
||||
*/
|
||||
@JsonProperty("pois")
|
||||
private List<Poi> pois;
|
||||
|
||||
/**
|
||||
* 基于城市的建议实体类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Suggestion {
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
@JsonProperty("keywords")
|
||||
private List<String> keywords;
|
||||
|
||||
/**
|
||||
* 城市建议列表
|
||||
*/
|
||||
@JsonProperty("cities")
|
||||
private List<City> cities;
|
||||
}
|
||||
|
||||
/**
|
||||
* 城市信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class City {
|
||||
|
||||
/**
|
||||
* 城市名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 关键字数目
|
||||
*/
|
||||
@JsonProperty("num")
|
||||
private int num;
|
||||
|
||||
/**
|
||||
* 该城市的citycode
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 该城市的adcode
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* POI信息实体类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Poi {
|
||||
|
||||
/**
|
||||
* 唯一ID
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 父POI的ID
|
||||
* 当前POI如果有父POI,则返回父POI的ID。可能为空
|
||||
*/
|
||||
@JsonProperty("parent")
|
||||
private String parent;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 兴趣点类型
|
||||
* 顺序为大类、中类、小类
|
||||
* 例如:餐饮服务;中餐厅;特色/地方风味餐厅
|
||||
*/
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 兴趣点类型编码
|
||||
* 例如:050118
|
||||
*/
|
||||
@JsonProperty("typecode")
|
||||
private String typecode;
|
||||
|
||||
/**
|
||||
* 行业类型
|
||||
*/
|
||||
@JsonProperty("biz_type")
|
||||
private String bizType;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@JsonProperty("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 经纬度
|
||||
* 格式:X,Y
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 离中心点距离
|
||||
* 单位:米;仅在周边搜索的时候有值返回
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* POI的电话
|
||||
*/
|
||||
@JsonProperty("tel")
|
||||
private String tel;
|
||||
|
||||
/**
|
||||
* 邮编
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("postcode")
|
||||
private String postcode;
|
||||
|
||||
/**
|
||||
* POI的网址
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("website")
|
||||
private String website;
|
||||
|
||||
/**
|
||||
* POI的电子邮箱
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("email")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* POI所在省份编码
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("pcode")
|
||||
private String pcode;
|
||||
|
||||
/**
|
||||
* POI所在省份名称
|
||||
* 若是直辖市的时候,此处直接显示市名,例如北京市
|
||||
*/
|
||||
@JsonProperty("pname")
|
||||
private String pname;
|
||||
|
||||
/**
|
||||
* 城市编码
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("citycode")
|
||||
private String citycode;
|
||||
|
||||
/**
|
||||
* 城市名
|
||||
* 若是直辖市的时候,此处直接显示市名,例如北京市
|
||||
*/
|
||||
@JsonProperty("cityname")
|
||||
private String cityname;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
* 区县级别的返回,例如朝阳区
|
||||
*/
|
||||
@JsonProperty("adname")
|
||||
private String adname;
|
||||
|
||||
/**
|
||||
* POI的入口经纬度
|
||||
* extensions=all时返回,也可用作于POI的到达点;
|
||||
*/
|
||||
@JsonProperty("entr_location")
|
||||
private String entrLocation;
|
||||
|
||||
/**
|
||||
* POI的出口经纬度
|
||||
* 目前不会返回内容;
|
||||
*/
|
||||
@JsonProperty("exit_location")
|
||||
private String exitLocation;
|
||||
|
||||
/**
|
||||
* POI导航id
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("navi_poiid")
|
||||
private String naviPoiid;
|
||||
|
||||
/**
|
||||
* 地理格ID
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("gridcode")
|
||||
private String gridcode;
|
||||
|
||||
/**
|
||||
* 别名
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("alias")
|
||||
private String alias;
|
||||
|
||||
/**
|
||||
* 停车场类型
|
||||
* 仅在停车场类型POI的时候显示该字段
|
||||
* 展示停车场类型,包括:地下、地面、路边
|
||||
* extensions=all的时候显示
|
||||
*/
|
||||
@JsonProperty("parking_type")
|
||||
private String parkingType;
|
||||
|
||||
/**
|
||||
* 该POI的特色内容
|
||||
* 主要出现在美食类POI中,代表特色菜
|
||||
* 例如“烤鱼,麻辣香锅,老干妈回锅肉”
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("tag")
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* 是否有室内地图标志
|
||||
* 1,表示有室内相关数据
|
||||
* 0,代表没有室内相关数据
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("indoor_map")
|
||||
private int indoorMap;
|
||||
|
||||
/**
|
||||
* 团购数据
|
||||
* 此字段逐渐废弃
|
||||
*/
|
||||
@JsonProperty("groupbuy_num")
|
||||
private int groupbuyNum;
|
||||
|
||||
/**
|
||||
* 所属商圈
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("business_area")
|
||||
private String businessArea;
|
||||
|
||||
/**
|
||||
* 优惠信息数目
|
||||
* 此字段逐渐废弃
|
||||
*/
|
||||
@JsonProperty("discount_num")
|
||||
private int discountNum;
|
||||
|
||||
/**
|
||||
* 室内地图相关数据
|
||||
* 当 indoor_map=0 时,字段为空
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("indoor_data")
|
||||
private List<IndoorData> indoorData;
|
||||
|
||||
/**
|
||||
* 深度信息
|
||||
* extensions=all时返回
|
||||
*/
|
||||
@JsonProperty("biz_ext")
|
||||
private List<BizExt> bizExt;
|
||||
|
||||
/**
|
||||
* 照片相关信息
|
||||
*/
|
||||
@JsonProperty("photos")
|
||||
private List<Photo> photos;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 室内地图相关数据
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class IndoorData {
|
||||
/**
|
||||
* 当前POI的父级POI
|
||||
* 如果当前POI为建筑物类POI,则cpid为自身POI ID;
|
||||
* 如果当前POI为商铺类POI,则cpid为其所在建筑物的POI ID
|
||||
*/
|
||||
@JsonProperty("cpid")
|
||||
private String cpid;
|
||||
|
||||
/**
|
||||
* 楼层索引
|
||||
* 一般会用数字表示,例如8
|
||||
*/
|
||||
@JsonProperty("floor")
|
||||
private int floor;
|
||||
|
||||
/**
|
||||
* 所在楼层
|
||||
* 一般会带有字母,例如F8
|
||||
*/
|
||||
@JsonProperty("truefloor")
|
||||
private String trueFloor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 深度信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class BizExt {
|
||||
/**
|
||||
* 评分
|
||||
* 仅存在于餐饮、酒店、景点、影院类POI之下
|
||||
*/
|
||||
@JsonProperty("rating")
|
||||
private double rating;
|
||||
|
||||
/**
|
||||
* 人均消费
|
||||
* 仅存在于餐饮、酒店、景点、影院类POI之下
|
||||
*/
|
||||
@JsonProperty("cost")
|
||||
private double cost;
|
||||
|
||||
/**
|
||||
* 是否可订餐
|
||||
* 仅存在于餐饮相关POI之下(此字段逐渐废弃)
|
||||
*/
|
||||
@JsonProperty("meal_ordering")
|
||||
private boolean mealOrdering;
|
||||
|
||||
/**
|
||||
* 是否可选座
|
||||
* 仅存在于影院相关POI之下(此字段逐渐废弃)
|
||||
*/
|
||||
@JsonProperty("seat_ordering")
|
||||
private boolean seatOrdering;
|
||||
|
||||
/**
|
||||
* 是否可订票
|
||||
* 仅存在于景点相关POI之下(此字段逐渐废弃)
|
||||
*/
|
||||
@JsonProperty("ticket_ordering")
|
||||
private boolean ticketOrdering;
|
||||
|
||||
/**
|
||||
* 是否可以订房
|
||||
* 仅存在于酒店相关POI之下(此字段逐渐废弃)
|
||||
*/
|
||||
@JsonProperty("hotel_ordering")
|
||||
private boolean hotelOrdering;
|
||||
}
|
||||
|
||||
/**
|
||||
* 照片相关信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Photo {
|
||||
/**
|
||||
* 图片介绍
|
||||
*/
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 具体链接
|
||||
*/
|
||||
@JsonProperty("url")
|
||||
private String url;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交通事件
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class TrafficVo {
|
||||
|
||||
/**
|
||||
* 调用成功,常见代码:
|
||||
* <p>
|
||||
* 0:Successful. 成功
|
||||
*/
|
||||
@JsonProperty("code")
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* 事件信息
|
||||
*/
|
||||
@JsonProperty("data")
|
||||
private List<TrafficData> data;
|
||||
|
||||
/**
|
||||
* 事件信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class TrafficData {
|
||||
|
||||
/**
|
||||
* 事件简述
|
||||
*/
|
||||
@JsonProperty("brief")
|
||||
private String brief;
|
||||
|
||||
/**
|
||||
* 事件预计结束时间
|
||||
*/
|
||||
@JsonProperty("endTime")
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 事件描述
|
||||
*/
|
||||
@JsonProperty("eventDesc")
|
||||
private String eventDesc;
|
||||
|
||||
/**
|
||||
* 事件ID
|
||||
*/
|
||||
@JsonProperty("eventID")
|
||||
private int eventID;
|
||||
|
||||
/**
|
||||
* 事件类型
|
||||
*/
|
||||
@JsonProperty("eventType")
|
||||
private int eventType;
|
||||
|
||||
/**
|
||||
* 是否高速
|
||||
*/
|
||||
@JsonProperty("expressway")
|
||||
private int expressway;
|
||||
|
||||
/**
|
||||
* 线路坐标
|
||||
*/
|
||||
@JsonProperty("lines")
|
||||
private String lines;
|
||||
|
||||
/**
|
||||
* 发布方名称
|
||||
*/
|
||||
@JsonProperty("nickName")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 是否权威发布
|
||||
*/
|
||||
@JsonProperty("offcial")
|
||||
private int offcial;
|
||||
|
||||
/**
|
||||
* 事件图片链接
|
||||
*/
|
||||
@JsonProperty("picture")
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("roadName")
|
||||
private String roadName;
|
||||
|
||||
/**
|
||||
* 数据源编号
|
||||
*/
|
||||
@JsonProperty("source")
|
||||
private int source;
|
||||
|
||||
/**
|
||||
* 事件开始时间
|
||||
*/
|
||||
@JsonProperty("startTime")
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 事件最后更新时间
|
||||
*/
|
||||
@JsonProperty("updateTime")
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 经度坐标
|
||||
*/
|
||||
@JsonProperty("x")
|
||||
private double x;
|
||||
|
||||
/**
|
||||
* 纬度坐标
|
||||
*/
|
||||
@JsonProperty("y")
|
||||
private double y;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,183 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 步行路径规划
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class WalkingVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 路线信息列表
|
||||
*/
|
||||
@JsonProperty("route")
|
||||
private List<Route> routeList;
|
||||
|
||||
/**
|
||||
* 路线信息类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Route {
|
||||
/**
|
||||
* 起点坐标
|
||||
*/
|
||||
@JsonProperty("origin")
|
||||
private String origin;
|
||||
|
||||
/**
|
||||
* 终点坐标
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
|
||||
/**
|
||||
* 步行方案列表
|
||||
*/
|
||||
@JsonProperty("paths")
|
||||
private List<Path> pathList;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 步行方案类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Path {
|
||||
/**
|
||||
* 起点和终点的步行距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 步行时间预计,单位:秒
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 步行结果列表
|
||||
*/
|
||||
@JsonProperty("steps")
|
||||
private List<Step> stepList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 步行结果类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class Step {
|
||||
/**
|
||||
* 路段步行指示
|
||||
*/
|
||||
@JsonProperty("instruction")
|
||||
private String instruction;
|
||||
|
||||
/**
|
||||
* 道路名称
|
||||
*/
|
||||
@JsonProperty("road")
|
||||
private String road;
|
||||
|
||||
/**
|
||||
* 此路段距离,单位:米
|
||||
*/
|
||||
@JsonProperty("distance")
|
||||
private int distance;
|
||||
|
||||
/**
|
||||
* 方向
|
||||
*/
|
||||
@JsonProperty("orientation")
|
||||
private String orientation;
|
||||
|
||||
/**
|
||||
* 此路段预计步行时间
|
||||
*/
|
||||
@JsonProperty("duration")
|
||||
private int duration;
|
||||
|
||||
/**
|
||||
* 此路段坐标点
|
||||
*/
|
||||
@JsonProperty("polyline")
|
||||
private String polyline;
|
||||
|
||||
/**
|
||||
* 步行主要动作
|
||||
*/
|
||||
@JsonProperty("action")
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 步行辅助动作
|
||||
*/
|
||||
@JsonProperty("assistant_action")
|
||||
private String assistantAction;
|
||||
|
||||
/**
|
||||
* 步行方式类型
|
||||
* 0,普通道路
|
||||
* <p>
|
||||
* 1,人行横道
|
||||
* <p>
|
||||
* 3,地下通道
|
||||
* <p>
|
||||
* 4,过街天桥
|
||||
* <p>
|
||||
* 5,地铁通道
|
||||
* <p>
|
||||
* 6,公园
|
||||
* <p>
|
||||
* 7,广场
|
||||
* <p>
|
||||
* 8,扶梯
|
||||
* <p>
|
||||
* 9,直梯
|
||||
* <p>
|
||||
* 10,索道
|
||||
* <p>
|
||||
* 11,空中通道
|
||||
* <p>
|
||||
* 12,建筑物穿越通道
|
||||
* <p>
|
||||
* 13,行人通道
|
||||
* <p>
|
||||
* 14,游船路线
|
||||
* <p>
|
||||
* 15,观光车路线
|
||||
* <p>
|
||||
* 16,滑道
|
||||
* <p>
|
||||
* 18,扩路
|
||||
* <p>
|
||||
* 19,道路附属连接线
|
||||
* <p>
|
||||
* 20,阶梯
|
||||
* <p>
|
||||
* 21,斜坡
|
||||
* <p>
|
||||
* 22,桥
|
||||
* <p>
|
||||
* 23,隧道
|
||||
* <p>
|
||||
* 30,轮渡
|
||||
*/
|
||||
@JsonProperty("walk_type")
|
||||
private int walkType;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,201 @@
|
||||
package org.dromara.guide.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.guide.domain.GuideEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 天气查询
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class WeatherQueryVo extends GuideEntity {
|
||||
|
||||
/**
|
||||
* 实况天气数据信息
|
||||
*/
|
||||
@JsonProperty("lives")
|
||||
private List<LiveWeather> lives;
|
||||
|
||||
/**
|
||||
* 预报天气信息数据
|
||||
*/
|
||||
@JsonProperty("forecast")
|
||||
private List<ForecastWeather> forecast;
|
||||
|
||||
/**
|
||||
* 实况天气信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class LiveWeather {
|
||||
|
||||
/**
|
||||
* 省份名
|
||||
*/
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 城市名
|
||||
*/
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 天气现象(汉字描述)
|
||||
*/
|
||||
@JsonProperty("weather")
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 实时气温,单位:摄氏度
|
||||
*/
|
||||
@JsonProperty("temperature")
|
||||
private String temperature;
|
||||
|
||||
/**
|
||||
* 风向描述
|
||||
*/
|
||||
@JsonProperty("winddirection")
|
||||
private String winddirection;
|
||||
|
||||
/**
|
||||
* 风力级别,单位:级
|
||||
*/
|
||||
@JsonProperty("windpower")
|
||||
private String windpower;
|
||||
|
||||
/**
|
||||
* 空气湿度
|
||||
*/
|
||||
@JsonProperty("humidity")
|
||||
private String humidity;
|
||||
|
||||
/**
|
||||
* 数据发布的时间
|
||||
*/
|
||||
@JsonProperty("reporttime")
|
||||
private String reporttime;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 预报天气信息
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class ForecastWeather {
|
||||
|
||||
/**
|
||||
* 城市名称
|
||||
*/
|
||||
@JsonProperty("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 城市编码
|
||||
*/
|
||||
@JsonProperty("adcode")
|
||||
private String adcode;
|
||||
|
||||
/**
|
||||
* 省份名称
|
||||
*/
|
||||
@JsonProperty("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 预报发布时间
|
||||
*/
|
||||
@JsonProperty("reporttime")
|
||||
private String reporttime;
|
||||
|
||||
/**
|
||||
* 预报数据list结构,元素cast,按顺序为当天、第二天、第三天的预报数据
|
||||
*/
|
||||
@JsonProperty("casts")
|
||||
private List<ForecastData> casts;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 预报天气数据实体类
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class ForecastData {
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonProperty("date")
|
||||
private String date;
|
||||
|
||||
/**
|
||||
* 星期几
|
||||
*/
|
||||
@JsonProperty("week")
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 白天天气现象
|
||||
*/
|
||||
@JsonProperty("dayweather")
|
||||
private String dayweather;
|
||||
|
||||
/**
|
||||
* 晚上天气现象
|
||||
*/
|
||||
@JsonProperty("nightweather")
|
||||
private String nightweather;
|
||||
|
||||
/**
|
||||
* 白天温度
|
||||
*/
|
||||
@JsonProperty("daytemp")
|
||||
private String daytemp;
|
||||
|
||||
/**
|
||||
* 晚上温度
|
||||
*/
|
||||
@JsonProperty("nighttemp")
|
||||
private String nighttemp;
|
||||
|
||||
/**
|
||||
* 白天风向
|
||||
*/
|
||||
@JsonProperty("daywind")
|
||||
private String daywind;
|
||||
|
||||
/**
|
||||
* 晚上风向
|
||||
*/
|
||||
@JsonProperty("nightwind")
|
||||
private String nightwind;
|
||||
|
||||
/**
|
||||
* 白天风力
|
||||
*/
|
||||
@JsonProperty("daypower")
|
||||
private String daypower;
|
||||
|
||||
/**
|
||||
* 晚上风力
|
||||
*/
|
||||
@JsonProperty("nightpower")
|
||||
private String nightpower;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.dromara.guide.util;
|
||||
|
||||
import com.dtflys.forest.Forest;
|
||||
import org.dromara.guide.client.GuideClient;
|
||||
|
||||
/**
|
||||
* 高德地图API工具
|
||||
*
|
||||
* @author AprilWind
|
||||
*/
|
||||
public class GuideUtil {
|
||||
private static GuideClient CLIENT = Forest.client(GuideClient.class);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
org.dromara.guide.config.GuideProperties
|
||||
@ -0,0 +1,5 @@
|
||||
client:
|
||||
# 高德地图API
|
||||
guide:
|
||||
key: 920a2a10bcfa85f561f2018b2474776f
|
||||
clientKey: 920a2a10bcfa85f561f2018b2474776f
|
||||
Loading…
Reference in New Issue
Block a user