日期:2014-05-18 浏览次数:20722 次
@Override
public List tradeInfo(String cardId) {
// TODO Auto-generated method stub
List list=new ArrayList();
String sql="select * from bank_trader where cardId='"+cardId+"'";
conn=DB.getConn();
try {
st=conn.createStatement();
rs=st.executeQuery(sql);
while(rs.next()){
TradeInfo trade=new TradeInfo();
trade.setDateTime(rs.getString("dateTime"));
trade.setMoney(rs.getDouble("money"));
trade.setBalance(rs.getDouble("balance"));
trade.setTrade(rs.getString("trade"));
list.add(trade);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
try {
rs.close();
st.close();
conn.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return list;
}