初步实现资源与下载的框架,后续在TODO处完善即可。

Change-Id: Ib12b43a9f873f7b2ab65f3790c0e1015f18407ce
diff --git a/src/main/java/com/pt/service/DownloadService.java b/src/main/java/com/pt/service/DownloadService.java
index 284be5a..c02aea1 100644
--- a/src/main/java/com/pt/service/DownloadService.java
+++ b/src/main/java/com/pt/service/DownloadService.java
@@ -1,9 +1,12 @@
 package com.pt.service;
 
+import com.pt.entity.Download;
 import com.pt.repository.DownloadRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class DownloadService {
 
@@ -14,6 +17,9 @@
         this.downloadRepository = downloadRepository;
     }
 
+    public List<Download> searchByResourceId(int resourceId) {
+        return downloadRepository.findByResourceId(resourceId);
+    }
     /*
         TODO: 添加下载需要的服务;
      */