關(guān)于網(wǎng)上購物的論文.doc_第1頁
關(guān)于網(wǎng)上購物的論文.doc_第2頁
關(guān)于網(wǎng)上購物的論文.doc_第3頁
關(guān)于網(wǎng)上購物的論文.doc_第4頁
關(guān)于網(wǎng)上購物的論文.doc_第5頁
已閱讀5頁,還剩33頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

論文題目論文題目 手機導(dǎo)購網(wǎng)的設(shè)計與實現(xiàn)手機導(dǎo)購網(wǎng)的設(shè)計與實現(xiàn) 姓姓 名名 xx 學(xué)學(xué) 院院 東北大學(xué)東軟信息學(xué)院東北大學(xué)東軟信息學(xué)院 專專 業(yè)業(yè) 計算機科學(xué)與技術(shù)計算機科學(xué)與技術(shù) 指導(dǎo)教師指導(dǎo)教師 xxx 講師講師 備備 注注 2010 年年 3 月月 9 日日 手機導(dǎo)購網(wǎng)的設(shè)計與實現(xiàn) 作者姓名: xx 指導(dǎo)教師: xxx 講師 單位名稱: 計算機科學(xué)與技術(shù)系 專業(yè)名稱: 計算機科學(xué)與技術(shù) xx 大學(xué) xx 信息學(xué)院 2010 年 3 月 design and implementation of mobile shopping guide network by wang zhen supervisor:lecturer zhou hai bo northeastern university neusoft institute of information june 2010 - 畢業(yè)設(shè)計(論文)任務(wù)書畢業(yè)設(shè)計(論文)任務(wù)書 畢業(yè)設(shè)計(論文)題目:畢業(yè)設(shè)計(論文)題目: 手機導(dǎo)購網(wǎng)的設(shè)計與實現(xiàn) 設(shè)計(論文)的基本內(nèi)容:設(shè)計(論文)的基本內(nèi)容: 2002 年我國網(wǎng)絡(luò)拍賣市場有 9.4 億元的規(guī)模,2003 年有 19.2 億元的 規(guī)模,預(yù)計 2004 年我國網(wǎng)絡(luò)拍賣市場幾近達到 33.7 億元。但是我國互 聯(lián)網(wǎng)絡(luò)信息中心(cnnic)去年發(fā)布的第二次中國互聯(lián)網(wǎng)絡(luò)熱點調(diào)查報 告卻顯示:全國有 60.6%的網(wǎng)民半年內(nèi)瀏覽過購物網(wǎng)站,但掏錢買東 西的只有 17.9%。這說明目前我國的電子商務(wù)行業(yè)發(fā)展遠未挖掘出其本 身的巨大潛力。相對來說,手機的革新也從 2g 時代奔向了 3g 時代,這 樣的變化也使得大眾對手機的需求也不斷的增加。因此我國電子商務(wù)的 發(fā)展態(tài)勢很好,電子商務(wù)的發(fā)展?jié)摿艽?。手機導(dǎo)購網(wǎng)的出現(xiàn)也就順利 成章. 該網(wǎng)站的開發(fā)主要分別了后臺系統(tǒng)管理和前臺的設(shè)計兩個部分,后 臺基于 webwork 框架,數(shù)據(jù)層使用 spring 技術(shù)實現(xiàn),前臺的數(shù)據(jù)顯示 使用 freemarker。頁面的實現(xiàn)分為兩個小部分,即網(wǎng)頁的結(jié)構(gòu)層和表現(xiàn) 層。 畢業(yè)設(shè)計(論文)專題部分:畢業(yè)設(shè)計(論文)專題部分: 題目:題目: 設(shè)計或論文專題的基本內(nèi)容:設(shè)計或論文專題的基本內(nèi)容: 學(xué)生接受畢業(yè)設(shè)計(論文)題目日期學(xué)生接受畢業(yè)設(shè)計(論文)題目日期 - 第第 1 周周 指導(dǎo)教師簽字:指導(dǎo)教師簽字: 2010 年年 月月 日日 手機導(dǎo)購網(wǎng)設(shè)計與實現(xiàn) 摘 要 當今社會中,計算機的使用已經(jīng)深入到日常工作和生活的方方面面。windows 系 統(tǒng)的推出使電腦從高雅的學(xué)術(shù)殿堂走入了尋常百姓家,各行各業(yè)的人們無須經(jīng)過特別 的訓(xùn)練就能夠使用電腦完成許許多多復(fù)雜的工作。對于手機導(dǎo)購是一個手機經(jīng)營單位 不可缺少的部分,它的內(nèi)容對經(jīng)營單位的管理者來說至關(guān)重要,所以手機導(dǎo)購系統(tǒng)應(yīng)該 能夠為用戶提供充足的信息和快捷的查詢手段。但一直以來人們使用傳統(tǒng)人工的方式 管理手機信息,這種管理方式存在著許多缺點,如:效率低、保密性差,另外時間一 長,將產(chǎn)生大量的文件和數(shù)據(jù),這對于查找、更新和維護都帶來了不少的困難。而使 用計算機對手機進行管理,具有手工管理所無法比擬的優(yōu)點,例如:檢索迅速、查找 方便、存儲量大、保密性好等。這些優(yōu)點能夠極大地提高手機信息的效率。 該網(wǎng)站的實現(xiàn)主要分為前臺表現(xiàn)頁面和后臺的系統(tǒng)管理。整個網(wǎng)站采用了 neo 開 發(fā)框架,neo 框架將 webwork、spring、jdbctemplate 和 freemarker 等整合在一起, 加上了一些工具類。后臺部分 neo 框架使用了 spring 和 webwork 技術(shù),數(shù)據(jù)庫操作 通過 jdbctemplete 對 jdbc 的封裝從而簡單高效地使用語句來訪問數(shù)據(jù)庫。頁面的表 現(xiàn)部分使用 freemarker 來動態(tài)顯示數(shù)據(jù)。網(wǎng)站上的頁面部分按照 web 標準開發(fā)規(guī)范來 進行設(shè)計,達到結(jié)構(gòu)和表現(xiàn)的分離,使網(wǎng)頁的開發(fā)更為合理,維護更加方便。頁面的 效果展現(xiàn)采用 ie6.0 瀏覽器為主,同時也兼顧到其他未使用 ie 瀏覽器的用戶,在 firefox 也進行調(diào)試,從而有更好的兼容性。 本論文一共分 6 章,第 1 章緒論,介紹了論文主要研究通過網(wǎng)絡(luò)為人們提供手機 信息并對國內(nèi)外現(xiàn)狀進行對比分析,第 2 章關(guān)鍵技術(shù)介紹,介紹了網(wǎng)站需要的重要技 術(shù)支持,第 3 章需求分析,對網(wǎng)站需要的各個要素進行全面詳細的分析,第 4 章網(wǎng)站 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 摘要 - 設(shè)計,其中細致地描述了網(wǎng)站各個元素的設(shè)計過程。第 5 章網(wǎng)站實現(xiàn)與測試,敘述了 網(wǎng)站實現(xiàn)的整個過程和測試。第 6 章結(jié)論,總結(jié)了本項目的特點,創(chuàng)新及展望了未來 的發(fā)展前景。 關(guān)鍵詞關(guān)鍵詞:手機信息管理,neo,b/s,兼容性 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) abstract - design and implementation of mobile shopping guide network abstract todays society, the use of computers has gone deep into every aspect of daily work and life.windows of the system of the computer from the elegant halls of academe and into the homes of ordinary people, people of all walks of life without going through special training to be able to use the computer to complete many complex task. shopping guide for a mobile phone an indispensable part of the business units, its contents on the business unit managers is essential, so phone shopping guide system should be able to provide users with adequate information and fast search tool. but it has been the use of traditional artificial management of mobile information, such management, there are many drawbacks, such as: low efficiency, poor security, another over time, will produce a large number of documents and data, for search, update and maintain have brought a lot of difficulties. the use of computers to cell phones to manage, management manual incomparable advantages, such as: fast searches, find convenient, large memory capacity, security and good. these advantages can greatly improve the efficiency of cell phone information. implementation of the site is divided into front and back pages of system performance management. entire site development framework with a neo, neo framework will webwork, spring, jdbctemplate and freemarker, etc. together, plus a number of tools. back part of the neo framework uses the spring and webwork, database operations on the jdbc package through jdbctemplete so simple and efficient use of the statement to access the database. the performance of part of the page to dynamically display data using freemarker. some pages on the site according to web standards development specifications to design, structure and performance to achieve the separation, the development of web pages is more reasonable and easier to maintain. results page showing the main use of ie6.0 browser, but also to take into account other non-ie browsers use, also for debugging in firefox, which has better compatibility. this thesis was divided into six chapters, introduction chapter 1 introduces the thesis of a network for people at home and abroad to provide mobile information and comparative 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) abstract - analysis of the current situation, chapter 2 introduces the key technologies, introduces the essential skills needed to support site, first needs analysis in chapter 3, the various elements of the site requires a full detailed analysis in chapter 4 web site design, including detailed description of the various elements of the website design process. chapter 5 implementation and test site, described the site and test the whole process of implementation. chapter 6 conclusion, summarizes the characteristics of this project, innovative and looks to the future development prospects. key words: mobile information management ,neo,b/s,compatibility 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 目錄 - 1 - 目 錄 畢業(yè)設(shè)計(論文)任務(wù)書 .i 摘 要ii abstractiii 第 1 章 緒 論.1 1.1 論文研究主要內(nèi)容 1 1.2 方案論證分析.1 第 2 章 關(guān)鍵技術(shù)介紹.3 2.1 關(guān)鍵性開發(fā)技術(shù)的介紹 3 2.1.1 webwork3 2.1.2 spring3 2.1.3 freemarker4 2.1.4 div+css5 第 3 章 系統(tǒng)分析.6 3.1 構(gòu)架概述 6 3.1.1 模塊需求描述6 3.2 系統(tǒng)開發(fā)環(huán)境 7 3.3 系統(tǒng)任務(wù)的研究方法及可行性分析 7 3.3.1 研究方法.7 3.3.2 可行性分析.8 第 4 章 系統(tǒng)設(shè)計.9 4.1 設(shè)計指導(dǎo)思想和原則 9 4.1.1 軟件指導(dǎo)思想9 4.1.2 軟件設(shè)計原則9 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 目錄 - 2 - 4.2 構(gòu)架概述 9 4.3 功能結(jié)構(gòu)設(shè)計.10 4.4 數(shù)據(jù)庫設(shè)計.10 第 5 章 系統(tǒng)實現(xiàn).11 5.1 系統(tǒng)主界面.11 5.1.1 系統(tǒng)主界面概述.11 5.1.2 功能實現(xiàn)代碼.11 5.1.311 5.2手機新聞.12 5.2.1 手機新聞專區(qū)概述.12 5.2.2 流程圖.12 5.2.3 功能實現(xiàn)代碼.13 5.2.4 界面圖.13 5.3 手機專區(qū).13 5.3.1 手機專區(qū)概述.13 5.3.2 功能代碼實現(xiàn).13 5.3.3 界面圖.14 5.4 生成訂單.15 5.4.1 生成訂單概述.15 5.4.2 功能代碼實現(xiàn).15 5.4.3 界面圖.16 5.5 網(wǎng)站管理員-管理員帳號管理.16 5.5.1 管理員帳號管理概述.16 5.5.2 功能代碼實現(xiàn).16 5.5.3 界面圖.17 5.6 網(wǎng)站管理員-手機新聞管理.17 5.6.1 手機新聞管理概述.17 5.6.2 功能代碼實現(xiàn).17 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 目錄 - 3 - 5.6.3 界面圖.18 5.7 網(wǎng)站管理員-手機管理.18 5.7.1 手機管理概述.18 5.7.2 功能代碼實現(xiàn).19 5.7.3 界面圖.20 5.8 網(wǎng)站管理員-訂單管理.21 5.8.1 訂單管理概述.21 5.8.2 功能代碼實現(xiàn).21 5.8.3 界面圖.21 第 6 章 結(jié) 論.23 參考文獻.24 致 謝.25 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 1 章 緒 論 -1- 第第 1 章章 緒緒 論論 1.1 論文研究主要內(nèi)容論文研究主要內(nèi)容 網(wǎng)站開發(fā),是基于 b/s 的網(wǎng)頁開發(fā),一般來說都具有互動性,現(xiàn)今的動態(tài)網(wǎng)頁與 網(wǎng)頁上的動畫、滾動字幕并無直接關(guān)系,采用動態(tài)網(wǎng)站技術(shù)生成的網(wǎng)頁都稱為動態(tài)網(wǎng) 頁。本文論述主題是手機網(wǎng)站的開發(fā),同樣基于動態(tài)網(wǎng)頁開發(fā)技術(shù),經(jīng)過對需求的分 析,數(shù)據(jù)庫設(shè)計和詳細模塊設(shè)計以及實現(xiàn)過程,描述該網(wǎng)站的功能和作用。結(jié)合計算 機網(wǎng)絡(luò)應(yīng)用技術(shù)的特點,該項目采用現(xiàn)在流行的 b/s 架構(gòu),框架使用 mvc 模式。并結(jié) 合 neo,freemarker,spring 等相關(guān)技術(shù)來設(shè)計頁面前臺和控制層,用 oracle9i 實現(xiàn)數(shù)據(jù) 庫部分。 1.2 背景和研究意義背景和研究意義 2002 年我國網(wǎng)絡(luò)拍賣市場有 9.4 億元的規(guī)模,2003 年有 19.2 億元的規(guī)模,預(yù)計 2004 年我國網(wǎng)絡(luò)拍賣市場幾近達到 33.7 億元。但是我國互聯(lián)網(wǎng)絡(luò)信息中心(cnnic)去 年發(fā)布的第二次中國互聯(lián)網(wǎng)絡(luò)熱點調(diào)查報告卻顯示:全國有 60.6%的網(wǎng)民半年內(nèi) 瀏覽過購物網(wǎng)站,但掏錢買東西的只有 17.9%。這說明目前我國的電子商務(wù)行業(yè)發(fā)展 遠未挖掘出其本身的巨大潛力。相對來說,手機的革新也從 2g 時代奔向了 3g 時代, 這樣的變化也使得大眾對手機的需求也不斷的增加。因此我國電子商務(wù)的發(fā)展態(tài)勢很 好,電子商務(wù)的發(fā)展?jié)摿艽?。手機導(dǎo)購網(wǎng)的出現(xiàn)也就順利成章.。 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 2 章 關(guān)鍵技術(shù)介 紹 -2- 第第 2 章章 關(guān)鍵技術(shù)介紹關(guān)鍵技術(shù)介紹 該網(wǎng)站的開發(fā)主要分別了后臺系統(tǒng)管理和前臺的設(shè)計兩個部分,后臺基于 webwork 框架,數(shù)據(jù)層使用 spring 技術(shù)實現(xiàn),前臺的數(shù)據(jù)顯示使用 freemarker。頁面 的實現(xiàn)分為兩個小部分,即網(wǎng)頁的結(jié)構(gòu)層和表現(xiàn)層。 2.1 關(guān)鍵性開發(fā)技術(shù)的介紹關(guān)鍵性開發(fā)技術(shù)的介紹 2.1.1 webwork webwork 是建立在稱為 xwork 的 command 模式框架之上的強大的基于 web 的 mvc 框架。 webwork2 的特性包括: 靈活的 validation 框架:允許你在 xml 文件中定義驗證內(nèi)容,在運行時通過 interceptor 自動應(yīng)用,因此完全脫離 action 類。新版支持客戶端驗證。 type conversion:允許你在類之間很容易轉(zhuǎn)換對象。 ognl(object graphical navigation language)表達式語言:允許動態(tài)對象圖表 遍歷和方法執(zhí)行,使用 valuestack 透明訪問多 beans 的屬性。ww2 也具有使用 jstl 的能力。 ioc(inversion of control)容器:管理組件的生命周期,使客戶獲得組件實例不需 要創(chuàng)建注冊類(與容器環(huán)境無關(guān))。 freemarker templates:使 ui 組件可重用,從而允許開發(fā)者容易定制web 頁 面的 look private paginglist shoujis; public paginglist getarticles() return articles; public void setarticles(paginglist articles) this.articles = articles; public paginglist getshoujis() return shoujis; public void setshoujis(paginglist shoujis) this.shoujis = shoujis; public string index() /獲取新聞列表 articles=getservmgr().getarticleservice().getallarticle(); /獲取手機列表 shoujis=getservmgr().getshoujiservice().getallshouji(); return “index“; 5.1.3 主界面如圖 5.1 所示 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -11- 5.2 手機新聞手機新聞 5.2.1 手機新聞專區(qū)概述手機新聞專區(qū)概述 手機的最新動態(tài)是網(wǎng)站吸引用戶的一大亮點,因此該網(wǎng)站的手機新聞專區(qū)通過即 時更新從而不斷發(fā)表大量文章。獲取文章方式主要通過后臺查詢數(shù)據(jù)庫后得到文章信 息,然后將信息動態(tài)顯示在頁面中。在前臺詳細瀏覽新聞時可進行評論??赡涿l(fā)表 評論。 5.2.2 流程圖流程圖 手機新聞區(qū)流程圖如圖 5.2 所示。 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -12- 圖5.2 手機新聞區(qū)流程圖 5.2.3 功能實現(xiàn)代碼功能實現(xiàn)代碼 /文章列表 public string list() throws exception articles = getservmgr().getarticleservice().getallarticle(); return “l(fā)ist“; /顯示文章詳情 public string showarticle() throws exception artreplys=getservmgr().getarticleservice().getartreplybyarticleid(articleid); article=getservmgr().getarticleservice().getarticlebyarticleid(articleid); return “show“; /添加留言 public string addartreply() throws exception try getservmgr().getarticleservice().addartreply(replyer, replycontent, articleid); addmessage(“添加成功“); addredirurl(“返回“, “article!list.action“); catch (exception e) setresult(error); addmessage(“添加失敗“); addredirurl(“返回“, “article!list.action“); return execute_result; 5.2.4 界面圖界面圖 其界面圖如圖 5.3 所示 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -13- 圖 5.3 5.3 手機專區(qū)手機專區(qū) 5.3.1 手機專區(qū)概述手機專區(qū)概述 用戶若想在網(wǎng)站查詢某款手機的具體情況,可進入網(wǎng)站的手機專區(qū)。用戶可直 接查看最新添加的手機型號,也可按一定條件搜索自己想要了解的手機型號 5.3.2 功能代碼實現(xiàn)功能代碼實現(xiàn) /手機列表 public string list() throws exception shoujis = getservmgr().getshoujiservice().getallshouji(); return “l(fā)ist“; /顯示手機 public string showshouji() throws exception shouji = getservmgr().getshoujiservice().getshoujibyid(shoujiid); sjreplys = getservmgr().getshoujiservice().getshoujireplybyshoujiid(shoujiid); return “show“; /添加一條回復(fù) public string addsjtreply() throws exception try getservmgr().getshoujiservice().addsjreply(replyer, replycontent, shoujiid); addmessage(“回復(fù)成功“); addredirurl(“返回“, “shouji!list.action“); catch (exception e) setresult(error); addmessage(“回復(fù)失敗“); addredirurl(“返回“, “shouji!list.action“); return execute_result; /顯示手機 public string searchpage() throws exception types = getservmgr().getshoujiservice().getalltype(); return “searchpage“; /搜索手機 public string searchshouji() throws exception string min = “0“; string max = “0“; if (price.equals(“0 500“) min = “0“; 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -14- max = “500“; if (price.equals(“500 1000“) min = “500“; max = “1000“; if (price.equals(“1000 1500“) min = “1000“; max = “1500“; if (price.equals(“2000 2500“) min = “2000“; max = “2500“; if (price.equals(“2500 50000“) min = “2500“; max = “50000“; if (!typeid.equals(“) if (typeid.equals(“) if (!typeid.equals(“) if (typeid.equals(“) return “searchr“; 5.3.3 界面圖界面圖 其界面圖如圖 5.4 所示 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -15- 圖 5.4 5.4 生成訂單生成訂單 5.4.1 生成訂單概述生成訂單概述 用戶若相中某款手機,可以申請訂單,在訂單申請頁填入相關(guān)信息:真實姓名,收貨地址,電話, 發(fā)貨方式,然后本系統(tǒng)可以模擬支付流程。 5.4.2 功能代碼實現(xiàn)功能代碼實現(xiàn) /返回創(chuàng)建訂單頁 public string createorderpage() return “createorderpage“; /創(chuàng)建訂單 public string createorder() dateformat df1 = new simpledateformat(“yyyymmddhhmmss“); ordernumber = df1.format(new date(); getservmgr().getshoujiservice().addorder(ordernumber, reallyname, address, tel, post, shoujiid); 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -16- addmessage(“生成訂單成功“); addredirurl(“返回“, “shouji!list.action“); return execute_result; 5.4.3 界面圖界面圖 其界面圖如圖 5.5 所示 圖 5.5 5.5 網(wǎng)站管理員網(wǎng)站管理員-管理員帳號管理管理員帳號管理 5.5.1 管理員帳號管理概述管理員帳號管理概述 本系統(tǒng)默認的管理員帳號為 admin,此帳號不可以被刪除,可以修改密碼,管理員可以在此之 外再創(chuàng)建新的管理員帳號,新建的管理員帳號可以刪除,修改密碼。 5.5.2 功能代碼實現(xiàn)功能代碼實現(xiàn) /添加管理員帳號 public string adduser() throws exception try getservmgr().getuserservice().adduser(username, password); addmessage(“添加成功“); addredirurl(“返回“, “user!list.action“); catch (exception e) setresult(error); addmessage(“添加失敗“); addredirurl(“返回“, “user!list.action“); return execute_result; /刪除管理員帳號 public string deluser() throws exception try getservmgr().getuserservice().deluserbyid(userid); addmessage(“刪除成功“); addredirurl(“返回“, “user!list.action“); catch (exception e) setresult(error); addmessage(“刪除失敗“); addredirurl(“返回“, “user!list.action“); return execute_result; 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -17- /更改管理員密碼 public string updateuser() throws exception try map dbuser = getservmgr().getuserservice().getuserbyusername(username); system.out.println(password); system.out.println(dbuser); if (dbuser != null addmessage(“更改成功“); addredirurl(“返回“, “user!list.action“); else setresult(error); addmessage(“原始密碼錯誤“); addredirurl(“返回“, “user!list.action“); catch (exception e) setresult(error); addmessage(“更改失敗“); addredirurl(“返回“, “user!list.action“); return execute_result; 5.5.3 界面圖界面圖 其界面圖如圖 5.6 所示 圖 5.6 5.6 網(wǎng)站管理員網(wǎng)站管理員-手機新聞管理手機新聞管理 5.6.1 手機新聞管理概述手機新聞管理概述 管理員可以添加新的文章作為手機最新動態(tài),新聞等。對于已經(jīng)添加的新聞,管理員可以刪除或修 改該文章。如果管理員發(fā)現(xiàn)某些不和諧的留言,可以將其刪除。 5.6.2 功能代碼實現(xiàn)功能代碼實現(xiàn) /文章列表 public string list() throws exception articles = getservmgr().getarticleservice().getallarticle(); return “l(fā)ist“; /添加文章 public string addarticle() throws exception try getservmgr().getarticleservice().addarticle(articletitle, articlecontent); addmessage(“添加成功“); addredirurl(“返回“, “article!list.action“); catch (exception e) 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -18- setresult(error); addmessage(“添加失敗“); addredirurl(“返回“, “article!list.action“); return execute_result; /顯示文章詳情 public string showarticle() throws exception artreplys=getservmgr().getarticleservice().getartreplybyarticleid(articleid); article=getservmgr().getarticleservice().getarticlebyarticleid(articleid); return “show“; /刪除文章留言 public string delartreply() throws exception try getservmgr().getarticleservice().delreplybyid(replyid); addmessage(“刪除成功“); addredirurl(“返回“, “article!list.action“); catch (exception e) setresult(error); addmessage(“刪除失敗“); addredirurl(“返回“, “article!list.action“); return execute_result; /更新文章 public string updatearticle() throws exception try getservmgr().getarticleservice().updatearticlebyid(articletitle, articlecontent, articleid); addmessage(“更改成功“); addredirurl(“返回“, “article!showarticle.action?articleid=“+articleid); catch (exception e) setresult(error); addmessage(“更改失敗“); addredirurl(“返回“, “article!showarticle.action?articleid=“+articleid); return execute_result; /刪除文章 public string delarticle() throws exception try getservmgr().getarticleservice().delarticlebyid(articleid); addmessage(“刪除成功“); addredirurl(“返回“, “article!list.action“); catch (exception e) setresult(error); addmessage(“刪除失敗,請確保此文章沒有留言回復(fù)!“); addredirurl(“返回“, “article!list.action“); return execute_result; 5.6.3 界面圖界面圖 其界面圖如圖 5.7 所示 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -19- 圖 5.7 5.7 網(wǎng)站管理員網(wǎng)站管理員-手機管理手機管理 5.7.1 手機管理概述手機管理概述 管理員可以添加新的手機型號。對于已經(jīng)添加的手機型號,管理員可以刪除或修改該手機。如 果管理員發(fā)現(xiàn)某些不和諧的留言,可以將其刪除。管理員也可以對品牌進行增刪改操作,注意,已 經(jīng)有型號的品牌不能被刪除。 5.7.2 功能代碼實現(xiàn)功能代碼實現(xiàn) /手機列表 public string list() throws exception shoujis = getservmgr().getshoujiservice().getallshouji(); return “l(fā)ist“; /添加手機頁面 public string addpage() throws exception types = getservmgr().getshoujiservice().getalltype(); return “addpage“; /添加類型頁面 public string addtypepage() throws exception types = getservmgr().getshoujiservice().getalltype(); return “addtypepage“; /添加類型 public string addtype() throws exception try getservmgr().getshoujiservice().addtype(typename); addmessage(“添加成功“); addredirurl(“返回“, “shouji!addtypepage.action“); catch (exception e) setresult(error); addmessage(“添加失敗“); addredirurl(“返回“, “shouji!addtypepage.action“); return execute_result; /刪除類型 public string deltype() throws exception try getservmgr().getshoujiservice().deltypebyid(id); 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -20- addmessage(“刪除成功“); addredirurl(“返回“, “shouji!addtypepage.action“); catch (exception e) setresult(error); addmessage(“刪除失敗,不能刪除已有型號的品牌“); addredirurl(“返回“, “shouji!addtypepage.action“); return execute_result; /添加手機 public string addshouji() throws exception try getservmgr().getshoujiservice().addshouji(typeid, name, price, time, base); addmessage(“添加成功“); addredirurl(“返回“, “shouji!list.action“); catch (exception e) setresult(error); addmessage(“添加失敗“); addredirurl(“返回“, “shouji!list.action“); return execute_result; /顯示手機 public string showshouji() throws exception shouji = getservmgr().getshoujiservice().getshoujibyid(shoujiid); sjreplys = getservmgr().getshoujiservice().getshoujireplybyshoujiid(shoujiid); return “show“; /刪除手機留言 public string delsjreply() throws exception try getservmgr().getshoujiservice().delreplybyid(sjreplyid); addmessage(“刪除成功“); addredirurl(“返回“, “shouji!showshouji.action?shoujiid=“ + shoujiid); catch (exception e) setresult(error); addmessage(“刪除失敗“); addredirurl(“返回“, “shouji!showshouji.action?shoujiid=“ + shoujiid); return execute_result; /更改手機信息 public string updateshouji() throws exception try getservmgr().getshoujiservice().updateshojibyid(name, price, time, basic, shoujiid); addmessage(“更改成功“); addredirurl(“返回“, “shouji!showshouji.action?shoujiid=“ + shoujiid); catch (exception e) setresult(error); addmessage(“更改失敗“); addredirurl(“返回“, “shouji!showshouji.action?shoujiid=“ + shoujiid); return execute_result; /刪除手機 public string delshouji() try getservmgr().getshoujiservice().delshoujibyid(shoujiid); addmessage(“刪除成功“); addredirurl(“返回“, “shouji!list.action“); catch (exception e) setresult(error); addmessage(“刪除失敗“); addredirurl(“返回“, “shouji!list.action“); 東北大學(xué)東軟信息學(xué)院畢業(yè)設(shè)計(論文) 第 5 章 系統(tǒng)實 現(xiàn) -21- return execute_result; 5.7.3 界面圖界面圖 其界面圖如圖 5.8 所示 圖 5.8 5.8 網(wǎng)站管理員網(wǎng)站管理員-訂單管理訂單管理 5.8.1 訂單管理概述訂單管理概述 5.8.2 功能代碼實現(xiàn)功能代碼實現(xiàn) /訂單列表 public string list() orders = getservmgr().getorderservice().getallorder(); return “l(fā)ist“; /通過訂單序號獲取訂單 public string showorderbynumber() order = getservmgr().getorderservice().getorderbynumber(ordernumber); return “showorder“; /更新訂單 public string updateorder() try getservmgr().getorderservice().updateordersign(ordernumber); addmessage(“發(fā)貨成功“); addredirurl(“返回“, “order!list.action“); catch (exception e)

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論