Browse Source

fix saveRemoteResource

guozhaoshun 6 years ago
parent
commit
c62c25ce55

+ 3 - 6
rankin-resource-service/src/main/java/cn/rankin/resourceservice/proxy/RemoteResourceProxy.java

@@ -5,10 +5,7 @@ import cn.rankin.common.utils.api.page.Page;
 import cn.rankin.resourceservice.dto.ResourceDetail;
 import cn.rankin.resourceservice.dto.ResourceRemote;
 import org.springframework.cloud.netflix.feign.FeignClient;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 import java.util.Map;
@@ -32,9 +29,9 @@ public interface RemoteResourceProxy {
     APIResult<List<ResourceDetail>> getBatch(@RequestParam("ids") List<String> ids);
 
     @RequestMapping(value = "/rcenter/v1/resources/mgt", method = RequestMethod.POST)
-    APIResult<ResourceDetail> saveResources(@RequestParam("resourceRemote") ResourceRemote resourceRemote);
+    APIResult<ResourceDetail> saveResources(@RequestBody ResourceRemote resourceRemote);
 
     @RequestMapping(value = "/rcenter/v1/resources/mgt", method = RequestMethod.PUT)
-    APIResult<ResourceDetail> updateResources(@RequestParam("resourceRemote") ResourceRemote resourceRemote);
+    APIResult<ResourceDetail> updateResources(@RequestBody ResourceRemote resourceRemote);
 
 }