returnentityManager.createNativeQuery("SELECT `discord_id` FROM `light_bans` INNER JOIN `steam2discord` ON `light_bans`.`active` = ?1 AND `light_bans`.`steam_id` COLLATE utf8mb4_unicode_ci LIKE `steam2discord`.`steam_id`")
.setParameter(1,1)
.getResultList();
returnjdbcTemplate.query("SELECT `discord_id` FROM `light_bans` INNER JOIN `steam2discord` ON `light_bans`.`active` = ?1 AND `light_bans`.`steam_id` COLLATE utf8mb4_unicode_ci LIKE `steam2discord`.`steam_id`",
List<Object[]>result=entityManager.createNativeQuery("SELECT id, flags, immunity, status, amount, UNIX_TIMESTAMP(`reg_date`) as u_timestamp FROM sm_admins WHERE `identity` LIKE ?1")
returnjdbcTemplate.query("SELECT id, flags, immunity, status, amount, UNIX_TIMESTAMP(`reg_date`) as utime as u_timestamp FROM sm_admins WHERE `identity` LIKE ?",
returnentityManager.createNativeQuery("UPDATE `sm_admins` SET `amount`=`amount`+?1, `reg_date`=`reg_date` WHERE `identity` LIKE ?2 AND `status` LIKE ?3")
.setParameter(1,amount)
.setParameter(2,steamID.steam2)
.setParameter(3,status)
.executeUpdate();
returnjdbcTemplate.update("UPDATE `sm_admins` SET `amount`=`amount`+?1, `reg_date`=`reg_date` WHERE `identity` LIKE ?2 AND `status` LIKE ?3",
@ -91,14 +81,25 @@ public class PermitionService {
publicAdminInfogetAdminInfo(SteamIDsteamID){
//Так слушай меня ваня, ты ебанько ибо перепутал тут steam2 и steam3, d в бд steam3 хотя по факту там 2
List<Object[]>result=entityManager.createNativeQuery("SELECT id, vk_id, discord_id, discord_name, steam3, permition FROM bot_admins WHERE steam3 LIKE ?1")
.setParameter(1,steamID.steam2)
.getResultList();
List<AdminInfo>result=jdbcTemplate.query("SELECT id, vk_id, discord_id, discord_name, steam3, permition FROM bot_admins WHERE steam3 LIKE ?",
if(result.isEmpty())result=entityManager.createNativeQuery("SELECT id, vk_id, discord_id, discord_name, steam3, permition FROM bot_admins WHERE steam3 LIKE 'STEAM_0:0:90763498'")