基于SSM+Vue的网上花店系统

末尾获取源码

开发语言:Java

Java开发工具:JDK1.8

后端框架:SSM

前端:采用Vue技术开发

数据库:MySQL5.7和Navicat管理工具结合

服务器:Tomcat8.5

开发软件:IDEA / Eclipse

是否Maven项目:是


目录

一、项目简介

二、论文截图

三、系统项目截图

3.1管理员功能实现

3.2用户功能实现

四、核心代码

4.1登录相关

4.2文件上传

4.3封装

4.4sql语句


一、项目简介

网络技术和计算机技术发展至今,已经拥有了深厚的理论基础,并在现实中进行了充分运用,尤其是基于计算机运行的软件更是受到各界的关注。加上现在人们已经步入信息时代,所以对于信息的宣传和管理就很关键。因此鲜花销售信息的管理计算机化,系统化是必要的。设计开发网上花店不仅会节约人力和管理成本,还会安全保存庞大的数据量,对于鲜花销售信息的维护和检索也不需要花费很多时间,非常的便利。

网上花店是在MySQL中建立数据表保存信息,运用SSM+Vue框架和Java语言编写。并按照软件设计开发流程进行设计实现。系统具备友好性且功能完善。管理员登录进入本人后台之后,主要完成花材选择管理,用户管理,鲜花管理,鲜花出入库管理,鲜花订单管理等。用户联系客服咨询问题,查看鲜花,可以收藏,购买,评论鲜花,支付订单,管理个人订单等。

网上花店在让鲜花销售信息规范化的同时,也能及时通过数据输入的有效性规则检测出错误数据,让数据的录入达到准确性的目的,进而提升网上花店提供的数据的可靠性,让系统数据的错误率降至最低。


二、论文截图


三、系统项目截图

3.1管理员功能实现

管理员权限中的花材选择管理,其运行效果见下图。花材选择管理需要管理员登记花材,删除,修改花材,查询花材等。

管理员权限中的鲜花信息管理,其运行效果见下图。管理员在本模块登记鲜花信息,修改,删除鲜花信息,对鲜花进行出入库管理,查看鲜花评论等。

管理员权限中的鲜花入库管理,其运行效果见下图。已经入库的鲜花信息,管理员可以管理,也能查看,其中的管理包括对入库的鲜花修改,删除,查询等。

管理员权限中的鲜花出库管理,其运行效果见下图。已经出库的鲜花信息,管理员可以管理,也能查看,其中的管理包括对出库的鲜花修改,删除,查询等。

管理员权限中的已完成订单,其运行效果见下图。已完成订单只是订单管理的一部分功能,订单管理包括了已支付订单,未支付订单,取消的订单,已发货订单,已退款订单的管理。在已完成订单页面上,管理员能够直接查看订单详细,查询订单。

3.2用户功能实现

用户权限中的联系客服,其运行效果见下图。用户在操作过程中,可以联系客服咨询鲜花相关信息,客服会指引用户购买鲜花,解答用户疑问。

用户权限中的鲜花信息,其运行效果见下图。用户在本页面可以操作的功能比较多,可以购买,收藏,评论鲜花,可以添加鲜花至购物车。

用户权限中的购买鲜花,其运行效果见下图。用户直接购买鲜花,就会进入下面的操作页面,用户选择地址,进行支付即可。

用户权限中的我的订单,其运行效果见下图。用户已支付订单,可以在我的订单模块中,在已支付栏下面查看订单,也能进行订单退款。


四、核心代码

4.1登录相关

java 复制代码
package com.controller;


import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;

/**
 * 登录相关
 */
@RequestMapping("users")
@RestController
public class UserController{
	
	@Autowired
	private UserService userService;
	
	@Autowired
	private TokenService tokenService;

	/**
	 * 登录
	 */
	@IgnoreAuth
	@PostMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
		if(user==null || !user.getPassword().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
		return R.ok().put("token", token);
	}
	
	/**
	 * 注册
	 */
	@IgnoreAuth
	@PostMapping(value = "/register")
	public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

	/**
	 * 退出
	 */
	@GetMapping(value = "logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setPassword("123456");
        userService.update(user,null);
        return R.ok("密码已重置为:123456");
    }
	
	/**
     * 列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,UserEntity user){
        EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
    	PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/list")
    public R list( UserEntity user){
       	EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
      	ew.allEq(MPUtil.allEQMapPre( user, "user")); 
        return R.ok().put("data", userService.selectListView(ew));
    }

    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }

    /**
     * 保存
     */
    @PostMapping("/save")
    public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);
        userService.updateById(user);//全部更新
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        userService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

4.2文件上传

java 复制代码
package com.controller;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;

/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public ResponseEntity<byte[]> download(@RequestParam String fileName) {
		try {
			File path = new File(ResourceUtils.getURL("classpath:static").getPath());
			if(!path.exists()) {
			    path = new File("");
			}
			File upload = new File(path.getAbsolutePath(),"/upload/");
			if(!upload.exists()) {
			    upload.mkdirs();
			}
			File file = new File(upload.getAbsolutePath()+"/"+fileName);
			if(file.exists()){
				/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
					getResponse().sendError(403);
				}*/
				HttpHeaders headers = new HttpHeaders();
			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
			    headers.setContentDispositionFormData("attachment", fileName);    
			    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
	}
	
}

4.3封装

java 复制代码
package com.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * 返回数据
 */
public class R extends HashMap<String, Object> {
	private static final long serialVersionUID = 1L;
	
	public R() {
		put("code", 0);
	}
	
	public static R error() {
		return error(500, "未知异常,请联系管理员");
	}
	
	public static R error(String msg) {
		return error(500, msg);
	}
	
	public static R error(int code, String msg) {
		R r = new R();
		r.put("code", code);
		r.put("msg", msg);
		return r;
	}

	public static R ok(String msg) {
		R r = new R();
		r.put("msg", msg);
		return r;
	}
	
	public static R ok(Map<String, Object> map) {
		R r = new R();
		r.putAll(map);
		return r;
	}
	
	public static R ok() {
		return new R();
	}

	public R put(String key, Object value) {
		super.put(key, value);
		return this;
	}
}

4.4sql语句

/*
SQLyog Ultimate v11.3 (64 bit)
MySQL - 5.7.32-log : Database - ssm5n2mk
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`ssm5n2mk` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `ssm5n2mk`;

/*Table structure for table `address` */

DROP TABLE IF EXISTS `address`;

CREATE TABLE `address` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `address` varchar(200) NOT NULL COMMENT '地址',
  `name` varchar(200) NOT NULL COMMENT '收货人',
  `phone` varchar(200) NOT NULL COMMENT '电话',
  `isdefault` varchar(200) NOT NULL COMMENT '是否默认地址[是/否]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546786897 DEFAULT CHARSET=utf8 COMMENT='地址';

/*Data for the table `address` */

insert  into `address`(`id`,`addtime`,`userid`,`address`,`name`,`phone`,`isdefault`) values (1,'2021-01-25 11:42:19',1,'宇宙银河系金星1号','金某','13823888881','是'),(2,'2021-01-25 11:42:19',2,'宇宙银河系木星1号','木某','13823888882','是'),(3,'2021-01-25 11:42:19',3,'宇宙银河系水星1号','水某','13823888883','是'),(4,'2021-01-25 11:42:19',4,'宇宙银河系火星1号','火某','13823888884','是'),(5,'2021-01-25 11:42:19',5,'宇宙银河系土星1号','土某','13823888885','是'),(6,'2021-01-25 11:42:19',6,'宇宙银河系月球1号','月某','13823888886','是'),(1611546786896,'2021-01-25 11:53:06',1611546730956,'广东省梅州市梅县区新城街道丽景湾(嘉应西二巷)','1','12312312312','是');

/*Table structure for table `cart` */

DROP TABLE IF EXISTS `cart`;

CREATE TABLE `cart` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `tablename` varchar(200) DEFAULT 'xianhuaxinxi' COMMENT '商品表名',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `goodid` bigint(20) NOT NULL COMMENT '商品id',
  `goodname` varchar(200) DEFAULT NULL COMMENT '商品名称',
  `picture` varchar(200) DEFAULT NULL COMMENT '图片',
  `buynumber` int(11) NOT NULL COMMENT '购买数量',
  `price` float DEFAULT NULL COMMENT '单价',
  `discountprice` float DEFAULT NULL COMMENT '会员价',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546903462 DEFAULT CHARSET=utf8 COMMENT='购物车表';

/*Data for the table `cart` */

/*Table structure for table `chat` */

DROP TABLE IF EXISTS `chat`;

CREATE TABLE `chat` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `adminid` bigint(20) DEFAULT NULL COMMENT '管理员id',
  `ask` longtext COMMENT '提问',
  `reply` longtext COMMENT '回复',
  `isreply` int(11) DEFAULT NULL COMMENT '是否回复',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611547021005 DEFAULT CHARSET=utf8 COMMENT='客服聊天表';

/*Data for the table `chat` */

insert  into `chat`(`id`,`addtime`,`userid`,`adminid`,`ask`,`reply`,`isreply`) values (61,'2021-01-25 11:42:19',1,1,'提问1','回复1',1),(62,'2021-01-25 11:42:19',2,2,'提问2','回复2',2),(63,'2021-01-25 11:42:19',3,3,'提问3','回复3',3),(64,'2021-01-25 11:42:19',4,4,'提问4','回复4',4),(65,'2021-01-25 11:42:19',5,5,'提问5','回复5',5),(66,'2021-01-25 11:42:19',6,6,'提问6','回复6',6),(1611546951493,'2021-01-25 11:55:51',1611546730956,NULL,'在吗',NULL,0),(1611546961573,'2021-01-25 11:56:01',1611546730956,NULL,'优惠券怎么领',NULL,0),(1611547021004,'2021-01-25 11:57:00',1611546730956,1,NULL,'HJRTRY',NULL);

/*Table structure for table `config` */

DROP TABLE IF EXISTS `config`;

CREATE TABLE `config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(100) NOT NULL COMMENT '配置参数名称',
  `value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='配置文件';

/*Data for the table `config` */

insert  into `config`(`id`,`name`,`value`) values (1,'picture1','http://localhost:8080/ssm5n2mk/upload/1611546428898.jpg'),(2,'picture2','http://localhost:8080/ssm5n2mk/upload/1611546438599.jpg'),(3,'picture3','http://localhost:8080/ssm5n2mk/upload/1611546701884.jpg'),(6,'homepage',NULL);

/*Table structure for table `discussxianhuaxinxi` */

DROP TABLE IF EXISTS `discussxianhuaxinxi`;

CREATE TABLE `discussxianhuaxinxi` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `refid` bigint(20) NOT NULL COMMENT '关联表id',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `content` longtext NOT NULL COMMENT '评论内容',
  `reply` longtext COMMENT '回复内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611547054321 DEFAULT CHARSET=utf8 COMMENT='鲜花信息评论表';

/*Data for the table `discussxianhuaxinxi` */

insert  into `discussxianhuaxinxi`(`id`,`addtime`,`refid`,`userid`,`content`,`reply`) values (121,'2021-01-25 11:42:20',1,1,'评论内容1','回复内容1'),(122,'2021-01-25 11:42:20',2,2,'评论内容2','回复内容2'),(123,'2021-01-25 11:42:20',3,3,'评论内容3','回复内容3'),(124,'2021-01-25 11:42:20',4,4,'评论内容4','回复内容4'),(125,'2021-01-25 11:42:20',5,5,'评论内容5','回复内容5'),(126,'2021-01-25 11:42:20',6,6,'评论内容6','回复内容6'),(1611547054320,'2021-01-25 11:57:34',1611546568410,1611546730956,'很不错的花',NULL);

/*Table structure for table `huacaixuanze` */

DROP TABLE IF EXISTS `huacaixuanze`;

CREATE TABLE `huacaixuanze` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `huacaixuanze` varchar(200) NOT NULL COMMENT '花材选择',
  PRIMARY KEY (`id`),
  UNIQUE KEY `huacaixuanze` (`huacaixuanze`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546509818 DEFAULT CHARSET=utf8 COMMENT='花材选择';

/*Data for the table `huacaixuanze` */

insert  into `huacaixuanze`(`id`,`addtime`,`huacaixuanze`) values (21,'2021-01-25 11:42:19','花材选择1'),(22,'2021-01-25 11:42:19','花材选择2'),(23,'2021-01-25 11:42:19','花材选择3'),(24,'2021-01-25 11:42:19','花材选择4'),(26,'2021-01-25 11:42:19','蓝色妖姬'),(1611546509817,'2021-01-25 11:48:28','白玫瑰');

/*Table structure for table `news` */

DROP TABLE IF EXISTS `news`;

CREATE TABLE `news` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `title` varchar(200) NOT NULL COMMENT '标题',
  `introduction` longtext COMMENT '简介',
  `picture` varchar(200) NOT NULL COMMENT '图片',
  `content` longtext NOT NULL COMMENT '内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546692085 DEFAULT CHARSET=utf8 COMMENT='鲜花资讯';

/*Data for the table `news` */

insert  into `news`(`id`,`addtime`,`title`,`introduction`,`picture`,`content`) values (111,'2021-01-25 11:42:19','标题1','简介1','http://localhost:8080/ssm5n2mk/upload/1611546379920.jpg','<p>内容1</p>'),(112,'2021-01-25 11:42:19','标题2','简介2','http://localhost:8080/ssm5n2mk/upload/1611546390190.jpg','<p>内容2</p>'),(113,'2021-01-25 11:42:19','标题3','简介3','http://localhost:8080/ssm5n2mk/upload/news_picture3.jpg','内容3'),(114,'2021-01-25 11:42:19','标题4','简介4','http://localhost:8080/ssm5n2mk/upload/1611546402088.jpg','<p>内容4</p>'),(115,'2021-01-25 11:42:19','标题5','简介5','http://localhost:8080/ssm5n2mk/upload/1611546418617.jpg','<p>内容5</p>'),(116,'2021-01-25 11:42:19','标题6','简介6','http://localhost:8080/ssm5n2mk/upload/news_picture6.jpg','内容6'),(1611546692084,'2021-01-25 11:51:31','优惠资讯','优惠活动','http://localhost:8080/ssm5n2mk/upload/1611546678641.jpg','<p>活动内容</p><p><img src=\"http://localhost:8080/ssm5n2mk/upload/1611546690489.jpg\"></p>');

/*Table structure for table `orders` */

DROP TABLE IF EXISTS `orders`;

CREATE TABLE `orders` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `orderid` varchar(200) NOT NULL COMMENT '订单编号',
  `tablename` varchar(200) DEFAULT 'xianhuaxinxi' COMMENT '商品表名',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `goodid` bigint(20) NOT NULL COMMENT '商品id',
  `goodname` varchar(200) DEFAULT NULL COMMENT '商品名称',
  `picture` varchar(200) DEFAULT NULL COMMENT '商品图片',
  `buynumber` int(11) NOT NULL COMMENT '购买数量',
  `price` float NOT NULL DEFAULT '0' COMMENT '价格/积分',
  `discountprice` float DEFAULT '0' COMMENT '折扣价格',
  `total` float NOT NULL DEFAULT '0' COMMENT '总价格/总积分',
  `discounttotal` float DEFAULT '0' COMMENT '折扣总价格',
  `type` int(11) DEFAULT '1' COMMENT '支付类型',
  `status` varchar(200) DEFAULT NULL COMMENT '状态',
  `address` varchar(200) DEFAULT NULL COMMENT '地址',
  PRIMARY KEY (`id`),
  UNIQUE KEY `orderid` (`orderid`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546932996 DEFAULT CHARSET=utf8 COMMENT='订单';

/*Data for the table `orders` */

insert  into `orders`(`id`,`addtime`,`orderid`,`tablename`,`userid`,`goodid`,`goodname`,`picture`,`buynumber`,`price`,`discountprice`,`total`,`discounttotal`,`type`,`status`,`address`) values (1611546932995,'2021-01-25 11:55:32','20211251155275163926','xianhuaxinxi',1611546730956,1611546568410,'白玫瑰花束','http://localhost:8080/ssm5n2mk/upload/1611546536278.jpg',1,520,520,520,520,1,'已完成','广东省梅州市梅县区新城街道丽景湾(嘉应西二巷)');

/*Table structure for table `storeup` */

DROP TABLE IF EXISTS `storeup`;

CREATE TABLE `storeup` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `refid` bigint(20) DEFAULT NULL COMMENT '收藏id',
  `tablename` varchar(200) DEFAULT NULL COMMENT '表名',
  `name` varchar(200) NOT NULL COMMENT '收藏名称',
  `picture` varchar(200) NOT NULL COMMENT '收藏图片',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546915119 DEFAULT CHARSET=utf8 COMMENT='收藏表';

/*Data for the table `storeup` */

insert  into `storeup`(`id`,`addtime`,`userid`,`refid`,`tablename`,`name`,`picture`) values (1611546871926,'2021-01-25 11:54:31',1611546730956,1611546568410,'xianhuaxinxi','白玫瑰花束','http://localhost:8080/ssm5n2mk/upload/1611546536278.jpg'),(1611546915118,'2021-01-25 11:55:14',1611546730956,36,'xianhuaxinxi','鲜花名称6','http://localhost:8080/ssm5n2mk/upload/1611546364108.jpg');

/*Table structure for table `token` */

DROP TABLE IF EXISTS `token`;

CREATE TABLE `token` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `tablename` varchar(100) DEFAULT NULL COMMENT '表名',
  `role` varchar(100) DEFAULT NULL COMMENT '角色',
  `token` varchar(200) NOT NULL COMMENT '密码',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  `expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='token表';

/*Data for the table `token` */

insert  into `token`(`id`,`userid`,`username`,`tablename`,`role`,`token`,`addtime`,`expiratedtime`) values (1,1,'abo','users','管理员','28d1e6lymklwwdglv7r3rgckkormj6c2','2021-01-25 11:44:06','2021-01-25 12:56:13'),(2,1611546730956,'1','yonghu','用户','ccbp71gdyn9y2unb0yj8338zspj3duqk','2021-01-25 11:52:16','2021-01-25 12:57:10');

/*Table structure for table `users` */

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `role` varchar(100) DEFAULT '管理员' COMMENT '角色',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';

/*Data for the table `users` */

insert  into `users`(`id`,`username`,`password`,`role`,`addtime`) values (1,'abo','aboo','管理员','2021-01-25 11:42:20');

/*Table structure for table `xianhuachuku` */

DROP TABLE IF EXISTS `xianhuachuku`;

CREATE TABLE `xianhuachuku` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `xianhuamingcheng` varchar(200) DEFAULT NULL COMMENT '鲜花名称',
  `huacaixuanze` varchar(200) DEFAULT NULL COMMENT '花材选择',
  `shuliang` int(11) DEFAULT NULL COMMENT '数量',
  `dengjishijian` date DEFAULT NULL COMMENT '登记时间',
  `beizhu` varchar(200) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546996676 DEFAULT CHARSET=utf8 COMMENT='鲜花出库';

/*Data for the table `xianhuachuku` */

insert  into `xianhuachuku`(`id`,`addtime`,`xianhuamingcheng`,`huacaixuanze`,`shuliang`,`dengjishijian`,`beizhu`) values (51,'2021-01-25 11:42:19','鲜花名称1','花材选择1',1,'2021-01-25','备注1'),(52,'2021-01-25 11:42:19','鲜花名称2','花材选择2',2,'2021-01-25','备注2'),(53,'2021-01-25 11:42:19','鲜花名称3','花材选择3',3,'2021-01-25','备注3'),(54,'2021-01-25 11:42:19','鲜花名称4','花材选择4',4,'2021-01-25','备注4'),(55,'2021-01-25 11:42:19','鲜花名称5','花材选择5',5,'2021-01-25','备注5'),(56,'2021-01-25 11:42:19','鲜花名称6','花材选择6',6,'2021-01-25','备注6'),(1611546590764,'2021-01-25 11:49:50','白玫瑰花束','白玫瑰',2,'2021-01-25','销售出库gfr'),(1611546996675,'2021-01-25 11:56:36','白玫瑰花束','白玫瑰',1,'2021-01-30','');

/*Table structure for table `xianhuaruku` */

DROP TABLE IF EXISTS `xianhuaruku`;

CREATE TABLE `xianhuaruku` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `xianhuamingcheng` varchar(200) DEFAULT NULL COMMENT '鲜花名称',
  `huacaixuanze` varchar(200) DEFAULT NULL COMMENT '花材选择',
  `shuliang` int(11) DEFAULT NULL COMMENT '数量',
  `dengjishijian` date DEFAULT NULL COMMENT '登记时间',
  `beizhu` varchar(200) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546579672 DEFAULT CHARSET=utf8 COMMENT='鲜花入库';

/*Data for the table `xianhuaruku` */

insert  into `xianhuaruku`(`id`,`addtime`,`xianhuamingcheng`,`huacaixuanze`,`shuliang`,`dengjishijian`,`beizhu`) values (41,'2021-01-25 11:42:19','鲜花名称1','花材选择1',1,'2021-01-25','备注1'),(42,'2021-01-25 11:42:19','鲜花名称2','花材选择2',2,'2021-01-25','备注2'),(43,'2021-01-25 11:42:19','鲜花名称3','花材选择3',3,'2021-01-25','备注3'),(44,'2021-01-25 11:42:19','鲜花名称4','花材选择4',4,'2021-01-25','备注4'),(45,'2021-01-25 11:42:19','鲜花名称5','花材选择5',5,'2021-01-25','备注5'),(46,'2021-01-25 11:42:19','鲜花名称6','花材选择6',6,'2021-01-25','备注6'),(1611546579671,'2021-01-25 11:49:38','白玫瑰花束','白玫瑰',50,'2021-01-25','');

/*Table structure for table `xianhuaxinxi` */

DROP TABLE IF EXISTS `xianhuaxinxi`;

CREATE TABLE `xianhuaxinxi` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `xianhuamingcheng` varchar(200) NOT NULL COMMENT '鲜花名称',
  `huacaixuanze` varchar(200) NOT NULL COMMENT '花材选择',
  `tupian` varchar(200) DEFAULT NULL COMMENT '图片',
  `cailiao` varchar(200) DEFAULT NULL COMMENT '材料',
  `huayu` varchar(200) DEFAULT NULL COMMENT '花语',
  `xianhuayongtu` varchar(200) DEFAULT NULL COMMENT '鲜花用途',
  `zengsongduixiang` varchar(200) DEFAULT NULL COMMENT '赠送对象',
  `shuliang` int(11) DEFAULT NULL COMMENT '数量',
  `xianhuaxiangqing` longtext COMMENT '鲜花详情',
  `clicktime` datetime DEFAULT NULL COMMENT '最近点击时间',
  `clicknum` int(11) DEFAULT '0' COMMENT '点击次数',
  `price` float NOT NULL COMMENT '价格',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546568411 DEFAULT CHARSET=utf8 COMMENT='鲜花信息';

/*Data for the table `xianhuaxinxi` */

insert  into `xianhuaxinxi`(`id`,`addtime`,`xianhuamingcheng`,`huacaixuanze`,`tupian`,`cailiao`,`huayu`,`xianhuayongtu`,`zengsongduixiang`,`shuliang`,`xianhuaxiangqing`,`clicktime`,`clicknum`,`price`) values (31,'2021-01-25 11:42:19','鲜花名称1','花材选择1','http://localhost:8080/ssm5n2mk/upload/xianhuaxinxi_tupian1.jpg','材料1','花语1','爱情','恋人',1,'鲜花详情1','2021-01-25 11:44:11',2,99.9),(32,'2021-01-25 11:42:19','鲜花名称2','花材选择2','http://localhost:8080/ssm5n2mk/upload/1611546319379.jpg','材料2','花语2','爱情','恋人',2,'<p>鲜花详情2</p>','2021-01-25 11:47:40',4,99.9),(33,'2021-01-25 11:42:19','鲜花名称3','花材选择3','http://localhost:8080/ssm5n2mk/upload/1611546329249.jpg','材料3','花语3','爱情','恋人',3,'<p>鲜花详情3</p>','2021-01-25 11:45:23',4,99.9),(34,'2021-01-25 11:42:19','鲜花名称4','花材选择4','http://localhost:8080/ssm5n2mk/upload/1611546340405.jpg','材料4','花语4','爱情','恋人',4,'<p>鲜花详情4</p>','2021-01-25 11:45:34',5,99.9),(35,'2021-01-25 11:42:19','鲜花名称5','花材选择5','http://localhost:8080/ssm5n2mk/upload/1611546351657.jpg','材料5','花语5','爱情','恋人',5,'<p>鲜花详情5</p>','2021-01-25 11:53:47',10,99.9),(36,'2021-01-25 11:42:19','鲜花名称6','花材选择6','http://localhost:8080/ssm5n2mk/upload/1611546364108.jpg','材料6','花语6','爱情','恋人',6,'<p>鲜花详情6</p>','2021-01-25 11:55:13',9,99.9),(1611546568410,'2021-01-25 11:49:28','白玫瑰花束','白玫瑰','http://localhost:8080/ssm5n2mk/upload/1611546536278.jpg','白玫瑰33支,尤加利点缀','相恋一生','爱情','恋人',147,'<p>鲜花详情</p><p><img src=\"http://localhost:8080/ssm5n2mk/upload/1611546566625.jpg\"></p>','2021-01-25 13:14:48',6,520);

/*Table structure for table `yonghu` */

DROP TABLE IF EXISTS `yonghu`;

CREATE TABLE `yonghu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `yonghuming` varchar(200) NOT NULL COMMENT '用户名',
  `mima` varchar(200) NOT NULL COMMENT '密码',
  `xingming` varchar(200) DEFAULT NULL COMMENT '姓名',
  `xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
  `touxiang` varchar(200) DEFAULT NULL COMMENT '头像',
  `lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
  `dizhi` varchar(200) DEFAULT NULL COMMENT '地址',
  `money` float DEFAULT '0' COMMENT '余额',
  PRIMARY KEY (`id`),
  UNIQUE KEY `yonghuming` (`yonghuming`)
) ENGINE=InnoDB AUTO_INCREMENT=1611546730957 DEFAULT CHARSET=utf8 COMMENT='用户';

/*Data for the table `yonghu` */

insert  into `yonghu`(`id`,`addtime`,`yonghuming`,`mima`,`xingming`,`xingbie`,`touxiang`,`lianxidianhua`,`dizhi`,`money`) values (11,'2021-01-25 11:42:19','用户1','123456','姓名1','男','http://localhost:8080/ssm5n2mk/upload/yonghu_touxiang1.jpg','13823888881','地址1',100),(12,'2021-01-25 11:42:19','用户2','123456','姓名2','男','http://localhost:8080/ssm5n2mk/upload/yonghu_touxiang2.jpg','13823888882','地址2',100),(13,'2021-01-25 11:42:19','用户3','123456','姓名3','男','http://localhost:8080/ssm5n2mk/upload/yonghu_touxiang3.jpg','13823888883','地址3',100),(14,'2021-01-25 11:42:19','用户4','123456','姓名4','男','http://localhost:8080/ssm5n2mk/upload/yonghu_touxiang4.jpg','13823888884','地址4',100),(15,'2021-01-25 11:42:19','用户5','123456','姓名5','男','http://localhost:8080/ssm5n2mk/upload/yonghu_touxiang5.jpg','13823888885','地址5',100),(16,'2021-01-25 11:42:19','用户6','123456','姓名6','男','http://localhost:8080/ssm5n2mk/upload/yonghu_touxiang6.jpg','13823888886','地址6',100),(1611546730956,'2021-01-25 11:52:10','1','1','陈一','男','http://localhost:8080/ssm5n2mk/upload/1611546753317.jpg','12312312312','HJFHDJTFYG',1480);

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
相关推荐
半开半落2 分钟前
nuxt3安装pinia报错500[vite-node] [ERR_LOAD_URL]问题解决
前端·javascript·vue.js·nuxt
周全全5 分钟前
MySQL报错解决:The user specified as a definer (‘root‘@‘%‘) does not exist
android·数据库·mysql
白云如幻9 分钟前
MySQL的分组函数
数据库·mysql
百事老饼干9 分钟前
Java[面试题]-真实面试
java·开发语言·面试
customer0817 分钟前
【开源免费】基于SpringBoot+Vue.JS医院管理系统(JAVA毕业设计)
java·vue.js·spring boot·后端·spring cloud·开源·intellij-idea
荒川之神25 分钟前
ORACLE 闪回技术简介
数据库·oracle
2402_8575893627 分钟前
SpringBoot框架:作业管理技术新解
java·spring boot·后端
理想不理想v29 分钟前
vue经典前端面试题
前端·javascript·vue.js