select i.id,i.price,i.amount,g.name from orderitem i ,goods g where order_id = ? and i.goods_id = g.id
java.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); }
相关分类