blob: 43b80e6d7f687f1e204aadc15c2af98d8b9ec06b [file] [log] [blame]
22301102b1084372025-06-01 16:44:23 +08001package com.pt.service;
2
22301102fe5f8412025-06-01 17:25:51 +08003import com.pt.entity.Download;
22301102b1084372025-06-01 16:44:23 +08004import com.pt.repository.DownloadRepository;
5import org.springframework.beans.factory.annotation.Autowired;
6import org.springframework.stereotype.Service;
7
22301102fe5f8412025-06-01 17:25:51 +08008import java.util.List;
9
22301102b1084372025-06-01 16:44:23 +080010@Service
11public class DownloadService {
12
13 @Autowired
14 private DownloadRepository downloadRepository;
15
22301102bc6da0a2025-06-02 17:47:29 +080016 public void save(Download download) {
17 downloadRepository.save(download);
22301102b1084372025-06-01 16:44:23 +080018 }
19
22301102bc6da0a2025-06-02 17:47:29 +080020 public List<Download> getByResourceId(String resourceId) {
22301102fe5f8412025-06-01 17:25:51 +080021 return downloadRepository.findByResourceId(resourceId);
22 }
22301102bc6da0a2025-06-02 17:47:29 +080023
22301102b1084372025-06-01 16:44:23 +080024}