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.
cloudnote_server/src/main/java/com/bupt/note/Repository/RatingRepository.java

15 lines
600 B

package com.bupt.note.Repository;
import com.bupt.note.Model.Rating;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
public interface RatingRepository extends JpaRepository<Rating, Long>, JpaSpecificationExecutor<Rating> {
Rating findByPaperIdAndUserName(Long paperId, String userName);
@Query(value = "select id from sys_paper_rating where score1+score2+score3>?1",nativeQuery = true)
List<Long> findLike(int score);
}