summaryrefslogtreecommitdiff
path: root/src/main/java/com/mesasoft/cn/service/IDownloadedService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/mesasoft/cn/service/IDownloadedService.java')
-rw-r--r--src/main/java/com/mesasoft/cn/service/IDownloadedService.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main/java/com/mesasoft/cn/service/IDownloadedService.java b/src/main/java/com/mesasoft/cn/service/IDownloadedService.java
new file mode 100644
index 0000000..bb47ecd
--- /dev/null
+++ b/src/main/java/com/mesasoft/cn/service/IDownloadedService.java
@@ -0,0 +1,39 @@
+package com.mesasoft.cn.service;
+
+import com.mesasoft.cn.model.DownloadRecord;
+
+import java.util.List;
+
+/**
+ * @author pantao
+ * @since 2018/2/1
+ */
+public interface IDownloadedService {
+
+ /**
+ * 添加下载记录
+ *
+ * @param userId 用户编号
+ * @param fileId 文件编号
+ */
+ void insertDownload(int userId, long fileId);
+
+ /**
+ * 通过文件编号删除下载记录
+ *
+ * @param fileId 文件编号
+ */
+ void removeByFileId(long fileId);
+
+ /**
+ * 获取所有下载记录
+ *
+ * @param user 用户名或邮箱
+ * @param category 分类名称
+ * @param file 文件名
+ * @param offset 偏移
+ *
+ * @return {@link DownloadRecord}
+ */
+ List<DownloadRecord> list(String user, String file, String category, int offset);
+}