소스 검색

fix updateRemoteResource

guozhaoshun 6 년 전
부모
커밋
b38ddc7529
1개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 6
      rankin-resource-service/src/main/java/cn/rankin/resourceservice/service/ResourceService.java

+ 7 - 6
rankin-resource-service/src/main/java/cn/rankin/resourceservice/service/ResourceService.java

@@ -334,7 +334,7 @@ public class ResourceService {
             }
         });*/
 
-        Set<ResourceVideo> videos = result.getData().getVideos();
+ /*       Set<ResourceVideo> videos = result.getData().getVideos();
         if(videos != null && videos.size() > 0){
             Iterator<ResourceVideo> iterator = videos.iterator();
             while(iterator.hasNext()){
@@ -346,11 +346,12 @@ public class ResourceService {
                 video.setSize(resource.getSize());
                 log.info("Remote Server info: video={}, message={},data={}", video);
             }
-        }
+        }*/
 
 
-/*        Set<ResourceVideo> videos = new HashSet<>();
+        Set<ResourceVideo> videos = new HashSet<>();
         ResourceVideo video = new ResourceVideo();
+        video.setId(resource.getId());
         video.setBucket("efunbox");
         video.setPath(resource.getPath());
         video.setQuality(resource.getQuality());
@@ -360,18 +361,18 @@ public class ResourceService {
 
 
         ResourceRemote resourceRemote = new ResourceRemote();
+        resourceRemote.setId(resource.getId());
         resourceRemote.setNo(resource.getCode());
         resourceRemote.setTitle(resource.getName());
         resourceRemote.setType(resource.getType());
         resourceRemote.setVideos(videos);
 
         APIResult<ResourceDetail> apiResult = resourceProxy.updateResources(resourceRemote);
-        log.info("updateResources: "+apiResult);
         if (!apiResult.getSuccess()) {
             return errorResourceAPIResult(apiResult);
-        }*/
+        }
 
-//        Resource resourceVO = apiResult.getData().toNativeResource();
+        log.info("Remote Server info: code={}, message={},data={}", apiResult.getCode(), apiResult.getMessage(),apiResult.getData());
         return APIResult.ok();
     }