一、环境信息
开发语言: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,小程序,项目完整可正常运行,提供运行手册及所有环境软件!✌💗
✌💗可按需求来做,您提需求我来做✌💗
👇🏻获取联系方式👇🏻
有需要的小伙伴可以点击下方卡片咨询我哦!!!