Ver Fonte

test:调试接口脚本

liuchuanwei há 1 mês atrás
pai
commit
b1c5515417
3 ficheiros alterados com 53 adições e 18 exclusões
  1. 5 0
      http-client.env.json
  2. 33 18
      人情事件.http
  3. 15 0
      人情明细.http

+ 5 - 0
http-client.env.json

@@ -0,0 +1,5 @@
+{
+  "dev": {
+    "api_url": "http://localhost:8080"
+  }
+}

+ 33 - 18
api-test.http → 人情事件.http

@@ -1,5 +1,5 @@
 ### 新增人情事件
-POST http://localhost:8080/favor/add
+POST {{api_url}}/favor/add
 Content-Type: application/json
 
 {
@@ -44,7 +44,7 @@ Content-Type: application/json
 }
 
 ### 查询人情事件详情
-GET http://localhost:8080/favor/detail/1
+GET {{api_url}}/favor/detail/2
 
 ### 修改人情事件
 POST http://localhost:8080/favor/update
@@ -60,39 +60,54 @@ Content-Type: application/json
   "remark": "祝贺1",
   "favorItemList": [
     {
-      "id": 1,
+      "id": 9,
       "favorId": 1,
       "receivePersonId": 1,
-      "givePersonId": 2,
-      "remark": "恭喜1",
+      "givePersonId": 6,
+      "remark": "恭喜恭喜恭喜",
       "returnGift": {
-        "id": 2,
-        "title": "1000斤猪肉",
+        "id": 16,
+        "title": "10斤牛肉",
         "type": "T",
-        "amount": 10300.00
+        "amount": 160.00
       },
       "giveGift": {
-        "id": 1,
-        "title": "11万",
+        "id": 15,
+        "title": "¥2000",
         "type": "M",
-        "amount": 110000.00
+        "amount": 2000.00
       }
     },
     {
       "favorId": 1,
       "receivePersonId": 1,
-      "givePersonId": 6,
-      "remark": "恭喜3",
+      "givePersonId": 7,
+      "remark": "恭喜发财",
       "returnGift": {
-        "title": "300斤猪肉",
+        "title": "面粉",
         "type": "T",
-        "amount": 3300.00
+        "amount": 25.00
       },
       "giveGift": {
-        "title": "3万",
+        "title": "¥400",
         "type": "M",
-        "amount": 30000.00
+        "amount": 400.00
       }
     }
   ]
-}
+}
+
+
+### 删除人情事件
+POST {{api_url}}/favor/delete/1
+
+### 查询人情事件列表
+GET {{api_url}}/favor/listPage
+Content-Type: application/json
+
+{
+  "page": {
+    "pageNo": 1,
+    "pageSize": 10
+  }
+}

+ 15 - 0
人情明细.http

@@ -0,0 +1,15 @@
+### 分页查询
+GET {{api_url}}/favorItem/listPage
+Content-Type: application/json
+
+{
+  "page": {
+    "pageNo": 1,
+    "pageSize": 10
+  }
+}
+
+
+### 删除人情事件
+POST {{api_url}}/favorItem/delete?ids=7
+Content-Type: application/json