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.
17 lines
560 B
17 lines
560 B
package com.bupt.note.Repository;
|
|
|
|
import com.bupt.note.Model.Collect;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
|
|
import javax.transaction.Transactional;
|
|
import java.util.List;
|
|
|
|
public interface CollectRepository extends JpaRepository<Collect, Long> {
|
|
boolean existsByPaperIdAndUserName(Long paperId, String userName);
|
|
@Modifying
|
|
@Transactional
|
|
Integer deleteByPaperIdAndUserName(Long paperId, String userName);
|
|
|
|
List<Collect> findByUserName(String userName);
|
|
}
|
|
|