Search in sources :

Example 6 with ClubBankModel

use of com.kendy.entity.ClubBankModel in project financial by greatkendy123.

the class DBUtil method getAllClubBanks.

// /**
// * 修改俱乐部银行卡信息
// */
// public static boolean updateClubBank(final ClubBankModel bank) {
// boolean isOK = false;
// try {
// con = DBConnection.getConnection();
// String sql;
// //			sql = "update clubbank set clubName=?,mobilePayType=?,personName=?,phoneNumber=?,bankType=?,bankAccountInfo=? where clubId=?";
// sql = "update clubbank set clubName=?,mobilePayType=?,personName=?,phoneNumber=?,bankType=?,bankAccountInfo=? where clubId=?";
// ps = con.prepareStatement(sql);
// ps.setString(1, bank.getClubName());
// ps.setString(2, bank.getMobilePayType());
// ps.setString(3, bank.getPersonName());
// ps.setString(4, bank.getPhoneNumber());
// ps.setString(5, bank.getBankType());
// ps.setString(6, bank.getBankAccountInfo());
// ps.setString(7, bank.getClubId());
// ps.execute();
// isOK = true;
// }catch (SQLException e) {
// ErrorUtil.err("修改俱乐部银行卡信息记录失败", e);
// isOK = false;
// }finally{
// close(con,ps);
// }
// return isOK;
// }
/**
 * 获取所有俱乐部银行卡信息
 *
 * @time 2017年12月18日
 * @return
 */
public static Map<String, ClubBankModel> getAllClubBanks() {
    Map<String, ClubBankModel> map = new HashMap<>();
    try {
        con = DBConnection.getConnection();
        String sql = "select * from  clubBank";
        ps = con.prepareStatement(sql);
        ResultSet rs = ps.executeQuery();
        while (rs.next()) {
            ClubBankModel bank = new ClubBankModel();
            bank.setClubId(rs.getString(1));
            bank.setClubName(rs.getString(2));
            bank.setMobilePayType(rs.getString(3));
            bank.setPersonName(rs.getString(4));
            bank.setPhoneNumber(rs.getString(5));
            bank.setBankType(rs.getString(6));
            bank.setBankAccountInfo(rs.getString(7));
            map.put(rs.getString(1), bank);
        }
    } catch (SQLException e) {
        ErrorUtil.err("获取所有俱乐部银行卡信息失败", e);
    } finally {
        close(con, ps);
    }
    return map;
}
Also used : HashMap(java.util.HashMap) SQLException(java.sql.SQLException) ResultSet(java.sql.ResultSet) ClubBankModel(com.kendy.entity.ClubBankModel)

Aggregations

ClubBankModel (com.kendy.entity.ClubBankModel)6 HashMap (java.util.HashMap)3 ClubBankInfo (com.kendy.entity.ClubBankInfo)2 InputDialog (com.kendy.util.InputDialog)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 Club (com.kendy.entity.Club)1 QuotaMoneyInfo (com.kendy.entity.QuotaMoneyInfo)1 ExportQuotaPayExcel (com.kendy.excel.ExportQuotaPayExcel)1 ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1