修改Tracker服务器相关bug

Change-Id: Id3ec61034575bd794724be98f832f8c065448b92
diff --git a/src/main/java/com/pt/service/TorrentMetaService.java b/src/main/java/com/pt/service/TorrentMetaService.java
new file mode 100644
index 0000000..185c321
--- /dev/null
+++ b/src/main/java/com/pt/service/TorrentMetaService.java
@@ -0,0 +1,30 @@
+package com.pt.service;
+
+import com.pt.entity.TorrentMeta;
+import com.pt.repository.TorrentMetaRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+
+@Service
+public class TorrentMetaService {
+
+    @Autowired
+    private TorrentMetaRepository torrentMetaRepository;
+
+    public void save(TorrentMeta torrentMeta) {
+        // 这里可以添加保存逻辑,比如调用repository的save方法
+        // torrentMetaRepository.save(torrentMeta);
+        System.out.println("Saving TorrentMeta: " + torrentMeta);
+    }
+
+    public void save(String infoHash, String name, long size) {
+        TorrentMeta torrentMeta = new TorrentMeta();
+        torrentMeta.setInfoHash(infoHash);
+        torrentMeta.setFilename(name);
+        torrentMeta.setSize(size);
+        torrentMeta.setUploadTime(LocalDateTime.now());
+        torrentMetaRepository.save(torrentMeta);
+    }
+}