init
This commit is contained in:
		
							
								
								
									
										3
									
								
								sl-express-ms-service-scope-api/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								sl-express-ms-service-scope-api/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
.idea
 | 
			
		||||
target/
 | 
			
		||||
*.iml
 | 
			
		||||
							
								
								
									
										41
									
								
								sl-express-ms-service-scope-api/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								sl-express-ms-service-scope-api/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">
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>com.sl-express</groupId>
 | 
			
		||||
        <artifactId>sl-express-parent</artifactId>
 | 
			
		||||
        <version>1.4</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
    <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
 | 
			
		||||
    <groupId>com.sl-express.ms.service-scope</groupId>
 | 
			
		||||
    <artifactId>sl-express-ms-service-scope-api</artifactId>
 | 
			
		||||
    <version>1.1-SNAPSHOT</version>
 | 
			
		||||
    <description>服务范围微服务-Feign接口</description>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
        <maven.compiler.source>11</maven.compiler.source>
 | 
			
		||||
        <maven.compiler.target>11</maven.compiler.target>
 | 
			
		||||
        <sl-express-common.version>1.2-SNAPSHOT</sl-express-common.version>
 | 
			
		||||
        <sl-express-ms-service-scope-domain.version>1.1-SNAPSHOT</sl-express-ms-service-scope-domain.version>
 | 
			
		||||
    </properties>
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.sl-express.common</groupId>
 | 
			
		||||
            <artifactId>sl-express-common</artifactId>
 | 
			
		||||
            <version>${sl-express-common.version}</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.sl-express.ms.service-scope</groupId>
 | 
			
		||||
            <artifactId>sl-express-ms-service-scope-domain</artifactId>
 | 
			
		||||
            <version>${sl-express-ms-service-scope-domain.version}</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
            <artifactId>spring-cloud-starter-openfeign</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
    </dependencies>
 | 
			
		||||
 | 
			
		||||
</project>
 | 
			
		||||
@@ -0,0 +1,61 @@
 | 
			
		||||
package com.sl.ms.scope.api;
 | 
			
		||||
 | 
			
		||||
import com.sl.ms.scope.dto.ServiceScopeDTO;
 | 
			
		||||
import org.springframework.cloud.openfeign.FeignClient;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import springfox.documentation.annotations.ApiIgnore;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@FeignClient(name = "sl-express-ms-service-scope", contextId = "ServiceScope", path = "scopes")
 | 
			
		||||
@ApiIgnore
 | 
			
		||||
public interface ServiceScopeFeign {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增或更新服务服务范围
 | 
			
		||||
     *
 | 
			
		||||
     * @param serviceScopeDTO 范围数据
 | 
			
		||||
     */
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    void saveScope(@RequestBody ServiceScopeDTO serviceScopeDTO);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除服务范围
 | 
			
		||||
     *
 | 
			
		||||
     * @param bid  业务id
 | 
			
		||||
     * @param type 类型,1-机构,2-快递员
 | 
			
		||||
     */
 | 
			
		||||
    @DeleteMapping("{bid}/{type}")
 | 
			
		||||
    void delete(@PathVariable("bid") Long bid, @PathVariable("type") Integer type);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询服务范围
 | 
			
		||||
     *
 | 
			
		||||
     * @param bid  业务id
 | 
			
		||||
     * @param type 类型,1-机构,2-快递员
 | 
			
		||||
     * @return 服务范围数据
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("{bid}/{type}")
 | 
			
		||||
    ServiceScopeDTO queryServiceScope(@PathVariable("bid") Long bid, @PathVariable("type") Integer type);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 地址查询服务范围
 | 
			
		||||
     *
 | 
			
		||||
     * @param type    类型,1-机构,2-快递员
 | 
			
		||||
     * @param address 详细地址,如:北京市昌平区金燕龙办公楼传智教育总部
 | 
			
		||||
     * @return 服务范围数据列表
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("address")
 | 
			
		||||
    List<ServiceScopeDTO> queryListByAddress(@RequestParam("type") Integer type, @RequestParam("address") String address);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 位置查询服务范围
 | 
			
		||||
     *
 | 
			
		||||
     * @param type      类型,1-机构,2-快递员
 | 
			
		||||
     * @param longitude 经度
 | 
			
		||||
     * @param latitude  纬度
 | 
			
		||||
     * @return 服务范围数据列表
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("location")
 | 
			
		||||
    List<ServiceScopeDTO> queryListByLocation(@RequestParam("type") Integer type, @RequestParam("longitude") Double longitude, @RequestParam("latitude") Double latitude);
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user