日期:2014-05-17 浏览次数:20646 次
public List ZhifuOrderInfo(String orderid) {
List<OrderInfo>list = new ArrayList();
try {
Connection con = DBUtil.getConnection();
String sql = "SELECT * FROM `orderinfo` WHERE `orderid` like "+orderid;
PreparedStatement pst = con.prepareStatement(sql);
ResultSet rs = pst.executeQuery();
while(rs.next()) {
OrderInfo oi = new OrderInfo();
oi.setOrderid(rs.getString(2));
oi.setGoodname(rs.getString(4));
oi.setPrice(rs.getString(5));
oi.setGoodtype(rs.getString(6));
oi.setNumber(rs.getString(7));
oi.setSum(rs.getString(8));
System.out.println("===========================");
System.out.println("orderid="+orderid);
System.out.println(oi.getGoodname()+"zhifu");
System.out.println(oi.getOrderid()+"zhifu");
System.out.println("===========================");
list.add(oi);
}
rs.close();
pst.close();
con.close();
}catch(Exception e) {
e.printStackTrace();
}
return list;
}