Tenet运动网站(基于用例)
1.2.1.2 business login包
dealerfeedbackpaymentcartcategoryrecipientcustomeritemshipmentorderspassword
1.2.1.3 data service包
说明:获取对象的属性用get+属性名,无参数,返回值为属性的类型,设置对象的属性用set+属性名,参数列表:a+属性名:属性的类型,无返回值。以下类的get、set操作依照此标准,不再加以说明。
Tenet运动网站(基于用例)
1.2.2 类图
1.2.2.1 db类
类 说明 ConnectString:配置数据库的连接串 Connection connect():配置与后台数据库的连接。 1.2.2.2 dealer类
类属性 说明 DealerId:经销商的用户名 DealerName:经销商的名称 ContractMan:联系人 BuildDate:建立日期 Grade:经销商的等级(总代理,一级代理,二级代理) Mark:积分 Discount:折扣 ExpireDate:终止日期 IsExpired:是否终止 Problem:提问 Answer:答案 类方法 Tenet运动网站(基于用例)
void insert()
功能:把dealer对象的属性值(dealerId,password,dealerName,
address,phone,email,zip,contractMan,buildDate,problem,answer)写入数据库 dealer表中。
注意事项:调用DB类建立数据库的连接,调用数据库的存储对象把对象的属性值写入后台数据库
1. Void update(aDealerId:string):更新指定对象的值(password,dealerName, address,phone,email,zip,contractMan)于数据库中。
注意事项:调用DB类建立数据库的连接,调用数据库的存储对象把对象的属性值写入后台数据库
2. Void delete(aDealerId:string)
功能:从数据库的dealer表中删除指定对象的数据。
注意事项:调用DB类建立数据库的连接,调用数据库的存储对象删除数据库对应对象的值。 3. String getGradeByName(aDealerId:string) 功能:从数据库中检索指定用户的等级
4. String getPasswordByName(aDealerId:string):从数据库中检索指定用户的密码
Tenet运动网站(基于用例)
1.2.3 password 类
1. String encrypt():对明文加密获得密文。 2. Bool comparePassword(aPassword):比较密码,匹配返回真,否则返回假。
1.2.4 Category类
1. GetCategory():Recordset:从数据库中检索所有目录 2.
Tenet运动网站(基于用例)
1.2.5 Cart类
ItemId:商品ID Quantity:商品数量 Void addItem(itemId:string):购买商品 Void delete(itemId:string):删除商品 Void empty():清空购物车 Bool isExistItem(itemId:string):购物车中是否存在商品。