图谱-后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.4 KiB

package com.teaching.backend.service.resource;
import com.teaching.backend.common.BaseResponse;
import com.teaching.backend.model.dto.resource.ResourceUploadDto;
import com.teaching.backend.model.entity.resource.Resources;
import org.springframework.core.io.InputStreamResource;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Set;
/**
* @Author:youhang
* @Date:2024-07-26-13:55
* @Description:
*/
public interface ResourceService {
BaseResponse<Resources> upload(MultipartFile file) ;
BaseResponse<String> delete(String filename) ;
ResponseEntity<InputStreamResource> readFile(String filename);
BaseResponse<String> addResourcesAndKnowByCourseId(String courseId, List<Long> resourcesIds);
BaseResponse<String> addResourcesAndKnowByChapterId(Long chapterId, List<Long> resourcesIds);
BaseResponse<String> addResourcesAndKnowById(Long id, List<Long> resourcesIds);
//查询课程下资源
BaseResponse<Set<Resources>> queryResourcesByCourseId(String courseId);
//查询章节下资源
BaseResponse<Set<Resources>> queryResourcesByChapterId(Long chapterId);
//查询二级节点下资源
BaseResponse<Set<Resources>> queryBesidesKnowToResources(Long KnowId);
BaseResponse<Set<Resources>> queryResourcesByKnowId(Long KnowId);
}