




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、汽车销售网站设计与实现详细设计与代码实现摘要:网络足现代经营和管理的重要媒介。我们手工记录汽车销售详情的吋代己经过去。 随着市场经济的迅速发展,而对汽车销售业严酷竞争的形势,对于加强经营管理、提高工作 效率和改善服务质量成为了急待解决的问题。而解决这些问题的欠键措施之一就是建立使用 先进、高效的汽车锁吿网站系统,引进创新的经营机制,适应新形势下企业的生存和发展。关键词:经营管理;汽车销饩;系统abstract: the compute is modern management must medium. before we hand car sales records of product de
2、tail is past. long with the rapid development of market economy,the face of the increasingly harsh competition selling cars strengthen operating management,real work and improve efficiency and improve the quality of service has become the problem to be solved. to solve these establishment ,advanced
3、and efficient use of car sales system,the introduction of innovative management mechanism,and adapt to the new situation of the survival and development of enterprises.key words: management; car sales; system1绪论1.1课题背景,目的和意义1.1.1课题背景随着internet的普及和电了商务的兴起,网上汽牢销售是internet电了商务在 汽车销售行业发展的必然结果,这种新型的汽车销售形
4、式,与传统4s或5s店利用 线下进行销售的方式相比拥有许多优势:一是同比降低了汽车销售成木;二是利 用网络作为交易平台来改变传统的交易方式,使得交易的活动不受空问和时问限 制;三是销售信息的传递史迅速灵活1.1.1课题目的和意义冇了围田汽车销售网站就不需要客户到书城手工s询需要的汽车,而只 需在自家的电脑前输入查询条件,快速而准确的找到汽车,大大加快了查询速度。2可行性分析2.1技术可行性本系统采用的是struts 1 ,hibernate+jpa规范+spring和mysql作为数据库-开 发。由于stmtsl访问速度和幵发效率快,采用spring做事务管理和组件容器,再 加上mysql灵活
5、易维护并且开发方面具冇方便快捷、使用灵活的特点,以及目前 的广泛实际应用,因此使用ssh+jpa+mysql是开发javaweb平台的最佳组合, 从而说明本系统在技术方面可行。硬件方而,最低配置需耍2g内存和100g硬.盘,cpu最低酷桴i3。2.2操作可行性0前,大多数个人电脑都能运行本系统。该系统的安装、运行不会改变原计 算机系统的默认设置和布局,再加上系统界面精简,提示信息完整,经过相关人 员指导便能够方便的操作此软件。2.3系统的技术介绍2. 3. 1 javascriptjavascript是一种具冇面向对象能力的、解释型的程序脚本设计语言。更具体 一点,它是基于对象和事件驱动并具有
6、相对安全性的客户端脚木语言。因为他不 需要在一个语言环境下运行,而只需要支持它的浏览器即可。它的主要目的是, 验证发往服务器端的数据、增加web互动、加强用户体验度等。2.3.2 jqueryjquery是一个可兼容多浏览器的javascript库,其核心理念是write less,do more。j query于2006年在美m纽约发布,此举吸引了来自世界各地的javascript 高手加入。如今,jquery已发展成为最流行的javascript框架。在世界前15000个 访问最多的网站中,超过55%的开发者在使用jquery。2. 3. 3 mysqlmysql是一个开源数据库,它起源于
7、瑞典adb公司。mysql和市面上其他 数据庳和比具有体积小,使用灵活,速度快,可横向集群的优势。自从阿里巴巴的去oracle化,把数据移植到mysql中浪潮的兴起,mysql的使用越来越受人众的 欢迎。2. 3. 4 luncencelucene是一个由java编写的jt源全文索引项h,随着网站站索引广泛使用 和hadoop大数抛集群对lucene的支持,免费、灵活、高效lucene越來越受幵发 者的欢迎。lucene先把要检索的资源集合放到本地,并使用某种特定的结构存储, 称为索引,这个索引的集合称为索引库。对索引库的检索远优于数据库模糊查询。2.3.5 jpajpa是sun公式提出一套o
8、rm持久成规范,其本身并阁示套技术。知识定义 了一套数掘待久m接口规范,hibernate, toplink等其他orm m工其是实现了其 接口规范,让开发者在用jpa开发是感觉不到底层产品的差异。其强人的注解功能 更是为y解决开发人员在配置繁琐的xml文件带来的不变,所提供的开发的web 项目的必选技术2.3.6 springspring是一套性能非常优越的轻量级容器。它提供aoc控制反转的方式管理所 打的javabean对象,action对象,底层持久service。冇了 spring的管理,编程人 员就冉也不用在构建自己的bean对象带来的繁琐的代码构造。2.3.7 jmailjmail
9、是使用java代码实现的一套邮箱规范,它对开发人员来说具冇灵活、轻 便的特性。用户在使用javamail发送邮箱时,只需耍调用jmail的相应接口,就可 以使用面昀对象的方式构造邮件并发送邮件信息到指定的邮箱。2.4系统开发平台和运行环境2.4.1系统开发平台系统的丌发是在myeclipse8.5编码tomcat最为服务器中间件的环境下进行 的。tomcat的环境主耍宥以下几方面技术优势:1. tomcat不仅仅是一个servlet容器,它也具打传统的web服务器的功能: 处理html页面。2. tomcat也可以与其它一些软件集成起来实现更多的功能。2. 4. 2操作系统操作系统:windo
10、ws 7以上版本。服务器软件:tomcat6.0以上版本。浏览器:ie9、fire fox、google chrome。3后台详细设计与实现围田科技汽车销售网,主要围绕需求所定义的系统结构图作依次功能模块 的详细设计与实现,系统结构图如下,我主要负责编写的代码模块为:商品管 理、商城用户管理和购物车这三个模块,图3-1:介0:旮 fitlwt条rl-fi阀龌浼 w&1we賊s昧尸ff«s-kjs sttfs亇人戸</.f 珀格歡活 fltrw«.3rtfr曲ta.f>k.lz11zrfl-w城中抓义教«*史明:lrff®e沈大11:&
11、#171;:«-n图3-1系统结构图3. 1商品管理3.1.1程序描述此模块为未网站的商品管理模块,管理所宥车辆信息在前端的显示信息。管理 商品价格,商品展示图片,商品样式管理,商品详细信息描述。此模块把类型管 理和品牌管理放在一起来说明,原因产品,品牌,类型的关联性和依耐性强,所 以放在一起来做详细设计更为合适。3. 1.2程序功能 i?台添加商品信息 后台修改商品信息 按入库吋间,商品名称,品牌,类型查询相应商品 前端搜索框搜商品,此收索使用全文索引lucene3. 1.3操作系统 添加商品输入项:车名:productname string长度不能超过100 仏牌 id: bra
12、ndld integer 类型 id: typeld integer 定金:barginmoney float 价格区间:上区间:fromsellprice float 下区间:tosellprice float 是否洒动车型:isactivity boolean 是也最新车型:isnew boolean昔页展示图片路径:frontlmageviewpath string长度不能超过两个 产品详细贞轮播图片路径:viewlmages set<productimggroup>productlmggroup对象属性长度不能超过200 款式style:款式名称:stylename str
13、ing 报价:sellprice float 库存:inventory integer产二详细描述:descript striing (数据库矣型力blob)度力text突型k:度 修改商品输入项:车名:productname string长度不能超过100 品牌 id: brandld integer 类型 id: typeld integer 定金:barginmoney float 价格区问:上区间:fromsellprice float 卜区间:tosellpricefloat是否活动车型:isactivity boolean 是否最新车型:isnew boolean首災展示图片路径:
14、frontlmageviewpath string k:度不能超过i从j个 产品详细页轮播閉片路径:viewlmages set<productimggroup>productlmggroup对象属性长度不能超过200款式style:款式名称:stylename string 报价:sellprice float 序存:inventory integer产品详细描述:descriptstriing (数掘库类型为blob)长度为text类型长度 删除商品输入项:点击删除超链接,附带产品id作为参数 商品编号:productcode string系统约朿的固定k度,36位 产品条件查
15、询输入项:车名:productname string长度不能超过100 品牌 id: brandld integer 类型 id: typetd integer 入库吋间,上下区间 上ix问:fromdate java.util.date 卜区间:todate java.util.date 全文索引产品输入项关键字:keyword string长度不能超过100 添加ri i牌晶牌名称:brandname sting k:度不能超过32 品牌logoi阁标路径:string长度小能超过200 修改品牌品牌名称:brandname sting长度不能超过32 rli牌logoi图标路校:stri
16、ng长度小能超过200 添加类型类型名称:stylename sting长度不能超过32 修改类型类型名称:stylename sting长度不能超过324. 2用广模块注册用户是构成网站主体的一个重要组成部分,网站设置注册用户的的之一在于方便3. 1.4程序出项 添加产品输出向:无直接输出项,跳转到产品列表页 删除产品输出项:无直接输出项,跳转到产品列表页 修改产品输出项:无直接输出项,跳转到产品列表页 查看产品详情输出项:产品及:体:product productinfo 实体包含其他项:款式列表:style list<style>评价列表:comments list<c
17、omment> 查看严品列表输出项:产品分页列表:page view page vie w<productinfo page view中包含其他项:总災数:totalrcords integer 当前页:currentpage integer 甸災姑示最大数量:maxresult integer 删除品牌输出项:无直接输出项,action跳转到产品列表页 修改品牌输出项:无直接输出项,action跳转到产品列表页 删除类型输出项:无直接输出项,action跳转到产品列表页 修改类型输出项:无直接输出项,action跳转到产品列表页 3.1.5设计算法产品主键code存放,采用uui
18、d进行加密生成 /*返回一个不重复的字符串* return*/public static string uuid() return uuid<randomuuid().tostring().replace(h-, n).touppercase();产品图片的存储路径采用如下算法进行生成simpledateformat dateformat = new simpledateformat(nyyyy-mm-dd);string logopathdir = n/upload/product/h+ dateformat.format(new date();/构建图片保存的a录/得到图片保存目录的
19、真实路径stringlogorealpathdir=request.getsession().getservletcontext().getrealpath(logopathdir);file logosavedir = new file(logorealpathdir);string ext =baseform.getext(imagefile);/构建文件名称string imagename = uuid.randomuuid().tostring()+".”+ ext;3.1.6实体类的设计产品女体productinfo: entity searchablepublic cla
20、ss productinfo implements serializable private static final long serialversionuid = -8860864584425256200l;/*商品编号,也是主键*/private string code;/*产品名称#/ private string name;/* 牌 */private brand brand;/*产品简介*/ private string description;/*产品亮点*/private string highlight;价格区间5private string innersellprice;/
21、*定金*/private float barginmoney;/*是否可见*/ private boolean visible = true;/*产品类型(大型车,中型车.)#/ private producttype type;/*上漿日期*/private date createdate = new date();/*人气指数*/ private integer clickcount = 1;/*销售量*/private integer sellcount = 0;/#是否最新车型#/private boolean isnew=false;/#是否热销车型#/ private boolea
22、n ishot=false;/*是否推荐(活动车型)#/ private boolean isactivity=false;/*广品样式*/private set<productstyle> styles = new hashset<productstyle>();/ *产品首贞图片展示*/private string viewimagepathfront;/*产品详细页图片组*/privateset<productimggroup>viewlmages=newhashset<productimggroup>();/*产品评价*/private
23、set<comment> comments=new hashset<comment>();public productlnfo() public productinfo(string productcode) this.code=productcode;onetomany(cascade= cascadetype.all, mappedby=productn) searchablecomponentpublic set<productstyle> getstyles() return styles;public void setstyles(set<p
24、roductstyle> styles) this.styles = styles;*从样式集合中删除指定样式 * param style*/public void removeproductstyle(productstyle style) if(this.styles.contains(style)this.styles.remove(style); style.setproduct(null);*添加样式到样式集合 * param style*/if( !this.styles.contains(style) this.styles.add(style);style.setprod
25、uct(this);/氺*添加图片组到集合 * param style*/public void addimagegroup(productimggroup group) if(! this, viewlmages.contains(group) this.viewlmages.add(group); group.setproduct(this);id searchableid public string getcode() return code;public void setcode(string code) this.code = code;column(length=50,nuiiab
26、ie=false)searchableproperty(boost=2,name=nproductnamen) public string getname() return name;public void setname(string name) = name;manytoone(cascade=cascadetype.refresh)joincolumn(name=nbrandid”)searchablecomponent public brand getbrand() return brand;public void setbrand(brand brand) thi
27、s.brand = brand;column(nullable=false)searchableproperty(index=index.no,store=store.yes)public string getinnersellprice() return innersellprice;©transient searchableproperty(index=index.no,store=store.yes) public integer getlnventory()integer inventory=0; for(productstyle style:getstyles()inven
28、tory+=style.getlnventory();return inventory;public void setinnersellprice(string innersellprice) this.innersellprice = innersellprice;lob column(nullable=false) searchableproperty public string getdescription() return description;this.description = description;column(nuliable=faise)searchablepropert
29、y(index=index.no,store=store.yes) public boolean getvisible() return visible;public void setvisib!e(booiean visible) this.visible = visible;manytoone(cascade=cascadetype.refresh,optional=false) joincolumn(name=htypeidh) searchablecomponent public producttype gettype() return type;public void settype
30、(producttype type) this.type = type; temporal (temporaltype date) public date getcreatedate() return createdate;public void setcreatedate(date createdate) this.createdate = createdate;column(nullable=false) public integer getclickcount() return clickcount;this.clickcount = clickcount;column(nullable
31、=faise)public integer getsellcount() return sellcount;public void setsellcount(integer sellcount) this.sellcount = sellcount;columnpublic boolean getisnew() return isnew;public void setisnew(boolean isnew) this.isnew = isnew;column searchableproperty(store=store.yes) public string gethighlight() ret
32、urn highlight;public void sethighlight(string highlight) this.highlight = highlight;columnpublic boolean getishot() return ishot;this.ishot = ishot;coiumnpublic boolean getlsactivityo return isactivity;public void setisactivity(boolean isactivity) this.isactivity = isactivity;column searchableproper
33、ty(index=index.no,store=store.yes) public float getbarginmoneyo return barginmoney;public void setbarginmoney(float barginmoney) this.barginmoney = barginmoney;column(nullable=faise)searchableproperty(index=index.no,store=store.yes)public string getviewimagepathfront() return viewimagepathfront;publ
34、ic void setviewimagepathfront(string viewimagepathfront) this.viewimagepathfront = viewimagepathfront; onetomany (cascade: cascadetype. all ,fetch=fetchtype.eager, mappedby=productn)return viewlmages;onetomany(cascade= cascadetype.all, mappedby=productn) public set<comment> getcomments() retur
35、n comments;public void setcomments(set<comment> comments) ments = comments;public void setviewimages(set<productimggroup> viewlmages) this.viewlmages = viewlmages;/获取价格区间组合后的字窜(11. 4万-16万)©transientpublic string getcompsellprice() string strs=innersellprice.split(n;);return strso+
36、39;万,+strs 1 +"万";/拆分价格区问成w个参数11. 4;4 15public string splitsellprice() return innersellprice.split(n;);public void addcomment(comment comment) ments.add(comment); comment. setproduct(this); overridepublic int hashcode() final int prime = 31; int result = 1;result = prime * result + (code =
37、 null) ? 0 : code.hashcode();return result; overridepublic boolean equals(object obj) if (this = obj)return true; if (obj = null)return false;if (getclass() != obj.getclass。) return false;final productinfo other = (productinfo) obj; if (code = null) if (other.code != null) return false; else if (!co
38、de.equals(other.code) return false;return true; 产品款式实体productstyle:entity searchable(root=false)public class productstyle implements serializable private static final long serialversionuid = -4926119953511144279l; private string id;/*样式的名称林/ private string name;/*销售价(报价)*/private float sellprice=0.0
39、f;private integer inventory:。; private productinfo product;public productstyle() public productstyie(string id,string name) this.id = id; 二 name;public productstyie(string name) = name;manytoone(cascade=cascadetype.refresh,optional=false) joincoiumn(name=hproductcoden) searchable
40、reference public productinfo getproduct() return product;public void setproduct(productinfo product) duct = product;id column() searchableproperty(index=index.no,store=store.yes) public string getld() return id;public void setid(string id) this.id = id;column(length=30,nullable=false)searcha
41、bleproperty(index=index.no,store=store.yes,name=styienamen) public string getname() return name;public void setname(string name) = name;column(nullable 二 false)searchableproperty(index=index.no,store=store.yes) public float getsellprice() return sellprice;public void setsellprice(float sel
42、lprice) this.sellprice = sellprice;columnpublic integer getlnventory() return inventory;public void setlnventory(lnteger inventory) this.inventory = inventory; overridepublic int hashcode() final int prime = 31; int result = 1;result = prime * result + (id = null) ? 0 : id.hashcode(); return result;
43、 overridepublic boolean equals(object obj) if (this = obj)return true;if (obj = null) return false;if (getclass() != obj.getclass() return false;final productstyle other = (productstyle) obj; if (id = null) if (other.id != null) return false; else if (!id.equals(other.id) return false;return true; 产
44、品图片组实体/氺*用户存放产品展示页图片的实体氺 author andy氺*/ entitypublic class productimggroup implements serializableprivate static final long serialversionuid = -9044933716673525360l;private string id;/*小图,130px*/private string smalllmagepath;/*画廊上显示的图片,753px*/ private string midlmagepath;/*放大后的图片效果900px*/ private st
45、ring biglmagepath;图片对旭产品 private productinfo product; public productimggroup() public productimggroup(string id) super(); this.id = id;id column(length=36) public string getld() return id;public void setid(string id) this.id = id; column(length=200)public string getsmallimagepath() return smalllmage
46、path;public void setsmallimagepath(string smalllmagepath) this.smalllmagepath = smalllmagepath;column(length=200)public string getmidimagepath() return midlmagepath;public void setmidimagepath(string midlmagepath) this.midlmagepath = midlmagepath; column(length=200)public string getbigimagepath() re
47、turn biglmagepath;public void setbigimagepath(string biglmagepath) this.biglmagepath = biglmagepath;manytoone(cascade=cascadetype.refresh,optional=false)joincolumn(name=hproductcoden)public productinfo getproduct() return product;public void setproduct(productinfo product) duct = product; ov
48、erridepublic int hashcode() final int prime = 31; int result = 1;result = prime * result + (id = null) ? 0 : id.hashcodeq);return result; overridepublic boolean equals(object obj) if (this = obj)return true; if (obj = null)return false;if (getclass() != obj.getclass。) return false;final productlmggr
49、oup other = (productlmggroup) obj; if (id = null) if (other.id != null) return false; else if (!id.equals(other.id) return false;return true; 品牌实体/*品牌*/entity searchable(root=false)public class brand implements serializableprivate static final long serialversionuid = -4540465642606278764l; /*主键*/pri
50、vate integer id;/*品牌名称*/ private string name;/* logo 11 片路径如:/images/brand/2015/12/12/ooo.gif"料/ private string logopath;public brand() public brand(string name,string logopath) = name; this.logopath = logopath;id generated valuesearchableproperty(index=index.no,store=store.yes)public
51、 integer getld() return id;public void setld(lnteger id) this.id = id;coiumn(iength=40,nullable=false)searchableproperty(index=index.not_analyzed, store=store.yes,name 二brandname)public string getname() return name;public void setname(string name) = name; column(length=80) public string ge
52、tlogopath() return logopath;public void setlogopath(string logopath) this.logopath = logopath; overridepublic int hashcode() final int prime = 31; int result = 1;result = prime * result + (id = null) ? 0 : id.hashcode(); return result; overridepublic boolean equa!s(object obj) if (this = obj)return
53、true; if (obj = null)return false;if (getclass() != obj.getclasso) return false;final brand other = (brand) obj; if (id = null) if (other.id != null) return false; else if (!id.equals(other.id) return false;return true; 产品类型实体:/氺*车型* author andyentity searchable(root=false)public class producttype i
54、mplements serializable i林氺private static final long serialversionuid = 6716659825995228537l; /*主键*/ private integer id;/*车型名称*/ private string typename;/*产品类型下的所冇产品*/private set<productinfo> products = new hashset<productinfo>();public producttype() public producttype(string typename) su
55、per();this.typename = typename;onetomany(mappedby=ntypen,cascade=cascadetype.remove) public set<productinfo> getproducts() return products;public void setproducts(set<productinfo> products) ducts = products; generated valueidsearchableproperty(index=index.no,store=store.yes)public integer getld() return id;public void setld(
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 解析卷人教版八年级上册物理物态变化《熔化和凝固》章节训练试卷(含答案详解版)
- 考点攻克人教版八年级《力》同步练习试卷(含答案详解)
- 2025课标考试真题及答案历史
- 高一下政治考试题及答案
- 江苏省建筑企业a证考试真题及答案
- 大学《学前教育学》期末试卷及答案详解
- 麻醉精神药品管理制度及相关药品知识试题含答案
- 水体高级氧化工艺-洞察与解读
- 秒杀机制设计优化-洞察与解读
- 2025年事业单位招聘考试综合类职业能力倾向测验真题模拟试卷(法律)
- 人教版一年级上册数学期中试卷(共5套-可直接打印)
- CVD 碳化硅涂层产品技术要求
- 2024版以房抵债协议范本
- 马克思主义制度经济理论知到智慧树章节测试课后答案2024年秋上海财经大学
- 安全部经理竞聘汇报
- 【部编】人教版六年级上册道德与法治全册知识点总结梳理
- 社区居家养老服务设计方案范文
- JT-T-1180.2-2018交通运输企业安全生产标准化建设基本规范第2部分:道路旅客运输企业
- 中国省市县行政区划
- 光伏钻孔灌注桩安全技术交底
- 采购物品质量保证期限约定协议
评论
0/150
提交评论