From 8c3f24eac11caae968468da2e50db041b6725113 Mon Sep 17 00:00:00 2001
From: zhangjian <zhangjianrock@163.com>
Date: Fri, 04 Aug 2023 14:44:15 +0800
Subject: [PATCH] 修改参数
---
/dev/null | 27 ---------------------------
ard-work/src/main/java/com/ruoyi/device/uav/controller/ArdUavController.java | 4 +++-
2 files changed, 3 insertions(+), 28 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/device/uav/controller/ArdUavController.java b/ard-work/src/main/java/com/ruoyi/device/uav/controller/ArdUavController.java
index 07d1185..076f54f 100644
--- a/ard-work/src/main/java/com/ruoyi/device/uav/controller/ArdUavController.java
+++ b/ard-work/src/main/java/com/ruoyi/device/uav/controller/ArdUavController.java
@@ -58,7 +58,9 @@
@PostMapping("/")
@ApiOperation("无人机post接口")
- public Object post(@RequestParam String url, @RequestParam String data) {
+ public Object post(@RequestBody Map<String,String> param) {
+ String url = param.get("url");
+ String data = param.get("data");
return this.uavService.doUavRequest(POST, url, data);
}
diff --git a/ard-work/src/main/java/com/ruoyi/utils/forest/UavAuth.java b/ard-work/src/main/java/com/ruoyi/utils/forest/UavAuth.java
deleted file mode 100644
index 78a93f0..0000000
--- a/ard-work/src/main/java/com/ruoyi/utils/forest/UavAuth.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.ruoyi.utils.forest;
-
-
-import com.dtflys.forest.annotation.MethodLifeCycle;
-import com.dtflys.forest.annotation.RequestAttributes;
-
-import java.lang.annotation.*;
-
-@MethodLifeCycle(UavAuthLifeCircle.class)
-@Documented
-/** 重点: @MethodLifeCycle注解指定该注解的生命周期类*/
-@RequestAttributes
-@Retention(RetentionPolicy.RUNTIME)
-/** 指定该注解可用于类上或方法上 */
-@Target({ElementType.TYPE, ElementType.METHOD})
-public @interface UavAuth {
- String token();
-}
diff --git a/ard-work/src/main/java/com/ruoyi/utils/forest/UavAuthLifeCircle.java b/ard-work/src/main/java/com/ruoyi/utils/forest/UavAuthLifeCircle.java
deleted file mode 100644
index db6338f..0000000
--- a/ard-work/src/main/java/com/ruoyi/utils/forest/UavAuthLifeCircle.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.ruoyi.utils.forest;
-
-import com.dtflys.forest.http.ForestRequest;
-import com.dtflys.forest.lifecycles.MethodAnnotationLifeCycle;
-import com.dtflys.forest.reflection.ForestMethod;
-
-public class UavAuthLifeCircle implements MethodAnnotationLifeCycle<UavAuth, Object> {
-
-
- /**
- * 发送请求前执行此方法
- */
- @Override
- public boolean beforeExecute(ForestRequest request) {
- String token = (String) getAttribute(request, "token");
- request.addHeader("x-auth-token", token);
- return true;
- }
-
- /**
- * 此方法在请求方法初始化的时候被调用
- */
-
- @Override
- public void onMethodInitialized(ForestMethod forestMethod, UavAuth uavAuth) {
- }
-}
--
Gitblit v1.9.3