包名更换;api增加版本号
parent
11d010ec1b
commit
b92795b619
@ -0,0 +1,69 @@
|
||||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!--父pom.xml-->
|
||||
<groupId>com.htfp</groupId>
|
||||
<artifactId>weather</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>weather app</name>
|
||||
<description>weather service prepublish</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.13</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<!--声明子模块-->
|
||||
<modules>
|
||||
<module>tablestore-grid-master</module>
|
||||
<module>weather-service</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.19.1</version>
|
||||
<configuration>
|
||||
<skipTests>false</skipTests> <!--默认关掉单元测试 -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -1,62 +0,0 @@
|
||||
package com.aliyun.tablestore.example.grid.common;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
|
||||
|
||||
public class TableStoreConf {
|
||||
|
||||
private String endpoint;
|
||||
private String accessId;
|
||||
private String accessKey;
|
||||
private String instanceName;
|
||||
|
||||
/**
|
||||
* 从目标配置文件中读取 数据库instance相关信息
|
||||
*/
|
||||
public static TableStoreConf newInstance(String path) {
|
||||
try {
|
||||
InputStream f = new FileInputStream(path);
|
||||
Gson gson = new Gson();
|
||||
return gson.fromJson(IOUtils.toString(f), TableStoreConf.class);
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public String getEndpoint() {
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
public void setEndpoint(String endpoint) {
|
||||
this.endpoint = endpoint;
|
||||
}
|
||||
|
||||
public String getAccessId() {
|
||||
return accessId;
|
||||
}
|
||||
|
||||
public void setAccessId(String accessId) {
|
||||
this.accessId = accessId;
|
||||
}
|
||||
|
||||
public String getAccessKey() {
|
||||
return accessKey;
|
||||
}
|
||||
|
||||
public void setAccessKey(String accessKey) {
|
||||
this.accessKey = accessKey;
|
||||
}
|
||||
|
||||
public String getInstanceName() {
|
||||
return instanceName;
|
||||
}
|
||||
|
||||
public void setInstanceName(String instanceName) {
|
||||
this.instanceName = instanceName;
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.aliyun.tablestore.example.grid.common;
|
||||
|
||||
import com.aliyun.tablestore.grid.TableStoreGrid;
|
||||
import com.aliyun.tablestore.grid.TableStoreGridConfig;
|
||||
|
||||
public abstract class TableStoreGridExample {
|
||||
|
||||
protected TableStoreGrid tableStoreGrid;
|
||||
// private String pathSeperator = "/";
|
||||
|
||||
public TableStoreGridExample(String dataTableName, String metaTableName) {
|
||||
// String os = System.getProperty("os.name");
|
||||
// if (os.toLowerCase().startsWith("win")) {
|
||||
// pathSeparator = "\\";
|
||||
// }
|
||||
String pathSeparator = System.getProperty("file.separator");
|
||||
TableStoreConf conf = TableStoreConf.newInstance(System.getProperty("user.dir") + pathSeparator + "tablestoreConf.json");
|
||||
TableStoreGridConfig config = new TableStoreGridConfig();
|
||||
config.setTableStoreEndpoint(conf.getEndpoint());
|
||||
config.setAccessId(conf.getAccessId());
|
||||
config.setAccessKey(conf.getAccessKey());
|
||||
config.setTableStoreInstance(conf.getInstanceName());
|
||||
config.setDataTableName(dataTableName);
|
||||
config.setMetaTableName(metaTableName);
|
||||
tableStoreGrid = new TableStoreGrid(config);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
if (tableStoreGrid != null) {
|
||||
tableStoreGrid.close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
package com.htfp.weather.web.pojo.caiyun;
|
||||
package com.htfp.weather.web.param.caiyun;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,9 +1,8 @@
|
||||
package com.htfp.weather.web.pojo.caiyun;
|
||||
package com.htfp.weather.web.param.caiyun;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,9 +1,8 @@
|
||||
package com.htfp.weather.web.pojo.caiyun;
|
||||
package com.htfp.weather.web.param.caiyun;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @Author : shiyi
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.caiyun;
|
||||
package com.htfp.weather.web.param.caiyun;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.cma;
|
||||
package com.htfp.weather.web.param.cma;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.cma;
|
||||
package com.htfp.weather.web.param.cma;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.hefeng;
|
||||
package com.htfp.weather.web.param.hefeng;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.hefeng;
|
||||
package com.htfp.weather.web.param.hefeng;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,9 +1,8 @@
|
||||
package com.htfp.weather.web.pojo.hefeng;
|
||||
package com.htfp.weather.web.param.hefeng;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.hefeng;
|
||||
package com.htfp.weather.web.param.hefeng;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.hefeng;
|
||||
package com.htfp.weather.web.param.hefeng;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.request;
|
||||
package com.htfp.weather.web.param.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.request;
|
||||
package com.htfp.weather.web.param.request;
|
||||
|
||||
import com.htfp.weather.download.gfs.GfsDataConfig;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.request;
|
||||
package com.htfp.weather.web.param.request;
|
||||
|
||||
import com.htfp.weather.download.gfs.GfsVariableIsobaricEnum;
|
||||
import com.htfp.weather.download.gfs.GfsLevelsEnum;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.request;
|
||||
package com.htfp.weather.web.param.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.htfp.weather.web.pojo.request;
|
||||
package com.htfp.weather.web.param.request;
|
||||
|
||||
import com.htfp.weather.download.gfs.GfsVariableIsobaricEnum;
|
||||
import com.htfp.weather.info.Constant;
|
||||
import com.htfp.weather.web.valid.DateTimeStr;
|
||||
import com.htfp.weather.web.valid.EnumValid;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.request;
|
||||
package com.htfp.weather.web.param.request;
|
||||
|
||||
import com.htfp.weather.griddata.common.TableConfig;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.htfp.weather.download.DownLoadFileInfo;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.htfp.weather.griddata.operation.GfsDataImport;
|
||||
import com.htfp.weather.griddata.operation.GfsDataImport.ImportFileInfo;
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,11 +1,8 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @Author : shiyi
|
||||
* @Date : 2024/5/8 15:19
|
@ -1,8 +1,7 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Author : shiyi
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.htfp.weather.web.exception.ErrorCode;
|
||||
import lombok.Data;
|
@ -1,4 +1,4 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
@ -1,9 +1,8 @@
|
||||
package com.htfp.weather.web.pojo.response;
|
||||
package com.htfp.weather.web.param.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -1,9 +0,0 @@
|
||||
package com.htfp.weather.web.service;
|
||||
|
||||
/**
|
||||
* @Author : shiyi
|
||||
* @Date : 2024/3/15 10:51
|
||||
* @Description : 数据调用接口
|
||||
*/
|
||||
public interface IDataService {
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.htfp.weather.web.service;
|
||||
|
||||
import com.htfp.weather.web.param.response.NowWeatherStatus;
|
||||
import com.htfp.weather.web.param.response.PlaneResponse;
|
||||
import com.htfp.weather.web.param.response.ProfileDataset;
|
||||
import com.htfp.weather.web.param.response.TimeSeriesDataset;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author : shiyi
|
||||
* @Date : 2024/3/15 10:51
|
||||
* @Description : 高空数据接口
|
||||
*/
|
||||
public interface IUpperDataService {
|
||||
NowWeatherStatus getNowWeather(int level, double latitude, double longitude);
|
||||
|
||||
List<NowWeatherStatus> getNowWeatherByMultiPoint(List<Double> latitude, List<Double> longitude, int level);
|
||||
|
||||
TimeSeriesDataset getForecastSeries(int level, double latitude, double longitude);
|
||||
|
||||
List<TimeSeriesDataset> getForecastSeriesByMultiPoint(List<Double> latitudeList, List<Double> longitudeList, int level);
|
||||
|
||||
ProfileDataset getProfileByPressure(OffsetDateTime targetTime, double latitude, double longitude);
|
||||
|
||||
PlaneResponse getPlane(OffsetDateTime targetTime, String variableName, int level, double minLat, double maxLat, double minLon, double maxLon);
|
||||
}
|
Loading…
Reference in New Issue