水果生鲜商城销售系统(springboot,vue,mysql)(程序代码,MySQL数据库)
下载链接:https://pan.baidu.com/s/1UBdgzZEnY0r9cHFUyNXxmg 提取码:8888
本项目功能包含前台用户与后台管理员二个角色
【前台用户】登录,注册,首页宣传图,分类展示水果信息,热门商品,网站公告,公告详情,推荐商品,物价商品,全部商品,购物车,
结算中心,收获人信息,我的订单,付款,订单明细,评价订单,用户信息查看和修改,修改密码,我的收藏,意见反馈,我的意见反馈
【管理员用户】登录,管理员列表,批量删除管理员,单个删除管理,网站用户列表,删除用户,批量删除用户,新闻公告列表,添加新闻公告,
删除公告,编辑公告,批量删除公告,商品类型列表,新增商品类型,编辑商品类型,删除商品类型,批量删除商品类型,商品列表,新增商品,编辑商品,
删除商品,批量删除商品,订单列表,发货,删除订单,批量删除订单,订单评价列表,评价删除,评价批量删除,意见反馈列表,删除意见反馈,批量删除意见反馈
部分代码
application.properties
#\u7AEF\u53E3\u53F7\u8BBE\u7F6E
server.port=8080
#\u8BBF\u95EE\u8DEF\u5F84\u8BBE\u7F6E
server.servlet.context-path=/vue_fruit
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=100MB
#\u8BBE\u7F6E\u65E5\u5FD7\u7EA7\u522B
#lv: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. \u9ED8\u8BA4\uFF1AINFO
logging.level.root=INFO
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO
logging.level.org.springframework=DEBUG
logging.level.com.boot.dao.*=DEBUG
#\u5B57\u7B26\u96C6 -\u7528\u4E8E\u89E3\u7801URI\u7684\u5B57\u7B26\u7F16\u7801 \u672C\u8EAB\u9ED8\u8BA4UTF-8
server.tomcat.uri-encoding=UTF-8
#HTTP\u8BF7\u6C42\u548C\u54CD\u5E94\u7684\u5B57\u7B26\u96C6\u3002\u5982\u679C\u672A\u660E\u786E\u8BBE\u7F6E\uFF0C\u5219\u6DFB\u52A0\u5230\u201CContent-Type\u201D\u5934 ;\u672C\u8EAB\u9ED8\u8BA4UTF-8
#spring.http.encoding.charset=UTF-8
#springboot mybatis
#\u52A0\u8F7D mybatis\u914D\u7F6E\u6587\u4EF6
mybatis.config-location = classpath:mybatis.xml
#mybatis.type-aliases-package = com.boot.entity
#\u6570\u636E\u5E93\u8FDE\u63A5\u914D\u7F6E\u6587\u4EF6
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://localhost:3307/vue_fruit?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=UTC
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/vue_fruit?useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=root
IndexController.java
package com.boot.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.boot.entity.Article;
import com.boot.entity.Cart;
import com.boot.entity.Cate;
import com.boot.entity.Complains;
import com.boot.entity.Details;
import com.boot.entity.Fav;
import com.boot.entity.Goods;
import com.boot.entity.Items;
import com.boot.entity.Orders;
import com.boot.entity.Topic;
import com.boot.entity.Users;
import com.boot.service.ArticleService;
import com.boot.service.CartService;
import com.boot.service.CateService;
import com.boot.service.ComplainsService;
import com.boot.service.DetailsService;
import com.boot.service.FavService;
import com.boot.service.GoodsService;
import com.boot.service.OrdersService;
import com.boot.service.TopicService;
import com.boot.service.UsersService;
import com.boot.util.VeDate;
import com.github.pagehelper.Page;
@RestController // 定义为控制器 返回JSON类型数据
@RequestMapping(value = "/index", produces = "application/json; charset=utf-8") // 设置请求路径
@CrossOrigin // 允许跨域访问其资源
public class IndexController extends BaseController {
// @Autowired的作用是自动注入依赖的ServiceBean
@Autowired
private UsersService usersService;
@Autowired
private ArticleService articleService;
@Autowired
private CateService cateService;
@Autowired
private GoodsService goodsService;
@Autowired
private CartService cartService;
@Autowired
private OrdersService ordersService;
@Autowired
private DetailsService detailsService;
@Autowired
private TopicService topicService;
@Autowired
private FavService favService;
@Autowired
private ComplainsService complainsService;
// TODO Auto-generated method stub
// 预处理 获取基础参数
@GetMapping(value = "front.action")
public Map<String, Object> front() {
Map<String, Object> map = new HashMap<String, Object>();
List<Cate> cateList = this.cateService.getAllCate();
map.put("cateList", cateList);
List<Goods> hotList = this.goodsService.getGoodsByHot();
map.put("hotList", hotList);
return map;
}
// 前台首