parts: the foregrounding and background management .The

parts: the foregrounding and background management .The
main function was achieved by front desk operation as
follows:
(1)Registered function: to provide user registration
function. The user could be a member of the flower shop
online through the registration.
(2)Personal information management functions: the user
could modify the personal data submitted, inquire the order
and the consumption on the web site in condition of having
registered cases.
(3)Shopping function: the user could browse flower
product information after login, or search flower product
that’s he needed according to the query conditions also, then
choose and buy flower product, and delivery order and
checkout on-line through shopping cart and the cashier's
function in this website.
(4)Evaluation function: the users could evaluate the
transaction after shopping success.
(5)Cancellation function: the cancellation function must
Proceedings of the 2nd International Symposium on Computer, Communication, Control and Automation (ISCCCA-13)
Published by Atlantis Press, Paris, France.
© the authors, 2013
0858
be provided for the user to quit the system safely of
withdrawal from the system.
Background management was the management of this
web site. The system administrator was exist in the
initialization of system. They were added into the database
manually in the database design. The main functions were
realized as follows:
(1)Flower product management: to add, delete and show
of classification about flower product .And it can be used
recommend flower product to users based on flower product
sales and each manufacturer prestige.
(2)User management:to management member
information and administrator information in web site.
(3)Announcement Settings: to manage announcement
information on web site. The announcement on web site
could be added, deleted and modified.
(4)Order management: to handle the orders submitted by
user timely in time
(5)Link management: to set website links. The website
links could be added, deleted and modified.
(6)Cancellation function: the cancellation function must
be provided when the management exited system, and it
must be safe to withdrawal from the system.
B.
System Database Design
After analyzing of the system function, the list was used
mainly as follows:
(1) Admin(LoginId
、
LoginPwd);
(2)User(UserId
、
UserName
、
UserPwd
、
UserSex
、
UserTel
、
UserAdd
、
UserEmail);
(3) Flower(FlowerID
、
FlowerName
、
FlowerSort
、
FlowerOrigin
、
FlowerNumber
、
FlowerColor
、
FlowerPrice
、
FlowerDescribe);
(4) FlowerCategory (FCId
、
FCName);
(5)Notice(NoticeId
、
NoticeDescribe);
(6)OrderForm(OFId
、
FlowerId
、
FlowerNumber
、
OFTime
、
OFModeOfPayment
、
OFIsship
、
OFTypeOfPayment
、
OFIspay
、
OFTotalMoney);
(7)Linker(LinkerId
、
LinkerDescribe);
C.
Implementation of the System
There’re much more functions realized by the system is ,
but the key algorithm of some functions could be given only
limited to this paper length.
1. Public class design
(1) Acquisition system time class
Counting system time class was CountTime
，
the system
current time could be obtained by currentlyTime() methods
for in the operation of the class. The specific algorithm
was as follows:
Define method currentlyTime(),return value is string:
Date date = new Date();
DateFormat
dateFormat
=
DateFormat.getDateInstance(DateFormat.FULL);
return dateFormat.format(date);
(2) Database connection class
Created database connection class JBDConnection
，
set
the driver of connection SQL Server 2000 , the address of
url and the instance of declaration connection class in the
attribute. Then connected to database by using structure
method.
2.The realization of the method checkMember() to verify
user’s identity of the user login function
When the user was online shopping in this system, the
identity authentication must be conduct in order to ensure
the safety of data information. When the user input the user
name and password, it would call the method
checkMember() to verify user identity.The specific
algorithm was as follows:
define strings called name=
request.getParameter(“name”);
define MemberForm
memberForm=dao.selectMemberForm(name);
if( memberForm equal null)
{reauest.setAttribute(“resutlt”, “The user does not
exist.please enter again!”);}
else
if(!memberForm.getPassword().equals(request.getParameter
(“password”).trim()))
{request.setAttribute(“result”, “Password is
wrong,please enter again!”)}
else{request.setAttribute(“memberForm”,memberForm)
};
return mapping.findForward(“checkMember”);
The user login results would be displayed in f –
checkMemberResult after implementation of user validation.
JSP page was in f-checkMemberResult.jsp page
，
it would
got the user’s login result by request’s object
getAttribute().If the user login validation was successful, it
would return to the home page of the florist’s shop online
system directly. If not, the results would be shown by
JavaScript script and return to your home page.
3.The realization of the function of the shopping cart
The consumers would put the goods which had be
chosen already into the shopping cart (basket) in the
supermarket shopping, and bought them in the cashier's
check after the completion of the choose. In the online
shopping process, the "shopping cart" technology was
adopted usually to simulate the real life shopping cart
(basket). In the florist’s shop online system, it could not
only to add, view, modify, empty the flower product had
been chosen at any time through the shopping cart, but also
could buy them to the cashier's check at any time. The front
desk shopping cart module mainly included adding flower
product to shopping cart, querying flower product in
shopping car, modifying the quantity of flower product in
shopping cart, removing the flower products in shopping
cart and emptying shopping cart, etc.
(1)The realization of adding flower product to the
shopping cart
The users could view the flower product detailed
information while opening a flower product button
hyperlink in the home page. When he clicked the "put the
shopping cart" button, then the cart_add.jsp page would be
triggered. The page would store product information
temporarily in the shopping cart. The object cart of Vector
Proceedings of the 2nd International Symposium on Computer, Communication, Control and Automation (ISCCCA-13)
Published by Atlantis Press, Paris, France.
© the authors, 2013
0859
type was adopted to store flower product data in shopping
cart and was saved in the client session object. When the
flower product was added to the shopping cart, there would
be two situations:
The first one was when the cart was empty, that was to
say ,when the user add the first flower product into the
shopping cart , a cart must be created, then the flower
product information could be saved to the cart variables.
The second case was when the cart was not empty, that
was to say, some flower products had been chosen already
in the shopping cart. Then the user could add the flower
products into the shopping cart directly. If the flower
product was reduplicate, the quantity of the flower
products in cart needed to be modified. Specific algorithm
was as follows:
The value of goodsID is
Interger.parseInt(request.getParameter(goodsId));
The value of goodsPric is
Float.parseFloat(request.getParameter(“price”));
Define sellGoodForm=new SellGoodsForm();
The value of sellGoodForm.ID isgoodsID;
The value of sellGoodForm.price is goodsPrice;
The value of sellGoodForm.number is 1;
The value of flag is true;
The value of cart is
(Vector)session.getAttribute(“cart”);
if(cart equal null) cart= new Vector()
else{for(int i=0;iSellGoodsForm
form=(SellGoodsForm)cart.elementAt(i);
if(form.ID equal
sellGoodsForm.ID){Form.number++;Cart.setElementAt(for
m,i);Flag=false}}};
(2)The realization of the empty shopping cart
Emptied all purchase information of the flower product
stored in the session:session.removeAttribute(“cart”); The
page was returned to the flower cart was empty
：
response.sendRedirect(“cart-see.jsp”);
IV.
C
ONCLUSION
The florist’s shop online system was an important
application of e-commerce sales model. It could realize
online trading of flowers. In the rapid development of the
Internet today, the florist’s shop online system would have a
great market potential because the flowers had certain
refreshing time. Based on elaborating the necessity of
development of the florist’s shop online system, the J2EE
technology to develop the system was introduced at first in
this paper. then the user demand of the system was analysed
deeply. A scientific and reasonable database was designed
according to the customer demand. Finally, the design of the
whole system and the key code of implementation part in
the system realization was given. After a period of time in
the system test and trial operation, it had been shown that
the system had accomplished the desired basic goal. And it
had a certain inspiration and reference significance to other
similar online shopping system. However, it was a
complicated project to develop the florist’s shop online
system, the further improvement of system must be done
combined the problems appeared in the course of the actual
use.
R
EFERENCES
[1]
Huangxianying. The design of servlet in the J2EE platform. Computer
application research 2002.01:140-141
[2]
Duming,Lichaochun. the design and implementation of Struts+EJB in
J2EE platform [J], Computer application
research,2005(3):223-225,228
[3]
Feisike product research and development center.JSP application
development steps.Beijing:Publishing house of electronics
industry,2002
[4]
http://baike.baidu.com/view/3542.htm
[5]
http://baike.baidu.com/view/25611.htm
[6]
http://baike.baidu.com/view/4242783.htm
Proceedings of the 2nd International Symposium on Computer, Communication, Control and Automation (ISCCCA-13)
Published by Atlantis Press, Paris, France.
© the authors, 2013
0860
|