|
|
@ -42,13 +42,13 @@ public class FreeVIPService{ |
|
|
|
|
|
|
|
public List<FreeVIP> getSocial(SteamID steamID) { |
|
|
|
return entityManager.createNativeQuery("SELECT id, steam3, vk_id, discord_id, date FROM free_vip WHERE steam3 = ?1 ORDER BY `free_vip`.`date` DESC") |
|
|
|
.setParameter(1, steamID.steam3) |
|
|
|
.setParameter(1, steamID.steam2) |
|
|
|
.getResultList(); |
|
|
|
} |
|
|
|
|
|
|
|
public Long getLastGivedFreeVIP(SteamID steamID) { |
|
|
|
return (Long) entityManager.createNativeQuery("SELECT UNIX_TIMESTAMP(`date`) as u_time FROM free_vip WHERE steam3 LIKE ?1 ORDER BY `date` DESC") |
|
|
|
.setParameter(1, steamID.steam3) |
|
|
|
.setParameter(1, steamID.steam2) |
|
|
|
.getResultStream().findFirst().orElse(0L); |
|
|
|
} |
|
|
|
|
|
|
|