当前位置:网站首页>Ssm+mysql second-hand trading website (thesis + source code access link)

Ssm+mysql second-hand trading website (thesis + source code access link)

2022-07-01 05:35:00 Code garden of Azhou

The design of the second-hand trading platform is mainly to solve the problem of dealing with some goods that have no use value to the owner of the goods but have surplus value to the society . From the perspective of the original owner , For such items , Throwing it away directly is a waste of social resources , It will also increase the burden of social waste disposal . If no other factors are taken into account , Sending it out will harm your own interests . From the perspective of the latter user , A good and cheap commodity is very desirable , Especially for students 、 For such proletarians or low-income workers , The existence of second-hand goods is very valuable . Nowadays, the Internet is increasingly developed , The emergence of a second-hand trading platform has high value .

​     This paper is based on SpringMVC+MySQL Second hand trading platform . The system adopts B/S Architecture mode , With Java Language is the basis of development , The main use of SpringMvC+Spring+MyBatis+HTML Build the whole system , The database USES MySQL 5.5.15 edition , The server is Tomcat7, Develop software for IDEA. Distributed file systems are used in assistive technology FastDFS To store uploaded pictures ,Spring Of Security Security framework to achieve the safe login of users ,Apache Of Maven To build the whole project . The system is divided into two modules: front-end and back-end , Front end use HTML+CSS To design the page , encapsulation JavaScript Of angularJS To realize the functions of the front end . There are mainly login registration pages 、 Product browsing page 、 Payment purchase page, etc . The back-end using Java Linguistic ssm Framework to complete the query to the database and the response to the front-end request .

The system can be divided into sellers according to their roles , buyers , Administrators and tourists . Because users can sell their own items while buying goods , So sellers and buyers can be unified into users . User browsable 、 Buy 、 Collect and sell goods, etc . Tourists refer to users who are not logged in or registered , You can only browse products . Administrators can audit users and products , Be responsible for maintaining the whole system .

package com.hsu.controller;

import com.hsu.constant.UserContant;
import com.hsu.entity.Admin;
import com.hsu.entity.User;
import com.hsu.service.Adminservice;
import com.hsu.service.UserService;
import com.hsu.vo.PageResult;
import com.hsu.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Yuchen
 * @create 2021-04-22 22:23
 */
@RestController
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    private Adminservice adminservice;

    @Autowired
    private UserService userService;

    @RequestMapping("login")
    public Result login(@RequestBody Admin admin){
        return adminservice.login(admin);
    }

    @RequestMapping("/UpdateByStatus")
    public Result UpdateByStatus(String username) {

        try{
            userService.UpdateByStatus(username);
            return new Result(true,UserContant.UPDATE_IS_SUCCESS);
        }catch (Exception e){
            e.printStackTrace();
            return new Result(false,UserContant.UPDATE_IS_NOT_SUCCESS);
        }
    }

    @RequestMapping("/findOne")
    public User findOne(String username){
        return userService.findOne(username);
    }

    @RequestMapping("/search")
    public PageResult search(int page, int rows, @RequestBody User user){
        return userService.search(page,rows,user);
    }

    @RequestMapping("/serachAllUser")
    public PageResult serachAllUser(int page, int rows, @RequestBody User user){
        return userService.serachAllUser(page,rows,user);
    }


}

  Second hand trading sites (ssm+mysql) Download link https://gitee.com/wuyanzua/blog-applet

原网站

版权声明
本文为[Code garden of Azhou]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207010530270938.html