这是我的服务:
@Override
public List<Dmsapphistoryhead> readDmsapphistoryheadfromUserdocorg(long userdocorg) {
Pageable topTen = new PageRequest(0, 5);
return dmsapphistoryheadRepo.readuserdocorg(userdocorg, topTen);
}
这是我的回购:
public interface DmsapphistoryheadRepo extends JpaRepository<Dmsapphistoryhead, Long> {
@Query("SELECT d "
+ "FROM Dmsapphistoryhead d , Dmsuserdocorg a "
+ "WHERE d.userdocorg.userdocorg = a.userdocorg "
+ "AND d.userdocorg = :userdocorg")
List<Dmsapphistoryhead> readuserdocorg(@Param("userdocorg") long userdocorg, Pageable pageable);
}