Commit eb392e46 by 王欣伟

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

1 parent 517abbb8
......@@ -3,7 +3,7 @@
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>glsx-rest-admin-archetype</artifactId>
<artifactId>glsx-ne-shield</artifactId>
<groupId>com.glsx</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
......@@ -24,16 +24,9 @@
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-feign</artifactId>
<version>${rest.admin.feign.version}</version>
<scope>compile</scope>
</dependency>
<!--<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-core</artifactId>
<version>1.1.1-SNAPSHOT</version>
</dependency>-->
<!-- swagger -->
<dependency>
<groupId>com.glsx</groupId>
......
package cn.com.glsx.devicemonitor.api.feign;
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 com.glsx.plat.core.web.R;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -9,7 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank;
import java.util.List;
/**
* @author wangxw
......@@ -32,7 +34,7 @@ public interface GpsBsService {
* @return
*/
@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 {
* @return
*/
@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 {
* @return
*/
@GetMapping(value = "/single/history")
public R getLastGpsBsHistoryBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "deviceCode") String deviceCode,
@RequestParam(value = "startTime") String startTime, @RequestParam(value = "endTime") String endTime);
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);
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!