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;
}
Aggregations