基于java开发的会理石榴售卖系统源码

一、环境信息

开发语言:JAVA
JDK版本:JDK8及以上
数据库:MySql5.6及以上
Maven版本:任意版本
操作系统:Windows、macOS
开发工具:Idea、Eclipse、MyEclipse
开发框架:Springboot+HTML+jQuery+Mysql

二、所有选题列表

所有毕业设计选题列表,点击文章结尾下方卡片免费咨询

三、功能介绍

系统分为2个角色,管理员和用户

管理员
1、登录
2、商家管理:用于商品详情展示
3、石榴售卖订单:显示所有石榴订单信息,可以查询
4、石榴信息管理:管理所有石榴信息,可以增删改查
5、石榴评价管理:管理所有用户的评论信息
6、用户管理:管理所有用户信息

网站前台
1、首页:显示主页信息
2、搜索列表:可以搜索石榴信息
3、石榴详情:石榴详情信息,展示商家信息,显示评价信息
5、购物车:当前购物车的商品
6、下单页面,可以确认订单

用户端
1、登录注册
2、个人信息:修改个人信息,修改个人密码
3、我的订单:显示我的订单列表,可以付款,确认收货,订单评价
4、收货地址:可以设置收货地址

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

package com.base.entity;

import com.base.config.Global;
import com.base.config.annotation.EntityProperty;
import com.base.config.base.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

@Entity
@EntityProperty(entityName = "石榴信息")
@Table(name = Global.tableSuff+"goods")
public class Goods  extends BaseEntity {
    @EntityProperty(fieldName = "石榴名称")
    private String goodsName;
    @EntityProperty(fieldName = "石榴图片")
    private String image;
    @EntityProperty(fieldName = "石榴简介")
    private String goodsShortDesc;
    @EntityProperty(fieldName = "石榴库存")
    private Integer goodsCount;
    @EntityProperty(fieldName = "石榴详情")
    @Column(columnDefinition = "LongText")
    private String goodsDetail;
    @EntityProperty(fieldName = "石榴单价")
    private BigDecimal goodsPrice;
    @EntityProperty(fieldName = "所属商家",selectObj="Store",selectObjField = "name")
    private Long selectStoreId;

    @EntityProperty(fieldName = "商家名称")
    private String storeName;

    public Long getSelectStoreId() {
        return selectStoreId;
    }

    public void setSelectStoreId(Long selectStoreId) {
        this.selectStoreId = selectStoreId;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getGoodsShortDesc() {
        return goodsShortDesc;
    }

    public void setGoodsShortDesc(String goodsShortDesc) {
        this.goodsShortDesc = goodsShortDesc;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }


    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Integer getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(Integer goodsCount) {
        this.goodsCount = goodsCount;
    }

    public String getGoodsDetail() {
        return goodsDetail;
    }

    public void setGoodsDetail(String goodsDetail) {
        this.goodsDetail = goodsDetail;
    }

}


package com.base.entity;

import com.base.config.Global;
import com.base.config.annotation.EntityProperty;
import com.base.config.base.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

@Entity
@EntityProperty(entityName = "购物车")
@Table(name = Global.tableSuff+"goodscart")
public class GoodsCart extends BaseEntity {
    @EntityProperty(fieldName = "商品名称")
    private String goodsName;
    @EntityProperty(fieldName = "商品库存")
    private Integer goodsCount;
    @EntityProperty(fieldName = "商品图片")
    private String image;
    @EntityProperty(fieldName = "商品单价")
    private BigDecimal goodsPrice;
    @EntityProperty(fieldName = "购物车价格")
    private BigDecimal cartPrice;
    @EntityProperty(fieldName = "商品id")
    private Long goodsId;
    @EntityProperty(fieldName = "用户id")
    private Long userId;

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public BigDecimal getCartPrice() {
        return cartPrice;
    }

    public void setCartPrice(BigDecimal cartPrice) {
        this.cartPrice = cartPrice;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Integer getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(Integer goodsCount) {
        this.goodsCount = goodsCount;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
}


 /**
     * 查看详情
     *
     * @param mv
     * @param id
     * @return
     */
    @GetMapping(value = "/detail")
    public ModelAndView detail(ModelAndView mv, String id, HttpServletRequest request) {
        User user = null;
        if (request.getSession().getAttribute("user")!=null){
           user =  (User)request.getSession().getAttribute("user");
          mv.addObject("user",user);
        }
        String returnUrl = "/view/index";
        mv.setViewName("redirect:/error?url=" + returnUrl + "&msg=" + CommUtil.encodeUtf8("数据不存在"));
        if (id == null) {
            return mv;
        }
        Goods obj = this.goodsService.getOne(Long.parseLong(id));
        if (obj == null) {
            return mv;
        }
        mv.setViewName(Global.view+ "goodsDetail");
        mv.addObject("obj", obj);

        //评价
        Evaluate eva = new Evaluate();
        eva.setGoodsId(Long.parseLong(id));
        List<Evaluate> evaluateList= this.evaluateService.getList(eva);
        mv.addObject("evaluateList", evaluateList);

        //推荐商品,根据购物车
        List<Long> classIds = new ArrayList<>();
        GoodsCart goodsCart = new GoodsCart();
        if (user != null) {
            goodsCart.setUserId(user.getId());
            List<GoodsCart> goodsCarts = goodsCartService.getList(goodsCart);
            for (GoodsCart obj2 : goodsCarts) {
//                classIds.add(obj2.getGoodsClassId());
            }
        }
        List<Goods> recommends = goodsMapper.selectByExample(getExample(null, classIds));
        mv.addObject("recommendList",recommends);
        Store store = this.storeService.getOne(obj.getSelectStoreId());
        mv.addObject("store",store);
        return mv;
    }

    private Example getExample(Goods obj, List<Long> classIds) {
        Example example = new Example(Goods.class);
        Example.Criteria criteria = example.createCriteria();
        if (classIds.size() > 0) {
            criteria.andIn("selectGoodsClassId", classIds);
        }
        return example;
    }

源码获取

✌💗项目源码全部自研,绝对独此一家,全网找不到一样的源码,不用担心会有重复✌💗

✌💗项目语言为java,使用框架包括springboot,vue,html5,jsp,小程序,项目完整可正常运行,提供运行手册及所有环境软件!✌💗

✌💗可按需求来做,您提需求我来做✌💗

👇🏻获取联系方式👇🏻
有需要的小伙伴可以点击下方卡片咨询我哦!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计算机毕业设计案例

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值