This is the third day of my participation in Gwen Challenge
You know how to go to town first
I. Introduction 2
1.1 Research Background 2
1.2 Research Purpose and Significance 2
1.3 Research Content 3
1.4 Feasibility study Design 3
1.5 Social Feasibility 4
1.6 Related Technical Description 4
spring 4
Spring 5
jQuery 5
Mysql 6
1) Powerful 6
2) Support cross-platform 6
3) Faster operation 6
4) Support object oriented 7
5) High security 7
6) Low cost 7
7) Support various development languages 7
8) Large database storage capacity 7
9) Support powerful built-in functions 7
Demand Analysis 8
2.1 System Function Overview 8
1) User registration and login Login function 8
2) User information management 8
3) Operation of second-hand goods by users 8
4) User shopping cart management 8
5) User order management Operation management 8
6) Management, addition, modification and deletion of idle items 8
7) Preview and view web products 8
8) Log out log out 8
2.2 System Operating Environment 8
Iii. System Design
3.1 System Design 9
3.1.1 Main Client Design 9
3.4 Main Process Description 9
4. System realization 11
4.1 Program main Class 11
4.1.1 User Administrators 11
4.1.4 Classification of second-hand Goods 12
4.1.4 Second-hand Goods Order 12
4.1.4 Second-hand Goods Order 13
4.1.4 Details of Second-hand Goods 14
4.1.4 User Customer class 15
4.3 System Functions Main implementation module Screenshot 16
4.3.1 Login Page 16
4.3.1 Front-end login code: 16
4.3.2 Registration Page: 17
4.3.2 System Functions Screenshot 17
4.3.4 Display of some key source code: 22
4.4 Database Table Design 29
4.4.0 Data Three Paradigm: 29
I. First Paradigm 29
Second normal Form 29
Third normal Form 29
Table ER Figure 30
4.4.2 User table Design 30
4.4.3 Design of second-hand Goods classification table 30
4.4.4 Design of user order Table 31
4.4.5 Details design of second-hand goods table 31
4.4.5 Design of second-hand goods order Form 32
4.4.6 Database SQL File 32
V. Refer to Text 36
Main functions:
Administrator: commodity classification management, commodity management, commodity order management, user management and other functions. User role: view all commodities, users login and register, view commodities according to the category, release commodities, view the seller’s home page, contact the seller, leave messages for commodities, view orders, modify and view personal information and other functions.
Main technologies:
HTML+CSS+JavaScript+jsp+mysql+Spring+mybatis
System Home page:
Login module:
Login code implementation:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <! DOCTYPE HTML > < HTML > <head lang="en"> <meta charset="UTF-8"> <title> rel="stylesheet" href="${pageContext.request.contextPath }/css/style.css" /> <script type="text/javascript"> /* if(top.location! =self.location){ top.location=self.location; } */ </script> </head> <body class="login_bg"> <section class="loginBox"> <header class="loginHeader"> <h1> Secondary transaction platform </h1> </header> <section class="loginCont"> <form class="loginForm" action="${pageContext.request.contextPath }/login.do" name="actionForm" id="actionForm" method="post" > <div class="info">${error }</div> <div class="inputbox"> <label For ="user"> </label> < INPUT type="text" class="input-text" ID ="userCode" name="userCode" placeholder=" Please input user name "required/> </div> <div Class ="inputbox"> <label for="mima"> </label> <input type="password" ID ="userPassword" name="userPassword" placeholder=" Please enter the password" required/> </div> <div Class ="submit" > <input type="reset" value=" reset" /> </div> </form> </section> </section> </body> </html>Copy the code
Product Details:
Click Buy to create an order information:
Personal Center:
Administrator Login:
Main code implementation:
/** * . * * * * */ package io.renren.modules.sys.controller; import com.google.code.kaptcha.Constants; import com.google.code.kaptcha.Producer; import io.renren.common.utils.R; import io.renren.modules.sys.shiro.ShiroUtils; import org.apache.shiro.authc.*; import org.apache.shiro.subject.Subject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.imageio.ImageIO; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.awt.image.BufferedImage; import java.io.IOException; ** @author Mark s.com */ @controller public class SysLoginController {@autowired private Producer Producer; @RequestMapping("captcha.jpg") public void captcha(HttpServletResponse response)throws IOException { response.setHeader("Cache-Control", "no-store, no-cache"); response.setContentType("image/jpeg"); String text = producer.createText(); BufferedImage image = producer.createImage(text); / / save the shiro session ShiroUtils. SetSessionAttribute (the KAPTCHA_SESSION_KEY, text); ServletOutputStream out = response.getOutputStream(); ImageIO.write(image, "jpg", out); } /** * @responseBody@requestMapping (value = "/sys/login", method = RequestMethod.POST) public R login(String username, String password, String captcha) { String kaptcha = ShiroUtils.getKaptcha(Constants.KAPTCHA_SESSION_KEY); if(! Captcha. EqualsIgnoreCase (kaptcha)){return r.ror (" Captcha is not correct "); } try{ Subject subject = ShiroUtils.getSubject(); UsernamePasswordToken token = new UsernamePasswordToken(username, password); //md5+Jiayan subject.login(token); }catch (UnknownAccountException e) { return R.error(e.getMessage()); } the catch (IncorrectCredentialsException e) {return R.e rror (" account or password is not correct "); }catch (LockedAccountException e) {return r.ror (" Account has been locked, please contact your administrator "); }catch (AuthenticationException e) {return r.ror (" account failed to authenticate "); } return R.ok(); } @requestMapping (value = "logout", method = RequestMethod.GET) public String logout() { ShiroUtils.logout(); return "redirect:login.html"; }}Copy the code
Main functions of the administrator:
Classification management:
Commodity Management:
Order Management:
User management;
Main table design:
The users table:
CREATE TABLE `NewTable` ( `user_id` bigint(20) NOT NULL AUTO_INCREMENT , 'username' varchar(50) CHARACTER SET UTf8MB4 COLLATE UTf8MB4_general_ci NOT NULL COMMENT 'username', Varchar (100) CHARACTER SET utf8MB4 COLLATE UTf8MB4_general_ci NULL DEFAULT NULL COMMENT 'password', 'salt' varchar(20) CHARACTER SET utf8MB4 COLLATE UTf8MB4_general_ci NULL DEFAULT NULL COMMENT 'salt', 'email' varchar(100) CHARACTER SET UTf8MB4 COLLATE UTf8MB4_general_ci NULL DEFAULT NULL COMMENT ' 'mobile' varchar(100) CHARACTER SET UTf8MB4 COLLATE UTf8MB4_general_ci NULL DEFAULT NULL COMMENT 'cellphone', 'status' tinyint(4) NULL DEFAULT NULL COMMENT' Create_time datetime NULL DEFAULT NULL COMMENT 'create time', PRIMARY KEY (' user_id '), UNIQUE INDEX `username` (`username`) USING BTREE )Copy the code
The order list:
CREATE TABLE 'NewTable' (' order_id 'bigint(20) NOT NULL AUTO_INCREMENT COMMENT' 表 名 名 ', 'order_no' varchar(20) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT COMMENT ', 'user_id' bigint(20) NOT NULL DEFAULT 0 COMMENT 'total_price' int(11) NOT NULL DEFAULT 1 COMMENT 'total_price', 'pay_status' BIGint (20) NOT NULL DEFAULT 0 COMMENT' Pay status :0. ', 'pay_time' datetime NULL DEFAULT NULL COMMENT 'pay_time', 'order_status' BIGINT (20) NOT NULL DEFAULT 0 COMMENT' Order status :0. To be paid 1. Paid 2. Completed distribution 3: Successful delivery 4. Manual close -2. Timeout close -3. Merchant close ', 'extra_info' varchar(100) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT COMMENT ' 'user_name' varchar(30) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT COMMENT '', 'user_phone' varchar(11) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT COMMENT ', 'user_address' varchar(100) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT ', PRIMARY KEY (`order_id`) )Copy the code
Commodity list:
CREATE TABLE 'NewTable' (' goods_id 'bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT' 表 名 库 iD ', 'goods_name' varchar(200) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT COMMENT ', 'goods_intro' varchar(200) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT COMMENT ', 'goods_category_id' bigint(20) NOT NULL DEFAULT 0 COMMENT 'iD', `goods_cover_img` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '/admin/dist/img/no-img.png' COMMENT '主 体', 'goods_detail_content' text CHARACTER SET utF8 COLLATE UTf8_general_ci NOT NULL COMMENT '主 体', Original_price 'int(11) NOT NULL DEFAULT 1 COMMENT' original_price ', 'selling_price' int(11) NOT NULL DEFAULT 1 COMMENT '表 示', 'tag' varchar(20) CHARACTER SET utf8 COLLATE UTf8_general_ci NOT NULL DEFAULT ', 'goods_SELL_status' tinyint(4) NOT NULL DEFAULT 0 COMMENT' 评 价 值 0- 评 价 1- 评 价 ', 'create_user' int(11) NOT NULL DEFAULT 0 COMMENT 'create_user', PRIMARY KEY (' goods_id ')Copy the code
Relevant system design and implementation recommendations:
Based on Java Springboot + Mybatis film ticket website management system front + background design and implementation
Design and implementation of winery internal management system based on Java SSM Springboot + Mybatis
Design and implementation of intelligent life sharing platform based on JAVA Springboot + Mybatis
Design and realization of epidemic prevention platform based on JAVA Springboot +VUE
Based on Java Springboot + VUE + Redis front and back end separation furniture mall platform system design and implementation