[Recommended topics for computer majors] Java-based bidding system for campus idle items

Author’s homepage: Computer graduate IT treasure
Wonderful column recommended subscription: In the column below ?

Java practical project

Article directory

    • Java practical projects
  • 1. Project introduction
  • 2. Introduction to project functions
  • 3. Development environment
  • 4. Project display
  • 5. Code display
  • 6. Project Summary
    • Everyone can like, collect, follow, and leave messages if you have any questions

1. Project introduction

With the rapid development of modern society, people’s life pace is getting faster and faster, and their consumption concepts are also constantly changing. On campus, students’ consumption power is gradually improving, and their purchasing power is constantly increasing, but at the same time, a large number of idle items are also produced. These items are often discarded or left idle, which not only takes up a lot of space, but also causes a waste of resources. Therefore, establishing a platform that allows students to easily trade idle items has become an urgent problem that needs to be solved.

2. Introduction to project functions

Administrator role:

User management: Administrators can add, edit, and delete user information, including basic information such as user name, password, and email address, as well as set and manage user permissions.
Item type management: Administrators can add, edit and delete different types of items, such as books, electronic products, daily necessities, etc., and classify and manage item types.
Item information management: Administrators can review, edit and delete item information uploaded by users to ensure the accuracy and legality of item information.
Campus information management: Administrators can publish, edit and delete campus news, activities, announcements and other information to keep users informed of campus dynamics.
Order management: Administrators can view, review and process order information, including order status, logistics information, etc., to ensure the smooth progress of transactions.
User role:

Registration: Users can register by filling in personal information and set a password and personalized personal center.
Login: Users can use registration information to log in to the system and view and manage their item information and order information at any time.
Personal Center: The user’s personal center can display personal information, item information, order information, etc., to facilitate users to manage personal information.
Browse item information: Users can browse idle item information of different types and statuses in the system, and can filter and search items.
Campus information: Users can view campus information in the system and learn about campus news and announcements in a timely manner.
Order information: Users can view and manage order information in the personal center, including order status, logistics information, etc., to facilitate tracking and management.

3. Development environment

  • Development language: Java
  • Database: MySQL
  • System architecture: B/S
  • Backend: ssm
  • Front-end: jsp
  • Tools: IDEA or Eclipse, JDK1.8, Maven

4. Project display

Login module:

Home page module:


Administrator module:

5. Code display

 @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,CartEntity cart, HttpServletRequest request){<!-- -->
    if(!request.getSession().getAttribute("role").toString().equals("Administrator")) {<!-- -->
    cart.setUserid((Long)request.getSession().getAttribute("userId"));
    }

        EntityWrapper<CartEntity> ew = new EntityWrapper<CartEntity>();
PageUtils page = cartService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cart), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * Frontend list
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,CartEntity cart, HttpServletRequest request){<!-- -->
        EntityWrapper<CartEntity> ew = new EntityWrapper<CartEntity>();
PageUtils page = cartService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cart), params), params));
        return R.ok().put("data", page);
    }

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

/**
     * Inquire
     */
    @RequestMapping("/query")
    public R query(CartEntity cart){<!-- -->
        EntityWrapper<CartEntity> ew = new EntityWrapper<CartEntity>();
 ew.allEq(MPUtil.allEQMapPre( cart, "cart"));
CartView cartView = cartService.selectView(ew);
return R.ok("query shopping cart table successfully").put("data", cartView);
    }
\t
    /**
     * Backend details
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){<!-- -->
        CartEntity cart = cartService.selectById(id);
        return R.ok().put("data", cart);
    }

    /**
     * Front-end details
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){<!-- -->
        CartEntity cart = cartService.selectById(id);
        return R.ok().put("data", cart);
    }
    



    /**
     * Backend save
     */
    @RequestMapping("/save")
    public R save(@RequestBody CartEntity cart, HttpServletRequest request){<!-- -->
    cart.setId(new Date().getTime() + new Double(Math.floor(Math.random()*1000)).longValue());
    //ValidatorUtils.validateEntity(cart);
    cart.setUserid((Long)request.getSession().getAttribute("userId"));

        cartService.insert(cart);
        return R.ok();
    }
    
    /**
     * Front-end save
     */
    @RequestMapping("/add")
    public R add(@RequestBody CartEntity cart, HttpServletRequest request){<!-- -->
    cart.setId(new Date().getTime() + new Double(Math.floor(Math.random()*1000)).longValue());
    //ValidatorUtils.validateEntity(cart);

        cartService.insert(cart);
        return R.ok();
    }

    /**
     * Revise
     */
    @RequestMapping("/update")
    public R update(@RequestBody CartEntity cart, HttpServletRequest request){<!-- -->
        //ValidatorUtils.validateEntity(cart);
        cartService.updateById(cart);//Update all
        return R.ok();
    }
    

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

6. Project Summary

In the study of the second-hand trading platform for campus idle items, we solved the problems of information asymmetry and low transaction efficiency in the traditional second-hand trading market. By establishing an online platform, buyers and sellers can trade items more conveniently. The results of this study illustrate the necessity and urgency of establishing a second-hand trading platform for campus idle items.

By comparing the traditional second-hand trading market with our platform, we found that our platform can match transactions more effectively and improve transaction efficiency. At the same time, our platform also has a more flexible transaction method and a more complete trust mechanism, which can better meet the needs of users. Therefore, our research solves the problems faced by the traditional second-hand trading market and improves transaction efficiency and user satisfaction.

Everyone can like, collect, follow, and leave messages if you have any questions

syntaxbug.com © 2021 All Rights Reserved.