forked from rbmonster/learning-note
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f3c0034
Showing
68 changed files
with
2,203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.example</groupId> | ||
<artifactId>learningNote</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
<version>2.2.6.RELEASE</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<version>2.2.6.RELEASE</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-all</artifactId> <!-- Use 'netty-all' for 4.0 or above --> | ||
<version>4.1.10.Final</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>2.23.4</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-openfeign</artifactId> | ||
<version>2.2.3.RELEASE</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>2.11.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.11.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.12</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.learning; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.openfeign.EnableFeignClients; | ||
|
||
/** | ||
* <pre> | ||
* @Description: TODO(一句话描述该类的功能) | ||
* </pre> | ||
* | ||
* @version v1.0 | ||
* @ClassName: LearnApplication | ||
* @Author: 86159 | ||
* @Date: 2020/4/19 22:17 | ||
*/ | ||
@SpringBootApplication | ||
@EnableFeignClients | ||
public class LearnApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(LearnApplication.class, args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <pre> | ||
* 描述:TODO | ||
* </pre> | ||
* | ||
* @类名:com.xy.tms.baiDuPosition.entity.AddressComponent | ||
* @作者: ht_hbs | ||
* @创建日期: 2019/9/2 19:07 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class AddressComponent { | ||
private String country; | ||
private String country_code; | ||
private String country_code_iso; | ||
private String country_code_iso2; | ||
private String province; | ||
private String city; | ||
private String city_level; | ||
private String district; | ||
private String town; | ||
private String adcode; | ||
private String street; | ||
private String street_number; | ||
private String direction; | ||
private String distance; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.learning.client; | ||
|
||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
/** | ||
* <pre> | ||
* 描述:百度定位地址解析获取 | ||
* http://api.map.baidu.com/geocoding/v3/?address=%E4%B8%8A%E6%B5%B7%E5%B8%82&output=json&ak=tvjX68wYlVlHM0acgnPxhuqnyj3mBpBx&callback=sh | ||
* </pre> | ||
* | ||
* @类名:com.xy.tms.api.baiduMap.BaiduMapClient | ||
* @作者: 洪杉铷 | ||
* @创建日期: 2019/9/23 14:56 | ||
*/ | ||
@FeignClient(name = "baidu-map-service", url = "http://api.map.baidu.com") | ||
public interface BaiduMapClient { | ||
|
||
/** | ||
* 根据地址获取经纬度 | ||
* @param address | ||
* @param output | ||
* @param ak | ||
* @return | ||
*/ | ||
@GetMapping(path = "/geocoding/v3/") | ||
String getLatitudeAndLongitude(@RequestParam("address") String address, @RequestParam("output") String output, @RequestParam("ak") String ak); | ||
|
||
/** | ||
* 根据经纬度获取地址 | ||
* @param ak | ||
* @param output | ||
* @param coordtype | ||
* @param location | ||
* @return | ||
*/ | ||
@GetMapping(path = "/reverse_geocoding/v3/") | ||
String getAddressByLatAndLtude(@RequestParam("ak") String ak, @RequestParam("output") String output, @RequestParam("coordtype") String coordtype, @RequestParam("location") String location); | ||
|
||
@GetMapping(path = "/directionlite/v1/driving") | ||
String getRoad(@RequestParam("origin")String origin,@RequestParam("destination")String destination,@RequestParam("ak")String ak); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* <pre> | ||
* @Description: | ||
* TODO | ||
* </pre> | ||
* | ||
* @version v1.0 | ||
* @ClassName: destination | ||
* @Author: sanwu | ||
* @Date: 2020/6/10 22:41 | ||
*/ | ||
@Data | ||
public class Destination { | ||
|
||
private double lng; | ||
private double lat; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <pre> | ||
* 描述:TODO | ||
* </pre> | ||
* | ||
* @类名:com.xy.tms.baiDuPosition.entity.Location | ||
* @作者: ht_hbs | ||
* @创建日期: 2019/9/2 19:05 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class Location { | ||
private Double lng; | ||
private Double lat; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <pre> | ||
* @Description: | ||
* TODO | ||
* </pre> | ||
* | ||
* @version v1.0 | ||
* @ClassName: Origin | ||
* @Author: sanwu | ||
* @Date: 2020/6/10 22:40 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class Origin { | ||
private double lng; | ||
private double lat; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <pre> | ||
* 描述:TODO | ||
* </pre> | ||
* | ||
* @类名:com.xy.tms.baiDuPosition.entity.PoiRegions | ||
* @作者: ht_hbs | ||
* @创建日期: 2019/9/2 19:09 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class PoiRegions { | ||
private String one; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <pre> | ||
* 描述:TODO | ||
* </pre> | ||
* | ||
* @类名:com.xy.tms.baiDuPosition.entity.Pois | ||
* @作者: ht_hbs | ||
* @创建日期: 2019/9/2 19:11 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class Pois { | ||
private String one; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* <pre> | ||
* 描述:TODO | ||
* </pre> | ||
* | ||
* @类名:com.xy.tms.baiDuPosition.entity.latitudeLongitude.receData | ||
* @作者: ht_hbs | ||
* @创建日期: 2019/9/2 19:17 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class ReceData { | ||
private int status; | ||
private String message; | ||
private Result result; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.learning.client; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* <pre> | ||
* 描述:TODO | ||
* </pre> | ||
* | ||
* @类名:com.xy.tms.baiDuPosition.entity.Result | ||
* @作者: ht_hbs | ||
* @创建日期: 2019/9/2 19:04 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class Result { | ||
private Location location; | ||
private int precise; | ||
private int confidence; | ||
private int comprehension; | ||
private String level; | ||
private String formatted_address; | ||
private String business; | ||
private AddressComponent addressComponent; | ||
private List<PoiRegions> poiRegions; | ||
private List<Roads> roads; | ||
private List<Pois> pois; | ||
private String sematic_description; | ||
private int cityCode; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
/** | ||
* <pre> | ||
* @Description: | ||
* TODO | ||
* </pre> | ||
* | ||
* @version v1.0 | ||
* @ClassName: RoadData | ||
* @Author: sanwu | ||
* @Date: 2020/6/10 22:52 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class RoadData { | ||
private int status; | ||
private String message; | ||
private RoadResult result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.learning.client; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* <pre> | ||
* @Description: | ||
* TODO | ||
* </pre> | ||
* | ||
* @version v1.0 | ||
* @ClassName: RoadResult | ||
* @Author: sanwu | ||
* @Date: 2020/6/10 22:52 | ||
*/ | ||
@Getter | ||
@Setter | ||
public class RoadResult { | ||
private Origin origin; | ||
private Destination destination; | ||
private List<Routes> routes; | ||
} |
Oops, something went wrong.