|
|
@@ -8,6 +8,7 @@ import com.platform.exception.BaseResult;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import jakarta.annotation.Resource;
|
|
|
+import org.springframework.cloud.openfeign.FeignClient;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@@ -19,12 +20,12 @@ import java.util.List;
|
|
|
/**
|
|
|
* Author: donglang
|
|
|
* Time: 2025-10-13
|
|
|
- * Des: 开物云4.0对外接口
|
|
|
+ * Des: 开物云4.0对外接口(传输Feign客户端)
|
|
|
* Version: 1.0
|
|
|
*/
|
|
|
@Tag(name = "数据传输接口", description = "车辆数据采集和查询相关接口")
|
|
|
@RestController
|
|
|
-@RequestMapping("/api/transfer")
|
|
|
+@FeignClient(name = "platform-transfer-api", url = "${platform.transfer.api.url}")
|
|
|
public class TransferController {
|
|
|
|
|
|
@Resource
|
|
|
@@ -34,7 +35,7 @@ public class TransferController {
|
|
|
* 保存车辆数据
|
|
|
*/
|
|
|
@Operation(summary = "保存车辆数据", description = "保存车辆实时采集的数据")
|
|
|
- @PostMapping("/saveVehicleData")
|
|
|
+ @PostMapping("/api/transfer/saveVehicleData")
|
|
|
public BaseResult<Boolean> saveVehicleData(@RequestBody @Validated VehicleDataSaveRequest request) {
|
|
|
transferVehicleManage.saveVehicleData(request);
|
|
|
return BaseResult.success(true);
|
|
|
@@ -44,7 +45,7 @@ public class TransferController {
|
|
|
* 查询车辆数据
|
|
|
*/
|
|
|
@Operation(summary = "查询车辆数据列表", description = "分页查询车辆历史数据")
|
|
|
- @PostMapping("/queryVehicleDataList")
|
|
|
+ @PostMapping("/api/transfer/queryVehicleDataList")
|
|
|
public BaseResult<List<VehicleDataResp>> queryVehicleDataList(@RequestBody VehicleDataRequest request) {
|
|
|
return BaseResult.success(transferVehicleManage.queryVehicleDataList(request));
|
|
|
}
|
|
|
@@ -53,7 +54,7 @@ public class TransferController {
|
|
|
* 通过车牌查询实时经纬度
|
|
|
*/
|
|
|
@Operation(summary = "查询实时位置", description = "根据车牌号查询车辆的实时经纬度")
|
|
|
- @PostMapping("/queryRealTimeLocation")
|
|
|
+ @PostMapping("/api/transfer/queryRealTimeLocation")
|
|
|
public BaseResult<VehicleDataResp> queryRealTimeLocation(@RequestBody VehicleDataRequest request) {
|
|
|
return BaseResult.success(transferVehicleManage.queryRealTimeLocation(request));
|
|
|
}
|