packagetrack.repository;importorg.springframework.data.jpa.repository.JpaRepository;importorg.springframework.data.jpa.repository.Modifying;importorg.springframework.data.jpa.repository.Query;importorg.springframework.transaction.annotation.Transactional;importtrack.model.Account;importjava.math.BigInteger;importjava.util.List;@TransactionalpublicinterfaceTrackAccountRepositoryextendsJpaRepository<Account,Long>{@Query(value="select * from account c where is_super_user=true and past_date is not null",nativeQuery=true)List<Account>findAllParent();@Query(value="select * from account c where parent = ?1",nativeQuery=true)List<Account>findByParent(Longaccount);@Query(value="select count(*) from account where parent = ?1 and pub_date > ?2 and pub_date < ?3",nativeQuery=true)BigIntegercountByRootParent(LongaccountId,StringstartDate,StringendDate);}