请帮我写以下 spring 数据 jpa

please help me with writing following spring data jpa

我想写这样的东西:

find where player id = ?1 && (lastspinneddate < ?2 || lastspinneddate == null)

,但是当我这样写的时候:

repo.findByPlayerIdAndLastSpinnedDateBeforeOrLastSpinnedDateIsNull(playerId,startOfDay);

,但这样返回是不正确的:

find where (player id = ?1 && lastspinneddate < ?2) || lastspinneddate == null

请帮我写上面的spring数据jpa,在此先感谢

只需用类似

的方式注释该方法
@Query("select p from Player p where p.id = ?1 && (p.lastSpinnedDate < ?2 or p.lastSpinnedDate is null)")