初步建立了NewsRepository
This commit is contained in:
parent
2505b63b88
commit
f9a6a3c481
@ -0,0 +1,19 @@
|
|||||||
|
package org.cmh.backend.NewsManagement.repository;
|
||||||
|
|
||||||
|
import org.cmh.backend.NewsManagement.model.News;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface NewsRepository extends JpaRepository<News, Long> {
|
||||||
|
News findByTitle(String title);
|
||||||
|
|
||||||
|
News findBySummary(String summary);
|
||||||
|
|
||||||
|
News findByAuthor(String author);
|
||||||
|
|
||||||
|
News findByImagePath(String imagePath);
|
||||||
|
|
||||||
|
News findByContent(String content);
|
||||||
|
|
||||||
|
News findByTitleAndSummaryAndAuthorAndImagePath(String title, String summary, String author, String imagePath);
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user