项目介绍:

该系统为全网最新原创,于2021年11月1日完成,有详细数据库设计。基于Java的springboot技术,数据层为MyBatis,数据库使用mysql,MVC模式,B/S架构,具有完整的业务逻辑。

项目技术:

后端:springboot+MyBatis
前端:layui,js,css等
开发工具:idea
数据库:mysql 5.7
JDK版本:jdk1.8
服务器:tomcat8

功能概述:

用户:
登录注册、查看或者分类查看酒水
查看酒水详情及评论,折扣购买
评论、收藏
选择酒水加入购物车,下单
个人订单查看
地址维护

管理员:
登录、用户管理、分类管理、折扣管理、酒水管理、订单管理、快递管理、评价管理、修改密码

部分功能展示:

系统首页

基于SSM的酒水商城系统_前端

 登录:

基于SSM的酒水商城系统_javaweb_02

 分类管理:

基于SSM的酒水商城系统_前端_03

 酒水的详情:

基于SSM的酒水商城系统_java_04

 我的订单:

基于SSM的酒水商城系统_java_05

 我的地址:

基于SSM的酒水商城系统_后端_06

 用户管理:

基于SSM的酒水商城系统_ssm_07

 分类管理:

基于SSM的酒水商城系统_前端_08

 商品管理:

基于SSM的酒水商城系统_前端_09

 折扣维护:

基于SSM的酒水商城系统_ssm_10

部分代码:

/**
    * @Description: 首页
    * @Param: [model, session]
    * @return: java.lang.String
    * @Author: Mr.Wang
    * @Date: 2021/3/14
    */
    @RequestMapping("/main")
    public String showAllGoods(Model model, HttpSession session) {
        Integer userid;
        User user = (User) session.getAttribute("user");
        if (user == null) {
            userid = null;
        } else {
            userid = user.getUserid();
        }

        CategoryExample categoryExample = new CategoryExample();
        categoryExample.setOrderByClause("cateId");
        List<Category> categories = cateService.selectByExample(categoryExample);
        Map<String,List<Goods>> result = new HashMap();
        for(int i = 0;i<categories.size();i++){
            //分类查询
            String name = categories.get(i).getCatename();
            List<Goods> digGoods = getCateGoods(categories.get(i).getCatename(), userid);
            result.put(name,digGoods);
        }
        model.addAttribute("result", result);
        model.addAttribute("categorys", categories);
        model.addAttribute("user", user);

        return "main";
    }

    /**
    * @Description: 根据分类查询
    * @Param: [cate, userid]
    * @return: java.util.List<com.zhang.ssmschoolshop.entity.Goods>
    * @Author: Mr.Wang
    * @Date: 2021/3/14
    */
    public List<Goods> getCateGoods(String cate, Integer userid) {
        //查询分类
        CategoryExample digCategoryExample = new CategoryExample();
        digCategoryExample.or().andCatenameLike(cate);
        List<Category> digCategoryList = cateService.selectByExample(digCategoryExample);

        if (digCategoryList.size() == 0) {
            return null;
        }

        //查询属于刚查到的分类的商品
        GoodsExample digGoodsExample = new GoodsExample();
        List<Integer> digCateId = new ArrayList<Integer>();
        for (Category tmp:digCategoryList) {
            digCateId.add(tmp.getCateid());
        }
        digGoodsExample.or().andCategoryIn(digCateId);
        digGoodsExample.setOrderByClause("goodsId limit 5");
        List<Goods> goodsList = goodsService.selectByExampleLimit(digGoodsExample);

        List<Goods> goodsAndImage = new ArrayList<>();
        //获取每个商品的图片
        for (Goods goods:goodsList) {
            //判断是否为登录状态
            if (userid == null) {
                goods.setFav(false);
            } else {
                Favorite favorite = goodsService.selectFavByKey(new FavoriteKey(userid, goods.getGoodsid()));
                if (favorite == null) {
                    goods.setFav(false);
                } else {
                    goods.setFav(true);
                }
            }

            List<ImagePath> imagePathList = goodsService.findImagePath(goods.getGoodsid());
            goods.setImagePaths(imagePathList);
            goodsAndImage.add(goods);
        }
        return goodsAndImage;
    }

以上就是部分功能展示,从整体上来看,本系统功能是十分完整的,而且也与当前的热点话题关联,界面设计简洁大方,交互友好,数据库设计也很合理,规模适中,比较适合毕业设计和课程设计的相关应用。

好了,今天就到这儿吧,小伙伴们点赞、收藏、评论,一键三连走起呀,下期见~~