Kaynağa Gözat

test: 添加接口测试

刘传伟 1 ay önce
ebeveyn
işleme
d2e5c28cbb
1 değiştirilmiş dosya ile 98 ekleme ve 0 silme
  1. 98 0
      api-test.http

+ 98 - 0
api-test.http

@@ -0,0 +1,98 @@
+### 新增人情事件
+POST http://localhost:8080/favor/add
+Content-Type: application/json
+
+{
+  "favorItemList": [
+    {
+      "receivePersonId": 1,
+      "returnGift": {
+        "title": "100斤猪肉",
+        "type": "T",
+        "amount": 1300
+      },
+      "givePersonId": 2,
+      "giveGift": {
+        "title": "1万",
+        "type": "M",
+        "amount": 10000
+      },
+      "remark": "恭喜"
+    },
+    {
+      "receivePersonId": 1,
+      "returnGift": {
+        "title": "200斤猪肉",
+        "type": "T",
+        "amount": 2300
+      },
+      "givePersonId": 3,
+      "giveGift": {
+        "title": "2万",
+        "type": "M",
+        "amount": 20000
+      },
+      "remark": "恭喜"
+    }
+  ],
+  "holdDate": "2024-08-01",
+  "title": "八一建党节",
+  "holdPersonId": 1,
+  "incomeAmount": 1999.99,
+  "payAmount": 99.99,
+  "remark": "祝贺"
+}
+
+### 查询人情事件详情
+GET http://localhost:8080/favor/detail/1
+
+### 修改人情事件
+POST http://localhost:8080/favor/update
+Content-Type: application/json
+
+{
+  "id": 1,
+  "holdDate": "2024-08-01",
+  "title": "八一建党节1",
+  "holdPersonId": 1,
+  "incomeAmount": 11999.99,
+  "payAmount": 199.99,
+  "remark": "祝贺1",
+  "favorItemList": [
+    {
+      "id": 1,
+      "favorId": 1,
+      "receivePersonId": 1,
+      "givePersonId": 2,
+      "remark": "恭喜1",
+      "returnGift": {
+        "id": 2,
+        "title": "1000斤猪肉",
+        "type": "T",
+        "amount": 10300.00
+      },
+      "giveGift": {
+        "id": 1,
+        "title": "11万",
+        "type": "M",
+        "amount": 110000.00
+      }
+    },
+    {
+      "favorId": 1,
+      "receivePersonId": 1,
+      "givePersonId": 6,
+      "remark": "恭喜3",
+      "returnGift": {
+        "title": "300斤猪肉",
+        "type": "T",
+        "amount": 3300.00
+      },
+      "giveGift": {
+        "title": "3万",
+        "type": "M",
+        "amount": 30000.00
+      }
+    }
+  ]
+}