|
@@ -1,6 +1,8 @@
|
|
|
package com.izouma.nineth.repo.netease;
|
|
package com.izouma.nineth.repo.netease;
|
|
|
|
|
|
|
|
import com.izouma.nineth.domain.netease.NeteaseMessage;
|
|
import com.izouma.nineth.domain.netease.NeteaseMessage;
|
|
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
@@ -16,8 +18,7 @@ public interface NeteaseMessageRepo extends JpaRepository<NeteaseMessage, Long>,
|
|
|
@Transactional
|
|
@Transactional
|
|
|
void softDelete(Long id);
|
|
void softDelete(Long id);
|
|
|
|
|
|
|
|
- @Query(value = "select * from netease_message n where n.to_id = ?1 and n.ope = ?2 order by n.created_at desc limit 100", nativeQuery = true)
|
|
|
|
|
- List<NeteaseMessage> findAllByToIdAndOpe(String toId, Integer ope);
|
|
|
|
|
|
|
+ Page<NeteaseMessage> findAllByToIdAndOpeOrderByCreatedAtDesc(String toId, Integer ope, Pageable pageable);
|
|
|
|
|
|
|
|
Long countAllByToIdAndOpeAndCreatedAtAfter(String toId, Integer ope, LocalDateTime createdAt);
|
|
Long countAllByToIdAndOpeAndCreatedAtAfter(String toId, Integer ope, LocalDateTime createdAt);
|
|
|
|
|
|