Commit eb392e46 by 王欣伟

统一参数返回增加泛型的支持

1 parent 517abbb8
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>glsx-rest-admin-archetype</artifactId> <artifactId>glsx-ne-shield</artifactId>
<groupId>com.glsx</groupId> <groupId>com.glsx</groupId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
...@@ -24,16 +24,9 @@ ...@@ -24,16 +24,9 @@
<dependency> <dependency>
<groupId>com.glsx</groupId> <groupId>com.glsx</groupId>
<artifactId>rest-admin-feign</artifactId> <artifactId>rest-admin-feign</artifactId>
<version>${rest.admin.feign.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!--<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-core</artifactId>
<version>1.1.1-SNAPSHOT</version>
</dependency>-->
<!-- swagger --> <!-- swagger -->
<dependency> <dependency>
<groupId>com.glsx</groupId> <groupId>com.glsx</groupId>
......
package cn.com.glsx.devicemonitor.api.feign; package cn.com.glsx.devicemonitor.api.feign;
import cn.com.glsx.devicemonitor.api.dto.request.GpsBsLastBatchRequest; import cn.com.glsx.devicemonitor.api.dto.request.GpsBsLastBatchRequest;
import cn.com.glsx.devicemonitor.api.dto.response.GpsBsData;
import cn.com.glsx.devicemonitor.api.dto.response.GpsLocation;
import cn.com.glsx.devicemonitor.api.feign.factory.GpsBsServiceFallbackFactory; import cn.com.glsx.devicemonitor.api.feign.factory.GpsBsServiceFallbackFactory;
import com.glsx.plat.core.web.R; import com.glsx.plat.core.web.R;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
...@@ -9,7 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -9,7 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank; import java.util.List;
/** /**
* @author wangxw * @author wangxw
...@@ -32,7 +34,7 @@ public interface GpsBsService { ...@@ -32,7 +34,7 @@ public interface GpsBsService {
* @return * @return
*/ */
@PostMapping(value = "/lastgpsbs/batch") @PostMapping(value = "/lastgpsbs/batch")
public R getLastGpsBsBatch(@RequestBody GpsBsLastBatchRequest gpsBsLastBatchRequest); public R<List<GpsBsData>> getLastGpsBsBatch(@RequestBody GpsBsLastBatchRequest gpsBsLastBatchRequest);
/** /**
* 获取单个设备的最新位置和基站数据 * 获取单个设备的最新位置和基站数据
...@@ -41,7 +43,7 @@ public interface GpsBsService { ...@@ -41,7 +43,7 @@ public interface GpsBsService {
* @return * @return
*/ */
@GetMapping(value = "/single") @GetMapping(value = "/single")
public R getLastGpsBsBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode); public R<GpsBsData> getLastGpsBsBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode);
/** /**
* 获取设备的历史轨迹 * 获取设备的历史轨迹
...@@ -50,6 +52,6 @@ public interface GpsBsService { ...@@ -50,6 +52,6 @@ public interface GpsBsService {
* @return * @return
*/ */
@GetMapping(value = "/single/history") @GetMapping(value = "/single/history")
public R getLastGpsBsHistoryBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode, public R<List<GpsLocation>> getLastGpsBsHistoryBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode,
@RequestParam(value = "startTime") String startTime, @RequestParam(value = "endTime") String endTime); @RequestParam(value = "startTime") String startTime, @RequestParam(value = "endTime") String endTime);
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!