src/t/o/bean/DBorder.java

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package t.o.bean;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

public class DBorder {
	public static int uploadFood(String sql){
		int result = 0;
		Connection conn=null;
		Statement stmt=null;
		ResultSet rs=null;
		
		try {
			conn = DBmessage.getConnection();
			stmt = conn.createStatement();
			result = stmt.executeUpdate(sql);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			result = 0;
		}
		finally{
			DBmessage.allClose(conn, stmt, rs);
		}
		return result;
	}
	public static ArrayList<orderBean> getom(String sql){
		ArrayList<orderBean> orderList = new ArrayList<orderBean>();
		
		Connection conn = null;
		Statement stmt = null;
		ResultSet rs = null;
		try {
			conn = DBmessage.getConnection();
			stmt = conn.createStatement();
			rs = stmt.executeQuery(sql);
			
			while(rs.next()){
				String order_no = rs.getString("o_orderNo").trim();
				String order_user = rs.getString("o_orderUser").trim();
				String order_food = rs.getString("o_orderFood").trim();
				float order_allprice = Float.valueOf(rs.getString("o_orderAllprice").trim());
				String order_remark = rs.getString("o_orderRemark").trim();
				String order_state = rs.getString("o_orderState").trim();
				
				orderBean orderbean = new orderBean(order_no,order_user,order_food,order_allprice,order_remark,order_state);
				orderList.add(orderbean);
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		finally{
			DBmessage.allClose(conn, stmt, rs);
		}
		return orderList;
	}
	public static int getrs(String sql){
后面还有 21 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。