Project background

Writing purpose

Clear business background, business scope, basic business logic and business framework, and expect readers to include: project sponsors, end users, project investors, project management team, project execution team, and other project stakeholders.

Reference documentation

Esms3. x Detailed Design Description Design document. doc: template of the detailed design specification.

The name of the interpretation

ESMS: Electronic Shopping Mall System. B/S: Browser/Server. C/S: Client/Server. B2B: Service to Service, a form of e-commerce. B2C: Service to Consumer, a form of e-commerce business. C2C: Consumer to Consumer, a form of e-commerce business. CSS: Short for Cascading Style Sheets, THE CSS language is a markup language that doesn’t need to be compiled to be executed directly by the browser. HTML: Hypertext Markup Language. JAVASCRIPT: A program scripting language developed by Sun Microsystems (it is a tightly object-oriented language suitable for master-slave applications on the Internet), often referred to simply as JS. MVC: MVC stands for model, view, controller. View and user interactions cause controller changes through events and controller changes cause model changes. Connection pool: a tool for managing database Connection objects, such as DBCP, C3P0, etc. Ajax: Asynchronous JavaScript and XML is a web development technique for creating interactive web applications.

Project background

Design background

With the continuous development of science and technology, more and more online readers, in order to provide users with better book resources, it is necessary to establish learning e-commerce system on the basis of the existing information achievements, to provide users with more convenient information exchange tools and platforms.

Functions overview

Functional structure

Functional description

It mainly includes five functional modules: book display, shopping cart management, transaction management, user management and application management. E-book presentation: functions of book preview, book details and book retrieval are implemented. Buy a shopping car, which adds items, changes the quantity, deletes items, emptens the shopping cart, and pays bills. Queue transaction management: Functions including order list, order details, query details, and evaluation are implemented. User management: Functions to log in, register, change passwords, and modify personal information. Application management: new receiving address, receiving address maintenance, deleting receiving address, favorites.

Required tools: Eclipse + Java JRE + mysql + Tomacat

Video of the project

The video above Billie Billie learns from the video on the ape ground

Project materials and source code

I sorted it out and put it on GitHub. You can also download it from the video below

Making:Github.com/kongchengji…

steps

First, start with the user module

1. User table design

User table (Monkey_user)

The field names type The constraint describe
USER_ID varchar(32) not null primary key The user ID
USER_NAME varchar(20) not null The user name
USER_PASSWORD varchar(20) not null The user password
USER_SEX varchar(1) not null User’s gender
USER_BIRTHDAY datetime DEFAULT null Date of birth
USER_IDENITY_CODE varchar(60) DEFAULT null Extension field
USER_EMAIL varchar(60) DEFAULT null email
USER_MOBILE varchar(11) DEFAULT null The phone
USER_ADDRESS varchar(200) not null address
USER_STATUS A decimal (6, 0) not null Status 1OR2 Administrator

2. Create a database





The statement that creates an SQL table

Delete the existing lmonKEY_user tabledrop table if exists`lmonkey_user`; Create lmonkey_user tablecreate table `lmonkey_user`(
	USER_ID varchar(32) not null,
	USER_NAME varchar(20) not null,
	USER_PASSWORD varchar(20) not null,
	USER_SEX varchar(1) not null,
	USER_BIRTHDAY datetime default null,
	USER_IDENITY_CODE varchar(60) default null,
	USER_EMAIL varchar(60) default null,
	USER_MOBILE varchar(11) default null,
	USER_ADDRESS varchar(200)	not null,
	USER_STATUS decimal(6.0) not null.primary key(`USER_ID`)
)ENGINE=InnoDB default charset=utf8;
Copy the code

Operation effect:





3. Make it a user entity



Code:

package com.lmonkey.entity;

public class LMONKEY_USER {
	private String USER_ID ;
	private String USER_NAME ;
	private String USER_PASSWORD ;
	private String USER_SEX ;
	private String USER_BIRTHDAY;
	private String USER_IDENITY_CODE ;
	private String USER_EMAIL;
	private String USER_MOBILE;
	private String USER_ADDRESS ;
	private int USER_STATUS ;
	public LMONKEY_USER(String uSER_ID, String uSER_NAME, String uSER_PASSWORD, String uSER_SEX, String uSER_BIRTHDAY,
			String uSER_IDENITY_CODE, String uSER_EMAIL, String uSER_MOBILE, String uSER_ADDRESS, int uSER_STATUS) {
		super(a); USER_ID = uSER_ID; USER_NAME = uSER_NAME; USER_PASSWORD = uSER_PASSWORD; USER_SEX = uSER_SEX; USER_BIRTHDAY = uSER_BIRTHDAY; USER_IDENITY_CODE = uSER_IDENITY_CODE; USER_EMAIL = uSER_EMAIL; USER_MOBILE = uSER_MOBILE; USER_ADDRESS = uSER_ADDRESS; USER_STATUS = uSER_STATUS; }public String getUSER_ID(a) {
		return USER_ID;
	}
	public void setUSER_ID(String uSER_ID) {
		USER_ID = uSER_ID;
	}
	public String getUSER_NAME(a) {
		return USER_NAME;
	}
	public void setUSER_NAME(String uSER_NAME) {
		USER_NAME = uSER_NAME;
	}
	public String getUSER_PASSWORD(a) {
		return USER_PASSWORD;
	}
	public void setUSER_PASSWORD(String uSER_PASSWORD) {
		USER_PASSWORD = uSER_PASSWORD;
	}
	public String getUSER_SEX(a) {
		return USER_SEX;
	}
	public void setUSER_SEX(String uSER_SEX) {
		USER_SEX = uSER_SEX;
	}
	public String getUSER_BIRTHDAY(a) {
		return USER_BIRTHDAY;
	}
	public void setUSER_BIRTHDAY(String uSER_BIRTHDAY) {
		USER_BIRTHDAY = uSER_BIRTHDAY;
	}
	public String getUSER_IDENITY_CODE(a) {
		return USER_IDENITY_CODE;
	}
	public void setUSER_IDENITY_CODE(String uSER_IDENITY_CODE) {
		USER_IDENITY_CODE = uSER_IDENITY_CODE;
	}
	public String getUSER_EMAIL(a) {
		return USER_EMAIL;
	}
	public void setUSER_EMAIL(String uSER_EMAIL) {
		USER_EMAIL = uSER_EMAIL;
	}
	public String getUSER_MOBILE(a) {
		return USER_MOBILE;
	}
	public void setUSER_MOBILE(String uSER_MOBILE) {
		USER_MOBILE = uSER_MOBILE;
	}
	public String getUSER_ADDRESS(a) {
		return USER_ADDRESS;
	}
	public void setUSER_ADDRESS(String uSER_ADDRESS) {
		USER_ADDRESS = uSER_ADDRESS;
	}
	public int getUSER_STATUS(a) {
		return USER_STATUS;
	}
	public void setUSER_STATUS(int uSER_STATUS) { USER_STATUS = uSER_STATUS; }}Copy the code

4. Background page planning

Create a new admin_index.jsp file under the Manage folder





Similarly, the user management page and the user add page HTML can be copied into the JSP file accordingly









Address: http://localhost:8080/MonkeyShop/manage/admin_index.jsp





The address has changed, became at http://localhost:8080/MonkeyShop/manage/admin_user.jsp

After that, the user add interface was also modified.

I don’t want to write about the actual process in my blog

Added (╯ ‘- ‘) ak47 schematic item and loot added

Final project implementation effect

Normal users log in and shop













Administrator Login Control












Learn together and make progress together. If there are any mistakes, please comment