select i.id,i.price,i.amount,g.name from orderitem i ,goods g where order_id = ? and i.goods_id = g.idjava.sql.SQLException: Cannot create com.yanzi.model.OrderItem: com.yanzi.model.OrderItem Query: select i.id,i.price,i.amount,g.name from orderitem i ,goods g where order_id = ? and i.goods_id = g.id Parameters: [9]public List<OrderItem> selectAllItem(int orderid) throws SQLException {
QueryRunner r = new QueryRunner(DBUtil.getDataSource());
String sql = "select i.id,i.price,i.amount,g.name from orderitem i ,goods g where order_id = ? and i.goods_id = g.id";
System.out.println(sql); return r.query(sql, new BeanListHandler<OrderItem>(OrderItem.class),orderid);
}
添加回答
举报
0/150
提交
取消