System design based on JAVA SpringBoot and HTML campus second-hand mall

        With the leap of network technology, human social life and modern information technology are showing a trend of continuous integration, such as daily bill payment, online shopping, online learning and entertainment in life. The second-hand trading platform came into being, and its main purpose is to fully exchange people's idle products. You can publish second-hand goods on the trading platform, and then people in need can contact to buy them. It is economical and environmentally friendly, and can develop good qualities that no one will waste.

        The second-hand trading system is a kind of e-commerce. Based on the current domestic second-hand trading market, most of its trading objects are relatively expensive commodities such as houses and cars. Most of the participants are people with certain work experience and economic strength. On university campuses, there are also a large number of idle products among the student population. The value of these products is relatively low, but the market potential cannot be ignored. There are also some second-hand trading channels in existing campuses, but most of them release second-hand commodity information through flea markets or social media, which is highly spontaneous; for both parties to the transaction, there is no reliable guarantee and the range of choices is limited. With the leap of network technology, human social life and modern information technology are showing a trend of continuous integration, such as daily bill payment, online shopping, online learning and entertainment in life.

 

 

Features:

front desk

Registration and login, carousel display;

Product display (hot selling products, new product launch, category selection of products, etc.);

User personal center (modify personal information, view orders, etc.);

Multiple payment methods (virtual payment such as Alipay, WeChat, bank card, etc.);

Backstage

Member management, order management, product editing, category editing, carousel map configuration, hot-selling product management, new product launch management, and recommendation management for you.

 

Technology Introduction:

Java language, SpringBoot framework, maven dependency management, mysql database, HTML page, bootstrap framework.

 

 

 Part of the code display

@Controller
public class GoodsController {

    @Resource
    private NewBeeMallGoodsService newBeeMallGoodsService;
    @Resource
    private NewBeeMallCategoryService newBeeMallCategoryService;

    @GetMapping({"/search", "/search.html"})
    public String searchPage(@RequestParam Map<String, Object> params, HttpServletRequest request) {
        if (StringUtils.isEmpty(params.get("page"))) {
            params.put("page", 1);
        }
        params.put("limit", Constants.GOODS_SEARCH_PAGE_LIMIT);
        //封装分类数据
        if (params.containsKey("goodsCategoryId") && !StringUtils.isEmpty(params.get("goodsCategoryId") + "")) {
            Long categoryId = Long.valueOf(params.get("goodsCategoryId") + "");
            SearchPageCategoryVO searchPageCategoryVO = newBeeMallCategoryService.getCategoriesForSearch(categoryId);
            if (searchPageCategoryVO != null) {
                request.setAttribute("goodsCategoryId", categoryId);
                request.setAttribute("searchPageCategoryVO", searchPageCategoryVO);
            }
        }
        //封装参数供前端回显
        if (params.containsKey("orderBy") && !StringUtils.isEmpty(params.get("orderBy") + "")) {
            request.setAttribute("orderBy", params.get("orderBy") + "");
        }
        String keyword = "";
        //对keyword做过滤 去掉空格
        if (params.containsKey("keyword") && !StringUtils.isEmpty((params.get("keyword") + "").trim())) {
            keyword = params.get("keyword") + "";
        }
        request.setAttribute("keyword", keyword);
        params.put("keyword", keyword);
        //搜索上架状态下的商品
        params.put("goodsSellStatus", Constants.SELL_STATUS_UP);
        //封装商品数据
        PageQueryUtil pageUtil = new PageQueryUtil(params);
        request.setAttribute("pageResult", newBeeMallGoodsService.searchNewBeeMallGoods(pageUtil));
        return "mall/search";
    }

    @GetMapping("/goods/detail/{goodsId}")
    public String detailPage(@PathVariable("goodsId") Long goodsId, HttpServletRequest request) {
        if (goodsId < 1) {
            return "error/error_5xx";
        }
        NewBeeMallGoods goods = newBeeMallGoodsService.getNewBeeMallGoodsById(goodsId);
        if (goods == null) {
            NewBeeMallException.fail(ServiceResultEnum.GOODS_NOT_EXIST.getResult());
        }
        if (Constants.SELL_STATUS_UP != goods.getGoodsSellStatus()) {
            NewBeeMallException.fail(ServiceResultEnum.GOODS_PUT_DOWN.getResult());
        }
        NewBeeMallGoodsDetailVO goodsDetailVO = new NewBeeMallGoodsDetailVO();
        BeanUtil.copyProperties(goods, goodsDetailVO);
        goodsDetailVO.setGoodsCarouselList(goods.getGoodsCarousel().split(","));
        request.setAttribute("goodsDetail", goodsDetailVO);
        return "mall/detail";
    }

}

Based on JAVA SpringBoot and HTML campus second-hand mall design

Guess you like

Origin blog.csdn.net/qq_28245905/article/details/132097567