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

正文內(nèi)容

基于bs結(jié)構(gòu)的網(wǎng)上商城系統(tǒng)的設(shè)計與實現(xiàn)-在線瀏覽

2025-07-10 18:22本頁面
  

【正文】 圖 31: 網(wǎng)站購物與交易處理流程圖 系統(tǒng)的模塊設(shè)計 經(jīng)過對 網(wǎng)上商城 網(wǎng)站功能與網(wǎng)站構(gòu)建目標(biāo)的分析, 網(wǎng)上商城 網(wǎng)站功能由 三 大部份組成:會員登記、 商品瀏覽 、訂購服務(wù)。 圖 32: 網(wǎng)上商城網(wǎng)站功能模塊圖 系統(tǒng) 的結(jié)構(gòu)設(shè)計 此網(wǎng)上商城系統(tǒng)采用 MVC框架, 圖 33基本勾勒出了一個基于 Struts的應(yīng)用程序的結(jié)構(gòu),從左到右,分別是其表示層( view)、控制層 (controller)、和模型層 (Model)。來自客戶的所有需要通過框架的請求 統(tǒng)一由叫ActionServlet的 servlet接收( ActionServlet Struts已經(jīng)為我們寫好了,只要您 7 應(yīng)用沒有什么特別的要求,它基本上都能滿足您的要求),根據(jù)接收的請求參數(shù)和Struts配置 ()中 ActionMapping,將請求送給合適的 Action去處理,解決由誰做的問題, 它們共同構(gòu)成 Struts的控制器。 圖 33: 網(wǎng)上商城網(wǎng)站系統(tǒng)結(jié)構(gòu)圖 數(shù)據(jù)庫的設(shè)計 網(wǎng)上商城 網(wǎng)站系統(tǒng)為了實現(xiàn)網(wǎng)站功能,設(shè)計了數(shù)據(jù)庫( store) , 各表結(jié)構(gòu)如下: 會員表 : 包括系統(tǒng)編號, 用戶名 ,登錄密碼,真實姓名,郵箱 5 個字段。 圖 34: 會員表結(jié)構(gòu)圖 8 訂單表 : 包括系統(tǒng)編號,訂單號,商品編號,商品數(shù)量 4 個字段。 圖 35: 訂單表結(jié)構(gòu)圖 訂單明細(xì)表 : 包括訂單號, 會員 用戶名 , 收貨人姓名,收貨人地點,收貨人郵編,收貨人電話,訂單日期,訂單狀態(tài) 8 個字段 。 圖 36: 訂單明細(xì)表結(jié)構(gòu)圖 9 商 品表: 包括商品編號,商品名稱,商品數(shù)量,商品信息,商品價格,商品小圖片,商品大圖片 7 個字段 。 圖 37: 商品表結(jié)構(gòu)圖 本章小結(jié) 本章首先對 系統(tǒng)流程 進(jìn)行了簡要分析, 做出系統(tǒng)的流程圖;接下來又功能劃分結(jié)構(gòu),做出了系統(tǒng)的 結(jié)構(gòu)圖;最后分析了整個項目的數(shù)據(jù)結(jié)構(gòu)和邏輯,搭建好系統(tǒng)所需的的數(shù)據(jù)庫 ,為以后代碼的編寫提供很好的準(zhǔn)備。本章就依據(jù)以 上知識和系統(tǒng) 流程圖 、模塊圖 ,介紹 系統(tǒng) 的主要實現(xiàn)步驟。其代碼文件構(gòu)成結(jié)構(gòu)如圖41 所示 。 系統(tǒng) 主界面 主頁面主要是由頂部欄 ,功能欄 ,搜索欄 ,主 10 圖 41: 代碼文件構(gòu)成結(jié)構(gòu) 圖 題部分 ,底部欄 個頁面構(gòu)成。 html head title網(wǎng)上商城-網(wǎng)您想要的東西! /title link href=images/ type=text/css rel=stylesheet /head body topmargin=0 marginheight=0 div id=bodywith jsp:include page= / jsp:include page= / jsp:include page= / table width=100% height=1 tr td/td /tr /table table width=100% cellspacing=0 cellpadding=0 tr td id=zhong jsp:include page= / /td /tr /table jsp:include page= / 11 /div /body /html 圖 42: 系統(tǒng) 主界面 注冊 部分 的 主要實現(xiàn) 只有注冊后并且登錄的用戶才可以進(jìn)行購買,否則只能進(jìn)行商品的瀏覽的搜索。根據(jù) action=/register,找到對應(yīng)的 RegisterAction,并有它讀取并處理 RegisterForm中的數(shù)據(jù),并根據(jù)情況進(jìn)行頁面的跳轉(zhuǎn)。 登陸頁面如圖 44 所示。 String result = null。 ResultSet rs = null。 + username + 39。 st = ()。 if (()) { if (((1))) { result = success。 15 } } else { result = nouser。 } return result。 登錄成功后,會員的用戶字會出現(xiàn)在功能欄里。 根據(jù) action=/ updateInfo ,找到對應(yīng)的 UpdateInfoAction,并有它讀取并處理 updateInfoForm中的數(shù)據(jù),并根據(jù)情況進(jìn)行頁面的跳轉(zhuǎn) ,代碼部分省略 。點擊搜索商品即可查詢到相關(guān)的商品信息,如圖 47 所示。 import 。 public class Search { private Connection conn。 } public Collection getSearch(String search_name, String search_type) { ArrayList list = new ArrayList()。 Statement st = null。 (search_name= + search_name)。 String sql = select items_id,items_name,items_quantity,items_info,items_price,items_img_small_url,items_img_large_url from items where items_quantity!=0 and +search_type+ like 39。 order by items_id desc。 try { st = (, )。 while (()) { int items_id = (1)。 int items_quantity = (3)。 18 double items_price = (((5)))。 String items_img_large_url = (7)。 (items)。 } (sql)。 } } 商品展示 部分的 主要 實現(xiàn) 在點擊商品名稱或商品圖片時,會彈出商品的詳細(xì)信息,如 圖 48 所示 : 圖 48: 商品展示頁面 19 商品的詳細(xì)信息的顯示代碼如下: table border=0 width=100% cellspacing=0 cellpadding=0 tr td width=200 valign=top align=center html:img page=/images/${ } height=200 width=150 border=0 / /td td table border=1 width=100% cellspacing=0 cellpadding=0 tr td colspan=3 height=30 ${ } /td /tr tr height=20 td 價格: font color=red${ }元 /font /td td width=70 align=center html:link action=/ShoppingBag?Action=Buyamp。classId=${} html:img src=images/ border=0 / /html:link /td /tr tr height=200 td colspan=3 ${ } /td 20 /tr /table /td /tr /table 購物車查詢部分的 詳細(xì) 實現(xiàn) 在用戶選中某件商品后,可以點 “ 加入購物車 ” ,以臨時 保存預(yù)購的商品。 對于購物車?yán)锏纳唐?,會自動計算出總價,同時 , 用戶對不滿意的商品可以進(jìn)行刪除操作。 圖 49: 購物車頁面 客戶層代碼 如下: table border=0 cellspacing=0 cellpadding=0 width=100% id=zhong tr border=1 td align=center font size=6 我的購物車 /font /td /tr tr valign=top td html:form action=/shopping 21 onsubmit=return validateShoppingForm(this) styleId=form11 table width=100% border=1 cellspacing=0 cellpadding=0 tr td width=20% 操作 /td td width=20% 商品名稱 /td td width=20% 數(shù)量 /td td width=20% 單價 /td td width=20% 金額 /td /tr logic:present name=list logic:iterate id=mylist name=list tr td width=20% html:multibox property=delitems value=${} styleId=delitemsname / /td td width=20% bean:write name=mylist property=items_name / /td td width=20% bean:write name=mylist property=items_buy_quantity / /td td width=20% bean:write name=mylist property=items_price / 元 22 /td td width=20% bean:write name=mylist property=items_allprice / 元 /td /tr /logic:iterate /logic:present logic:notPresent name=list tr td colspan=5 暫存架為空 ! /td /tr /logic:notPresent tr td width=60% colspan=3 a href=javascript:selectAll() html:img src=images/ border=0/ /a /td td width=20% logic:present name=list html:submit property=action bean
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1