Skip to content

Commit

Permalink
add time query for redpacket
Browse files Browse the repository at this point in the history
  • Loading branch information
liberhe committed Dec 18, 2023
1 parent fafd898 commit d4f9142
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface RedPacketRepository extends JpaRepository<RedPacket, String>,



@Query(value = "select * from red_packet where address_list like ?1 and claimed_address not like ?1 and status = ?2 ", nativeQuery = true)
@Query(value = "select * from red_packet where address_list like ?1 and claimed_address not like ?1 and status = ?2 and expire_time < UNIX_TIMESTAMP(current_timestamp()) ", nativeQuery = true)
List<RedPacket> findByUnclaimedPacket(@Param("address") String address, @Param("status") Integer status);


Expand Down

0 comments on commit d4f9142

Please sign in to comment.