public List findFloorsHotProducts(int start, int pagesize) {\n List floorVos =new ArrayList();\n try {\n List pcodeList=pcodeDao.findPcodeListByCodeType("4");\n for(Pcode pcode:pcodeList){\n String param7 = pcode.getParam7();\n FloorVo vo=new FloorVo();\n vo.setFloorNo(param7);\n String cid= pcode.getParam2();\n List productList =dao.findHotProductListByPage(cid,start,pagesize);\n vo.setProducts(productList);\n floorVos.add(vo);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n return floorVos;\n }\n public List navigationBar() {\n List categoryList =null;\n try {\n categoryList = dao.findAllCategorys();\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n return categoryList;\n }\n public PageBean findProductListByCid(String cid, int currentPage, int pageSize) {\n PageBean pageBean=null;\n try {\n int totalCount=dao.queryProductTotalCountByCid(cid);\n pageBean=new PageBean(pageSize,totalCount);\n pageBean.setCurrentPage(currentPage);\n int start=(currentPage-1) * pageSize;\n List productList=dao.findProductListByPage(cid,start,pageSize);\n pageBean.setList(productList);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n return pageBean;\n }\n public Product productInfo(String pid){\n Product product= null;\n try {\n product = dao.findProductByPid(pid);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n return product;\n }\n //生成订单\n public void submitOrders(Order order){\n try {\n dao.saveOrder(order);\n dao.saveOrderItems(order);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }


原文地址: https://www.cveoy.top/t/topic/p8PX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录