买易通网站设计详细说明.docx

上传人:牧羊曲112 文档编号:1776210 上传时间:2022-12-18 格式:DOCX 页数:59 大小:282.38KB
返回 下载 相关 举报
买易通网站设计详细说明.docx_第1页
第1页 / 共59页
买易通网站设计详细说明.docx_第2页
第2页 / 共59页
买易通网站设计详细说明.docx_第3页
第3页 / 共59页
买易通网站设计详细说明.docx_第4页
第4页 / 共59页
买易通网站设计详细说明.docx_第5页
第5页 / 共59页
点击查看更多>>
资源描述

《买易通网站设计详细说明.docx》由会员分享,可在线阅读,更多相关《买易通网站设计详细说明.docx(59页珍藏版)》请在三一办公上搜索。

1、买易通网站详细设计文档Document Version1.0AuthorModuleBill LuArchitecture & Batch ScriptHuili TangUser InterfaceJun FengDatabase & Document IntegrationWick WuLogical LayerYonghe YaoUser InterfaceCreate Date 2005-6-1Last Update Date2005-6-1文档目录1.概述(Summary)51.1文档目的(Introduction)51.2背景(Background)51.3相关文档(Related

2、 Documents)52.系统架构(System Architecture)62.1系统性能(Performance)62.2运行环境(Environment)62.3基本概念(Concepts)62.4程序模块结构(Module Structure)62.5后台脚本处理过程(Batch Process)62.6人工处理过程(Manual Process)62.7系统容错设计(Application Exceptions)63.用户界面设计(User Interface Design)74.逻辑层设计(Logic Layer Design)84.1系统类结构及关系84.1.1总述:84.1.

3、2CategorySystem.104.1.3ProductSystem.134.1.4AccountSystem.154.1.5ReviewSystem.194.1.6StoreSystem.204.2各主要算法实现流程214.2.1Overview.214.2.2Category Related.214.2.3Product Related234.2.4Review Related.274.2.5User Related.274.2.6Store Related275.数据库设计(Database Design)285.1Database summary285.2TBL_ACCOUNT30

4、5.3TBL_ACCOUNT_LOGON325.4TBL_APPLYCHANGE335.5TBL_ARTICLE345.6TBL_ARTICLE_BODY355.7TBL_BATCH365.8TBL_CATEGORY375.9TBL_CONDITION395.10TBL_LIST405.11TBL_PRODUCT415.12TBL_PRODUCT_CHANGE435.13TBL_PROPERTY445.14TBL_PROPERTY_CHANGE455.15TBL_PROPERTY_GROUP465.16TBL_PROPERTY_LIST475.17TBL_PROPERTY_VALUE485.1

5、8TBL_RATING495.19TBL_REVIEW505.20TBL_REVIEW_BODY525.21TBL_STORE535.22TBL_STORE_LOGON555.23TBL_TOPIC565.24TMP_TRUST576.后台脚本设计(Batch Script Design)587.名词解释(Terminology)597.1关系网(Web of Trust)597.2开放式目录管理(Open Taxonomy)591. 概述(Summary)1.1 文档目的(Introduction)1.2 背景(Background)1.3 相关文档(Related Documents)2.

6、 系统架构(System Architecture)2.1 系统性能(Performance)2.2 运行环境(Environment)2.3 基本概念(Concepts)2.4 程序模块结构(Module Structure)2.5 后台脚本处理过程(Batch Process)2.6 人工处理过程(Manual Process)2.7 系统容错设计(Application Exceptions)3. 用户界面设计(User Interface Design)4. 逻辑层设计(Logic Layer Design)4.1 系统类结构及关系4.1.1 总述:MyET里我们抽象出5个实体对象,分

7、别是Category, Product, User, Review和Store,. 作为整个Business Faade里面的主要功能块,User Interface Layer 通过调用实体对象的功能函数完成操作。Business Faade层经过Business Rule层的数据检查,通过Data Access层以Common Layer定义的数据结构实现对数据库的访问。 Business Faade5个实体对象对应的Class名称分别是CategorySystem, ProductSystem, AccountSystem, ReviewSystem, StoreSystem. 下面是各

8、个Class实现的主要接口列表。4.1.2 CategorySystem.Function: CreateCategoryPara: int parentID, /所在的父目录位置; string catName, /要创建的目录名称; CategoryData.CategoryType catType, /目录类型,枚举类型 NotLeaf = 0, Leaf = 1 string remark , /备注;Return: -1; /创建失败int Id ; /创建得到新的categoryid ;Description: 创建一个新的category。Function: GetCategor

9、yByIDPara: int categoryID, /CategoryData category /out Category DataReturn: VoidDescription: 通过CategoryID得到category详细Function GetChildrenPara: int categoryID, CategoryData category /out Category Data.Return : VoidDescription: 返回目录的子目录,如果是叶子节点,返回空。Function GetParentsPara:int categoryID, CategoryData

10、category /out 按照从Root到该categorys 的 Parent的顺序排列的目录集,Return: voidDescription: 根据CategoryID得到该Category的所有长辈,按照由高到低的顺序排列Function GetTopLevelCategoriesPara:CategoryData category /out,得到Top Level的目录集合,按照从左到右的顺序排列。Return :VoidDescription : 得到顶层目录集合,按照显示顺序排序过的。Function GetRecommendCategoriesPara:int categor

11、yID,/指定目录的id.int itemCount, /推荐目录的个数CategoryData category/out 得到推荐目录的列表,并按显示顺序排列Return: voidDescription:Function UpdateCategoryPara:CategoryData category/ 要修改的Category Data.Return: Bool/True for Success, False for failed.Description:更改目录的信息。Function: SetLinkCategoryPara:int srcCategoryID,int destCat

12、egoryIDReturn: Bool/True for Success, False for failed.Description: 设定Link Category, if Linkid0 means this category was linked to Linkid. Function : GetRecommendProductsByIDPara:int categoryID, ProductData product /outReturn: voidDescription: 得到目录对应的推荐商品列表Function : GetRecommendStoresByIDPara:int ca

13、tegoryID, ProductData product /outReturn: voidDescription: 得到目录对应的推荐商品列表Function : GetBestReviewerByIDPara:int categoryID, AccountData account/ outReturn: VoidDescription :得到目录对应的最佳评论员。4.1.3 ProductSystem.Function CreateProductPara:ProductData productReturn: bool/ true for success; false for failed.

14、Decription : Create Product.Function GetAllProductsInCategoryPara:int categoryID, ProductData product/out产品信息。Return: voidDescription: 得到目录下的所有产品信息列表。Function GetProductByIDPara:int productID,ProductData productReturn:voidDescription: 通过productID得到产品的信息。Fucntion GetProductReviewsPara:int accountID,i

15、nt productID, ReviewData review/Review DatasetReturn: void Description: 得到产品的Review信息,该信息已经按照显示顺序排序过。不包括Review Body,Reviews written by accountid or whom accountid trusted will shown front.Function GetProductsByConditionsPara:Conditions conditions, /Marked By Wick , Contitions have not definedProduct

16、Data productReturn:voidDescription: 根据Contitions, 返回product的数据集,conditions是个条件列表。Function GetProductsByKeywordPara:string keyword, int catgoryID, ProductData product /out,返回的数据集Return:voidDescription: 根据关键字返回product datasetFunction GetProductPropertiesPara:int productID,PropertyData propertyReturn:

17、voidDescription: 得到产品的propertyData集。PropertyData 按照类型分组,先是组名称,接着是组数据。一次在页面列出。详细的数据格式等待制定。Function: UpdateProductPara:ProductData productReturn: bool /True for Success;False for failed.Description : 修改product数据。4.1.4 AccountSystem.Function: AddBlockListPara:int accountID, int blockerIDReturn: int / -

18、1 faled ListID for success.Description: 为accountID用户Block新的blockID。Function AddTrustListPara:int accountID, int trusterIDReturn: int /-1 failedListID for this record if SucceedDescription: 为accountID用户添加新的Trust记录。Function AddWishCategoryPara:int accountID, int categoryIDReturn: int /-1 for failedLis

19、tID for Success.Description:用户添加新的Wish Category.Function: AddWishProductPara:int accountID,int productIDReturn: int/ -1 for failedListID for success.Description: 用户添加收藏的产品。Function: CreateAccountPara:string logonname, string passwordReturn: bool / True for success; False for failed.Description: 创建新用

20、户Function: GetAccountByIDPara: int accountID,AccountData account /outReturn: VoidDescription: 通过id得到用户的数据.Function : AccountLogonPara : string logon,string passwdReturn: bool / true for Login Successfully False for login failedDescription: 用户登陆验证Function : GetAccountReviewsPara:int accountID, Review

21、Data review /outSorted Review DataReturn: voidDescription: 得到指定用户的Reviews.Function : GetTrusteesListPara :int accountID, ListData list/outReturn : voidDescription: 得到制定用户信任的用户数据。Function: GetTrustersListPara: int accountID,ListData list /outReturn : voidDescription: 得到信任该用户的用户数据Function :GetWishCate

22、goriesPara:int accountID,ListData list /outReturn: voidDescription: 得到用户收藏的目录信息列表。Function :GetWishProductsPara:int accountID,ListData list/outReturn: voidDescription: 得到用户收藏的商品信息Function :RemoveListPara:int listID /列表项, trust,block,or wish category,wish products.Return: bool / True for succeed Fals

23、e for failed.Description: 从list表里删除选项。Function: UpdateAccountPara:AccountData accountReturn: bool / True for succeed, False for failed.Description:修改帐号的参数信息。Function : ChangePasswordPara:int accountID,string oldPassword,string newPasswordReturn: bool:/True for succeed; False for failed.Description:修

24、改密码。 4.1.5 ReviewSystem.Function: CreateReviewPara: ReviewData reviewReturn:bool / True for success; False for failed.Description:创建新的Review.Function :GetReivewRatingsParaint reviewIDReturn: ReviewData / 返回Review的详细评价。Description: 得到Review的评论和rating信息列表。Function: GetReviewByIDPara :int reviewID /Ret

25、urn: ReviewData /Description: 根据某个Review的ID返回该Review的信息包括Review BodyFunction: UpdateReviewPara:ReviewData reviewReturn: bool / True for success, False for failed;Description: Update Review的信息。4.1.6 StoreSystem.function CreateStorePara:StoreData storeReturn:bool / True for success, False for fail.Des

26、cription: 创建store. Function GetStoreByIDPara :int storeIDReturn: StoreData / Description:通过storeid得到store的信息。Function : GetStoreByLogonPara:string logon,string passwdReturn: StoreDataDescription: 根据商店登录名和密码获取商店信息Function: GetStoreReviewsPara:int storeIDReturn: ReviewData Description: 不包括ReviewBody.F

27、unction: UpdateStorePara:StoreData storeReturn:bool / True for success, False for failed.Description:update Store Info.Business Rules4.2 各主要算法实现流程4.2.1 Overview.4.2.2 Category Related. 1.1 Category List非叶子Category伪代码算法:If not login statusBeginIf Cached(Page)BeginshowCachePage. /Public View 使用缓存Retur

28、n;End;End;/显示非叶子节点的层次目录结构CategoryData category1 = GetChildren(CurrentCategoryID)For each category1 BeginShowCategoryTitle(category1.row);SubCategoryID = category1.CategoryIDCategoryData category2 = GetChildren(SubCategoryID);For each category2BeginShowCategoryTitle(category2.row);End; End;Cache(Page

29、);叶子节点If publicView Status = trueBeginIf Cached(page) then BeginshowCachePage.Exit;End;End;ListRefineFilter() / Refer to 2.2 Refine Results By Filter;ListProducts() / Refer to 2.1 List Products. 1.2 Text Navigation/Actually is function GetParents in CategorySystem;DataTable dt;CategoryData category

30、= GetCategoryByID(categoryid);String path = category.row.CATEGORYCODE;For each 4 chars in pathBeginID = strtoint(4chars);CategoryData row = GetCategoryByID(ID);dt.addrow(row)End;Return dt; 1.3 / 得到Category对应的Properties列表GetCategoryProperties(categoryID)BeginSql = select p.*,g.groupname, from TBL_Pro

31、perty p, TBL_Property_Group g where p.categoryid = categoryID and g.categoryid=categoryID and case p.groupid: when p.goupid0 then g.groupid=p.groupid; Result = execute(Sql);Return(Result);End; 1.4 /得到Product的Property和value GetProductProperty(productID)BeginEnd;1.5 4.2.3 Product Related2.1 List Produ

32、cts./伪代码CheckCachePageForPublicView();RefineResultsByFilter(); /Refer to 2.2ProductData product = GetAllProductsInCategory(catgoryID)Foreach ProductShowProductInfo;2.2 Refine Results by filterStep A.B.CStep A: Get Contitions Properties./得到要列出的Property Name, 如品牌,价格,厂家 PropertyArr GetConditionTitles(c

33、ategoryID) BeginSql = select distinct con.propertyid, p.propertyName from TBL_Condition con, Tbl_Property p where categoryid=categoryIDResult = Execute(Sql); Return (Result); End;SelectedPropertyArr= GetSelectedFromLinkParam.ShowPropertyArr = PropertyArr SelectedPropertyArr;StepB:Show conditions fro

34、m Step A;Foreach ShowPropertyArr doBeginShowConditionTitleListArr = GetConditionListItems(categoryID, ShowPropertyArrpropertyID)ShowConditionsOfListArr;End;/得到要显示的属性的列表,如价格列表。GetConditionListItems(categoryID, propertyID)BeginSql = select * from TBL_Condition where categoryid=CategoryID and propertyi

35、d=propertyID order by displayOrder;End;StepC: GetProductsListByConditions. Sql = select * from product where For each SelectConditionsArrBeginSql= sql + and +SelectConditionsArrEnd;ProductData product = Execute(Sql);ListProducts();2.3 List Product Reviews.2.3.1 ShowReviewsList2.4 Rate Product.2.5 Se

36、arch Product TBD4.2.4 Review Related.3.1 Read Review3.2 Write Review3.3 Rate Review4.2.5 User Related.4.1 Registration4.2 Member Page (self);4.3 Member Page(other)4.3 Role and Rank4.2.6 Store Related5. 数据库设计(Database Design)5.1 Database summaryNumber of tables:23Number of views:0Number of columns:23

37、1Number of indexes:23Number of foreign keys:0TablesColumnsIndexesNotesTMP_TRUST41TBL_TOPIC101TBL_STORE_LOGON41TBL_STORE251TBL_REVIEW_BODY21TBL_REVIEW191TBL_RATING81TBL_PROPERTY_VALUE61TBL_PROPERTY_LIST51TBL_PROPERTY_GROUP41TBL_PROPERTY_CHANGE61TBL_PROPERTY81TBL_PRODUCT_CHANGE81TBL_PRODUCT211TBL_LIST

38、71TBL_CONDITION61TBL_CATEGORY181TBL_BATCH101TBL_ARTICLE_BODY21TBL_ARTICLE131TBL_APPLYCHANGE71TBL_ACCOUNT_LOGON41TBL_ACCOUNT3415.2 TBL_ACCOUNTColumnsData typeAllow NULLsNotesAccountId (I1)INTEGERNot allowedDisplayNameCHAR(32)AllowedRealNameCHAR(32)AllowedBirthdayCHAR(8)AllowedEmailCHAR(32)AllowedCoun

39、tryKeyCHAR(4)AllowedProvinceKeyCHAR(4)AllowedAddressCHAR(64)AllowedZipCodeCHAR(8)AllowedTelephoneCHAR(16)AllowedMobilephoneCHAR(16)AllowedRankSMALLINTAllowedTrustScoreINTEGERAllowedReviewCountINTEGERAllowedImageURLCHAR(128)AllowedBiographyCHAR(128)AllowedReferCodeCHAR(16)AllowedCreateDateTIMESTAMPAl

40、lowedUpdateDateTIMESTAMPAllowedLastLogonDateTIMESTAMPAllowedIsShowTrustBOOLAllowedIsAlertBOOLAllowedIsShowReview1BOOLAllowedIsShowReview2BOOLAllowedIsShowReview3BOOLAllowedIsShowReview4BOOLAllowedIsShowReview5BOOLAllowedIsShowReview6BOOLAllowedIsShowReview7BOOLAllowedIsShowNameBOOLAllowedIntReserved

41、1INTEGERAllowedIntReserved2INTEGERAllowedStringReserved1CHAR(32)AllowedStringReserved2CHAR(32)AllowedIndexesColumnsSort orderPK_TBL_ACCOUNT (I1)AccountIdAscending5.3 TBL_ACCOUNT_LOGONColumnsData typeAllow NULLsValue/RangeAccountID (I1)INTEGERNot allowedLogonCHAR(20)Not allowedPasswordCHAR(20)Not all

42、owedStatusSMALLINTNot allowedIndexesColumnsSort orderPK_TBL_ACCOUNT_LOGON (I1)AccountIDAscending5.4 TBL_APPLYCHANGEColumnsData typeAllow NULLsNotesApplyID (I1)INTEGERNot allowedApplicantINTEGERNot allowedChangeTypeSMALLINTAllowedItemIDSMALLINTAllowedRatingScoreSMALLINTAllowedStatusSMALLINTAllowedApplyDateTIMESTAMPAllowedIndexesC

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号