Java antique jade trading system based on SSM+JSP

Project Introduction

This thesis mainly introduces the antique jade trade, including the current research status, and the development background involved, and then discusses the design goals of the system, as well as the requirements of the system, as well as the entire design plan, and the system’s The design and implementation are also discussed in detail. Finally, some specific tests are carried out on the antique jade trade.

This article uses java as the development technology, the back end uses the ssm framework, the front end uses the vue technology, and the database uses mysql for data storage. Implemented an antique jade trading system. The main users of the antique jade trading system are divided into users and administrators. The administrator realizes the following functions: home page, personal center, user management, store information management, product classification management, product information management, product identification management, administrator management, system management, order management, front home page: home page, store information, product information , announcement information, personal center, background management, shopping cart, customer service center, users can realize the following functions: home page, personal center, commodity identification management, my collection management and other functions. Through the design of these functional modules, the entire process of the antique jade trading system is basically realized.

Technical introduction

1. Administrator account: abo Password: abo
2. The development environment is Eclipse/idea, the database is mysql, and the Java language is used for development.
3. Configure Tomcat and click the start button to run
4. Modify the database connection src\main\resources\application.yml
5. Maven package version apache-maven-3.3.9.
Development language: Java
Framework: SSM
Front-end framework: vue.js
JDK version: JDK1.8+
Server: tomcat8+
Database tool: Navicat
Development software: idea supports eclipse

Springboot is currently the most popular framework, and its configuration is simpler, making development easier and faster.
The basic structure of Springboot consists of three files, as follows:
src/main/java: program development and main program entry;
src/main/resources: configuration file;
src/test/java: test program.
The database configuration of ssm supports configuration files in two formats by default
1, application.properties
2, application.yaml

Project interface















key code

package com. controller;


import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;

/**
 * Login related
 */
@RequestMapping("users")
@RestController
public class UserController{<!-- -->
\t
@Autowired
private UserService userService;
\t
@Autowired
private TokenService tokenService;

/**
\t * Log in
*/
@IgnoreAuth
@PostMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {<!-- -->
UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
if(user==null || !user.getPassword().equals(password)) {<!-- -->
return R.error("account or password is incorrect");
}
String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
return R.ok().put("token", token);
}
\t
/**
\t * register
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody UserEntity user){<!-- -->
// ValidatorUtils. validateEntity(user);
    if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {<!-- -->
    return R.error("User already exists");
    }
        userService. insert(user);
        return R.ok();
    }

/**
\t * quit
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {<!-- -->
request.getSession().invalidate();
return R.ok("Exit successfully");
}
\t
/**
     * reset Password
     */
    @IgnoreAuth
@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){<!-- -->
    UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
    if(user==null) {<!-- -->
    return R.error("Account does not exist");
    }
    user.setPassword("123456");
        userService. update(user, null);
        return R.ok("The password has been reset to: 123456");
    }
\t
/**
     * list
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,UserEntity user){<!-- -->
        EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
    PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
        return R.ok().put("data", page);
    }

/**
     * list
     */
    @RequestMapping("/list")
    public R list(UserEntity user){<!-- -->
       EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
      ew.allEq(MPUtil.allEQMapPre( user, "user"));
        return R.ok().put("data", userService.selectListView(ew));
    }

    /**
     * information
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){<!-- -->
        UserEntity user = userService. selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * Get the user's session user information
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){<!-- -->
    Long id = (Long)request.getSession().getAttribute("userId");
        UserEntity user = userService. selectById(id);
        return R.ok().put("data", user);
    }

    /**
     * save
     */
    @PostMapping("/save")
    public R save(@RequestBody UserEntity user){<!-- -->
// ValidatorUtils. validateEntity(user);
    if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {<!-- -->
    return R.error("User already exists");
    }
        userService. insert(user);
        return R.ok();
    }

    /**
     * Revise
     */
    @RequestMapping("/update")
    public R update(@RequestBody UserEntity user){<!-- -->
// ValidatorUtils. validateEntity(user);
    UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));
    if(u!=null & amp; & amp; u.getId()!=user.getId() & amp; & amp; u.getUsername().equals(user.getUsername())) {<!-- -->
    return R.error("Username already exists.");
    }
        userService.updateById(user);//Update all
        return R.ok();
    }

    /**
     * delete
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){<!-- -->
        userService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

Table of Contents

Table of contents
Catalog III
1 Introduction 1
1.1 Research Background 1
1.2 Purpose and Significance 1
1.3 Arrangement of paper structure 2
2 Related Technologies 3
2.1 Introduction to Springboot framework 3
2.2 B/S structure introduction 3
2.3 Mysql database introduction 4
3 System Analysis 6
3.1 System feasibility analysis 6
3.1.1 Technical Feasibility Analysis 6
3.1.2 Economic feasibility analysis 6
3.1.3 Operation Feasibility Analysis 6
3.2 System performance analysis 7
3.2.1 Ease of use indicators 7
3.2.2 Scalability metrics 7
3.2.3 Robustness Index 7
3.2.4 Safety indicators 8
3.3 System flow analysis 8
3.3.1 Operation process analysis 8
3.3.2 Login process analysis 9
3.3.3 Information adding process analysis 10
3.3.4 Analysis of information deletion process 11
4 System Design 12
4.1 System outline design 12
4.2 System function structure design 12
4.3 Database Design 13
4.3.1 Database E-R diagram design 13
4.3.2 Database table structure design 14
5 System Implementation 17
5.1 User Part Functions 17
5.2 Some functions of the administrator

6 System Test
6.1 What are the characteristics of system testing?
6.2? System function test
6.2.1 Login function test
6.2.2 Add category functional test
6.3 Analysis of test results
in conclusion
thanks
references