@@ -0,0 +1,1513 @@
+package com.example.bot.spring.database;%0A%0Aimport java.net.URISyntaxException;%0Aimport java.sql.Connection;%0Aimport java.sql.PreparedStatement;%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0Aimport java.util.List;%0Aimport java.util.ArrayList;%0Aimport java.util.Set;%0Aimport java.util.HashSet;%0A%0Apublic class ReminderDBEngine extends DBEngine %7B%0A%09private Connection connection;%0A%09%0A%09public ReminderDBEngine() %7B%0A%09%09connection = null;%0A%09%7D%0A%09%0A%09public void openConnection() %7B%0A%09%09try %7B%0A%09%09%09connection = this.getConnection();%0A%09%09%7D catch (URISyntaxException %7C SQLException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%0A%09public void close() %7B%0A%09%09try %7B%0A%09%09%09connection.close();%0A%09%09%09connection = null;%0A%09%09%7D catch (SQLException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%0A%09private ResultSet query(PreparedStatement nstmt) %7B%0A%09%09ResultSet rs = null;%0A%09%09try %7B%0A%09%09%09rs = nstmt.executeQuery();%0A%09%09%7D catch (SQLException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return rs;%0A%09%7D%0A%09%0A%09public Set%3CString%3E ReminderChecker() %7B%0A%09%09openConnection();%0A%09%09PreparedStatement stmt;%0A%09%09Set%3CString%3E idSet=new Set%3CString%3E();%0A%09%09try %7B%0A%09%09%09stmt = connection.prepareStatement(%0A%09%09%09%09%09%22select line_user_info.userid from line_user_info join customer_info on %22%0A%09%09%09%09%09+ %22customer_info.customername=line_user_info.name %22%0A%09%09%09%09%09+ %22where customer_info.tourfee%3Ecustomer_info.paidamount%22);%0A%09%09%09ResultSet rs = stmt.executeQuery();%0A%09%09%09while(rs.next()) %7B%0A%09%09%09%09idSet.add(rs.getString(1));%0A%09%09%09%7D%0A%09%09%09rs.close();%0A%09%09%09stmt.close();%0A%09%09%7D catch (SQLException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09close();%0A%09%09return idSet;%0A%09%7D%0A%0A%7D%0A

add new file