freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

電子商務(wù)系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)-資料下載頁(yè)

2025-07-29 11:09本頁(yè)面
  

【正文】 員正確登錄系統(tǒng)后臺(tái)后便可完成對(duì)系統(tǒng)所用商品的瀏覽,商品信息的修改,商品分類的添加和修改,以及訂單狀態(tài)的查看和跟蹤。后臺(tái)管理主界面和核心代碼如下:后臺(tái)管理主界面如圖 616 所示。圖 616 后臺(tái)管理主界面后臺(tái)管理界面核心代碼如下。private void addBook(HttpServletRequest request,30 / 44HttpServletResponse response) throws IOException, ServletException {//由于涉及到文件上傳因此,不再是普通的表單提交。//新建 DiskFileItemFactory 實(shí)例和 ServletFileUpload 實(shí)例對(duì)象DiskFileItemFactory factory = new DiskFileItemFactory()。ServletFileUpload fileUpload = new ServletFileUpload(factory)。 //設(shè)置字符編碼,解析 request,獲得文件項(xiàng)集合(UTF8)。MapString,String map = new HashMapString ,String()。try {@SuppressWarnings(unchecked)ListFileItem list = (request)。//遍歷集合,取出普通項(xiàng)和文件項(xiàng)for (FileItem fileItem : list) {if(()){//普通項(xiàng)就封裝到 map 集合中((), (UTF8))。}else{//文件項(xiàng)則上傳至服務(wù)器//首先獲得文件名String filename = ()。// (filename)。//使用工具類拼接文件名filename = (filename)。//使用工具類獲得存放路徑String uploadPath = (filename)。String path = getServletContext().getRealPath(/bookimages)。path = path +uploadPath。File file = new File(path)。if(!()) ()。file = new File(path,filename)。// (path)。(image, bookimages+uploadPath+/+filename)。// ((image))。//兩流對(duì)接,上傳文件到磁盤InputStream in = ()。OutputStream out = new FileOutputStream(file)。byte[] buf = new byte[10240]。int len = 0。while((len=(buf))!=1){(buf, 0, len)。}//關(guān)閉流()。()。}}//封裝數(shù)據(jù)到 book 對(duì)象中Book book = new Book()。(book, map)。Category category = new Category()。((cid))。(category)。(0)。(().toString().replace(, ))。//將數(shù)據(jù)傳遞給業(yè)務(wù)層來(lái)處理BookService bs = new BookService()。(book)。//返回結(jié)果到 book/31 / 44// ().print(添加成功)。findAll(request,response)。} catch (FileUploadException e) {// TODO Autogenerated catch block()。} catch (IllegalAccessException e) {// TODO Autogenerated catch block()。} catch (InvocationTargetException e) {// TODO Autogenerated catch block()。} catch (SQLException e) {// TODO Autogenerated catch block()。}} 后臺(tái)查看編輯已有分類模塊通過點(diǎn)擊左側(cè)分類管理模塊的查看分類,可以瀏覽該購(gòu)物系統(tǒng)所有的分類,此時(shí)可以對(duì)分類進(jìn)行修改和刪除操作,查看分類模塊界面和部分核心代碼如下。查看分類模塊界面如圖 617 所示。圖 617 查看商品分類模塊 添加商品分類模塊通過添加商品分類模塊,可以增加系統(tǒng)中商品的種類,使商品的分類更加完善,可以輕松方便的實(shí)現(xiàn)商品分類的增加。添加分類模塊的界面和部分核心代碼如下。添加分類模塊的界面如圖 618 所示。32 / 44圖 618 添加分類模塊核心代碼如下。private void modifyCategory(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {//接收數(shù)據(jù)String cid = (cid)。String ame = (ame)。//封裝數(shù)據(jù)Category category = new Category()。(cid)。(ame)。//調(diào)用業(yè)務(wù)層,處理數(shù)據(jù)CategoryService cs = new CategoryService()。try {(category)。//顯示結(jié)果到 findAll(request, response)。} catch (SQLException e) {// TODO Autogenerated catch block()。}}private void addCategory(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {// TODO Autogenerated method stub//接收數(shù)據(jù)String ame = (ame)。//封裝數(shù)據(jù)33 / 44Category category = new Category()。(().toString().replace(, ))。(ame)。//調(diào)用業(yè)務(wù)層處理CategoryService cs = new CategoryService()。try {(category)。//顯示結(jié)果到 findAll(request, response)。} catch (SQLException e) {// TODO Autogenerated catch block()。}}private void removeCategory(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {//接收數(shù)據(jù)String cid = (cid)。//傳遞給業(yè)務(wù)層,并處理CategoryService cs = new CategoryService()。try {(cid)。//顯示結(jié)果到 jspfindAll(request,response)。} catch (SQLException e) {// TODO Autogenerated catch block()。}}private void findByCid(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {// 接收數(shù)據(jù)String cid = (cid)。//調(diào)用業(yè)務(wù)層處理數(shù)據(jù)CategoryService cs = new CategoryService()。try {Category category = (cid)。//返回結(jié)果給 jsp(category, category)。(/adminjsps/admin/category/).forward(request, response)。} catch (SQLException e) {// TODO Autogenerated catch block()。}}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doGet(request, response)。}} 后臺(tái)添加商品模塊34 / 44通過后臺(tái)的添加商品模塊,可以輕松的實(shí)現(xiàn)商品的添加,添加商品時(shí)應(yīng)該填寫商品的名稱,選擇商品的圖片,標(biāo)明商品的單價(jià),添加商品的一些備注信息,選擇商品的分類,最后點(diǎn)擊添加按鈕實(shí)現(xiàn)商品的添加,如此以后便可在前臺(tái)看到管理員添加的商品,并可在該分類中找到添加的商品。添加商品的界面如圖 619 所示。圖 619 添加商品模塊 后臺(tái)查看所有訂單模塊本模塊的作用是幫助管理員對(duì)購(gòu)物訂單進(jìn)行管理。為了提高效率,方便管理員的工作。堅(jiān)持界面設(shè)計(jì)的簡(jiǎn)明性,功能開發(fā)的合理性原則。用戶點(diǎn)擊訂單模塊,便可實(shí)現(xiàn)對(duì)所有訂單和未付款訂單、已付款訂單、未收貨訂單、以及已完成訂單的查看的操作。部分代碼和界面如下。訂單模塊的界面如圖 620 所示。35 / 44圖 620 查看訂單模塊核心代碼如下。private void findByState(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {// TODO Autogenerated method stub// //取出訪問標(biāo)記,設(shè)置為 false,說(shuō)明是從 findByState()頁(yè)面發(fā)起的// String findMethod = (String) ().getAttribute(findMethod)。// if(!findByState.equals(findMethod))findMethod = findByState。//接收數(shù)據(jù)int state = ((state))。int page = ((page))。//傳遞給業(yè)務(wù)層,并處理OrderService os = new OrderService()。try {Orders orders = (state,page)。//將結(jié)果顯示到 上(orders, orders)。(state, (state))。(/adminjsps/admin/order/).forward(request, response)。} catch (SQLException e) {// TODO Autogenerated catch block()。}}private void findAll(HttpServletRequest request,HttpServletResponse response) {// //取出訪問標(biāo)記,設(shè)置為 false,說(shuō)明是從 findAll()頁(yè)面發(fā)起的// String findMethod = (String) ().getAttribute(findMethod)。// if(!findAll.equals(findMethod))findMethod = findAll。//( ().getAttribute(findMethod))。int page = ((page))。//調(diào)用業(yè)務(wù)層處理,并返回結(jié)果OrderService os = new OrderService()。try {Orders orders = (page)。36 / 44//將返回的結(jié)果顯示到 中(orders, orders)。(/adminjsps/admin/order/).forward(request, response)。} catch (Exception e) {// TODO Autogenerated catch block()。}}……private void findByUid(HttpServletRequest request,HttpServletResponse response) {try {User existUser = (User)().getAttribute(existUser)。String uid = ()。// 調(diào)用業(yè)務(wù)層來(lái)處理數(shù)據(jù)OrderService os = new OrderService()。ListOrder list = (uid)。(list, list)。(/jsps/order/).forward(request, response)。} catch (Exception e) {// TODO Au
點(diǎn)擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1