Przeglądaj źródła

接口方统一改成POST

wanghn 6 miesięcy temu
rodzic
commit
5c9a3282ad

+ 6 - 6
src/main/java/com/qizhen/healsphere/web/EntityController.java

@@ -36,7 +36,7 @@ public class EntityController {
 
     @ApiOperation(value = "批量删除实体",
             notes = "")
-    @RequestMapping(value = "/deleteEntity",method = RequestMethod.DELETE)
+    @RequestMapping(value = "/deleteEntity",method = RequestMethod.POST)
     @ResponseBody
     public RespDTO<Boolean> deleteEntity(@RequestBody List<Long> ids) {
 
@@ -47,7 +47,7 @@ public class EntityController {
 
     @ApiOperation(value = "批量修改实体名称",
             notes = "")
-    @RequestMapping(value = "/updateEntityName",method = RequestMethod.PUT)
+    @RequestMapping(value = "/updateEntityName",method = RequestMethod.POST)
     @ResponseBody
     public RespDTO<List<Map<String, Object>>> updateEntityName(@RequestBody List<UpdateEntityVO> updateEntityList) {
 
@@ -58,9 +58,9 @@ public class EntityController {
 
     @ApiOperation(value = "实体列表查询(根据标签和名字模糊查询实体)",
             notes = "")
-    @RequestMapping(value = "/findEntityListByName",method = RequestMethod.GET)
+    @RequestMapping(value = "/findEntityListByName",method = RequestMethod.POST)
     @ResponseBody
-    public RespDTO<List<Map<String, Object>>> findEntityListByName(String label, String name) {
+    public RespDTO<List<Map<String, Object>>> findEntityListByName(@RequestBody String label, @RequestBody String name) {
 
         List<Map<String, Object>> list = entityService.findEntityListByName(label, name);
         return RespDTO.onSuc(list);
@@ -69,9 +69,9 @@ public class EntityController {
 
     @ApiOperation(value = "实体详情查询(根据id查询实体)",
             notes = "")
-    @RequestMapping(value = "/findEntity",method = RequestMethod.GET)
+    @RequestMapping(value = "/findEntity",method = RequestMethod.POST)
     @ResponseBody
-    public RespDTO<Map<String, Object>> findEntity(Long id) {
+    public RespDTO<Map<String, Object>> findEntity(@RequestBody Long id) {
 
         Map<String, Object> entity = entityService.findEntityById(id);
         return RespDTO.onSuc(entity);

+ 2 - 2
src/main/java/com/qizhen/healsphere/web/PropertyController.java

@@ -37,7 +37,7 @@ public class PropertyController {
 
     @ApiOperation(value = "删除实体属性",
             notes = "")
-    @RequestMapping(value = "/deleteEntityProperty",method = RequestMethod.DELETE)
+    @RequestMapping(value = "/deleteEntityProperty",method = RequestMethod.POST)
     @ResponseBody
     public RespDTO<List<Map<String, Object>>> deleteEntityProperty(@RequestBody List<DeletePropertyVO> deletePropertyList) {
 
@@ -47,7 +47,7 @@ public class PropertyController {
 
     @ApiOperation(value = "更新实体属性",
             notes = "")
-    @RequestMapping(value = "/updateEntityProperty",method = RequestMethod.PUT)
+    @RequestMapping(value = "/updateEntityProperty",method = RequestMethod.POST)
     @ResponseBody
     public RespDTO<Map<String, Object>> updateEntityProperty(@RequestBody UpdatePropertyVO updateProperty) {
 

+ 4 - 4
src/main/java/com/qizhen/healsphere/web/RelationshipController.java

@@ -35,7 +35,7 @@ public class RelationshipController {
 
     @ApiOperation(value = "批量删除关系",
             notes = "")
-    @RequestMapping(value = "/deleteRelationship",method = RequestMethod.DELETE)
+    @RequestMapping(value = "/deleteRelationship",method = RequestMethod.POST)
     @ResponseBody
     public RespDTO<Boolean> deleteRelationship(@RequestBody List<RelationshipVO> relationshipList) {
 
@@ -46,9 +46,9 @@ public class RelationshipController {
 
     @ApiOperation(value = "根据名称模糊查询关系",
             notes = "")
-    @RequestMapping(value = "/findRelationshipType",method = RequestMethod.GET)
+    @RequestMapping(value = "/findRelationshipType",method = RequestMethod.POST)
     @ResponseBody
-    public RespDTO<List<String>> findRelationshipType(String relationshipType) {
+    public RespDTO<List<String>> findRelationshipType(@RequestBody String relationshipType) {
 
         List<String> relationshipTypeList = relationshipService.findRelationshipType(relationshipType);
         return RespDTO.onSuc(relationshipTypeList);
@@ -56,7 +56,7 @@ public class RelationshipController {
 
     @ApiOperation(value = "批量更新实体名称",
             notes = "")
-    @RequestMapping(value = "/updateRelationshipType",method = RequestMethod.PUT)
+    @RequestMapping(value = "/updateRelationshipType",method = RequestMethod.POST)
     @ResponseBody
     public RespDTO<List<String>> updateRelationshipType(@RequestBody List<UpdateRelationTypeVO> updateRelationshipTypeList) {