Xiaomi Mall Project
Project is in escrowGitHub, you can go to GitHub to see the download! And search wechat public code out of Offer to receive a variety of learning materials!
Based on Servlet+JSP development of xiaomi mall project, because the project volume is very small, only for small partners reference and practice!
I. Get Xiaomi Mall project
Project announcement: This project is a Xiaomi Mall project, which is a development project based on Servlet+JSP. It is hosted here on GitHub for record and provided to partners who are learning to practice. This project is not particularly advanced and rigorous, but just a simple exercise, so there are a lot of inadequacies, please understand! Thank you very much!
- You can click here to view and Get the project!
- Check out the project idea analysis to help you brainstorm!
- Refer to the project requirements analysis to tell you what the project is testing you!
- Understanding the database analysis of this project will help you understand the relationship between the tables!
Ii. Project process display of Xiaomi Mall
Note: JSP pages, database, and some Utils tools are provided, so we just need to create project import creation and write other code. Page display process is circled by red line box is the mall entrance we need to do, click this entrance to complete the jump to other pages, according to other JSP page display content and business to write the corresponding page display and business logic code.
Register function page (register.jsp) |
---|
Registration success page (registersuccess.jsp) |
Unlogged mall pages (index.jsp, header. JSP, footer.jsp) |
Login page (login.jsp) |
Home page of the mall after login (index.jsp, header. JSP, footer.jsp) |
Paged List of goods (goodlist.jsp) |
Product Details page (goodsdetail.jsp) |
Add to cart successfully (cartsuccess.jsp) |
Shopping cart list (cart.jsp) |
Order list (order.jsp) |
Order submitted successfully (orderSuccess.jsp) |
Wechat Pay (payweixin.jsp) |
Payment success (message.jsp) |
Home page Address management (header.jsp – > self_info.jsp) |
Home page My order (header.jsp – > orderList.jsp) |
Order details (orderlist.jsp – > orderdetail.jsp) |
Note: interested partners extend their own, optimize the details! |
Iii. Database
Introduction to Database Tables
- Address table (TB_address) : contains ID, address information (detail), name (name), phone, user ID (UID) and default address mark (level).
- Tb_cart: Contains ID, item ID (PID) quantity (NUM), subtotal (money)
- Tb_goods: contains ID, name, pubdate, picture, price, star, description and typeID.
- Commodity type table (tb_goods_type) : contains ID, commodity type name (name), and commodity type level (level).
- Order table (TB_ORDER) : contains order ID, user ID (UID), subtotal (money), order status (status), order time (time), address ID (AID)
- Tb_orderdetail: contains ID, order ID (OID), Item ID (PID), Item Quantity (NUM), subtotal (money)
- User table (TB_user) : contains ID, username, password, email, gender, account activation flag, role, and activation code.
Matters needing attention:
- If the account activation flag is 1, the account is activated. The default tag address is marked 1
- The activation code can be generated using the UUID, remember to remove the “-” from the UUID code
- The order ID is a string ID of 32 generated by the UUID, which also removes the “-“
- We only use two states for the order state. If you need to see the states, look for the enumerated classes in the Utils tool in our project
OrderStatus
- The order time in the database is of type time, which includes the date and time. Date contains the date and time, whereas java.sql. Date contains the date, not the time. So we just need to use java.utils.date in this project
- The subtotals in the shopping cart table are empty because the subtotals are stored once after you add the item to the cart, but should also change when you modify the quantity until you submit the order. So this leads to subtotals in the shopping cart being different from subtotals in the order
- Emptying the shopping cart and deleting items in the shopping cart are not direct delete deletes, because user data is precious, so we only need to operate on the quantity of items purchased by the user
Database model |
---|
Iv. Project demand analysis
Project requirement analysis |
---|