Spring+SpringMVC+MyBatis+html+BootStrap+Mysql
垃圾分类管理系统采用的是B/S的结构。系统管理员具有小区管理、垃圾分类信息、垃圾站信息、垃圾运输信息、垃圾信息、报修管理,投诉管理等功能。
/*
SQLyog Ultimate v9.30
MySQL - 5.5.40 : Database - zzwy
*********************************************************************
*/
/*!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*/`zzwy` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */;
USE `zzwy`;
/*Table structure for table `fix` */
DROP TABLE IF EXISTS `fix`;
CREATE TABLE `fix` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL COMMENT '报修标题',
`remark` varchar(255) DEFAULT NULL COMMENT '详情',
`user` bigint(20) DEFAULT NULL COMMENT '报修人',
`state` varchar(255) DEFAULT NULL COMMENT '物业完成状态',
`ustate` varchar(255) DEFAULT NULL COMMENT '用户确认状态',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='报修信息';
/*Data for the table `fix` */
insert into `fix`(`id`,`name`,`remark`,`user`,`state`,`ustate`) values (1,'垃圾桶丢失','万科云城米酷西门左边丢失一个垃圾桶',1,'已完成','已完成'),(2,'垃圾桶坏了','碧桂园凤凰城凤馨苑门口垃圾桶坏了',12,'已完成','已完成'),(3,'西门垃圾桶盖子坏了','西门垃圾桶盖子坏了',12,NULL,NULL);
/*Table structure for table `house` */
DROP TABLE IF EXISTS `house`;
CREATE TABLE `house` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL COMMENT '楼栋编号',
`ceng` varchar(255) DEFAULT NULL COMMENT '层数',
`room` int(255) DEFAULT NULL COMMENT '房间数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='楼栋信息';
/*Data for the table `house` */
insert into `house`(`id`,`name`,`ceng`,`room`) values (1,'干垃圾','不可回收',1001),(2,'塑料垃圾','可回收',1002),(3,'纸质垃圾','可回收',1003),(4,'玻璃','可回收',1004),(5,'金属','可回收',1005),(6,'布料','可回收',1006),(7,'厨余垃圾','不可回收',1007),(8,'有害垃圾','不可回收',1008),(9,'其他垃圾','不可回收',1009);
/*Table structure for table `record` */
DROP TABLE IF EXISTS `record`;
CREATE TABLE `record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL COMMENT '收费名称',
`price` varchar(10) DEFAULT NULL COMMENT '金额',
`time` datetime DEFAULT NULL COMMENT '缴费截止时间',
`user` bigint(20) DEFAULT NULL COMMENT '业主',
`remark` varchar(255) DEFAULT NULL COMMENT '说明',
`state` varchar(255) DEFAULT NULL COMMENT '缴费状态',
`gmtTime` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='缴费时间';
/*Data for the table `record` */
insert into `record`(`id`,`name`,`price`,`time`,`user`,`remark`,`state`,`gmtTime`) values (3,'粤A57567','1','2021-01-02 22:49:31',12,'可回收垃圾','已运输','2021-01-02 22:49:31'),(4,'粤A34786','8','2021-01-02 22:49:31',9,'不可回收垃圾','待运输','2021-01-02 22:49:31'),(5,'粤A0456','8','2021-03-13 23:12:27',12,'可回收垃圾','待运输','2021-03-13 23:12:27'),(6,'粤A37652','12','2021-03-13 23:12:40',9,'可回收垃圾','待运输','2021-03-13 23:12:40'),(7,'粤A34532','100','2021-03-13 13:47:57',11,'可回收垃圾','待运输','2021-03-13 13:47:57');
/*Table structure for table `room` */
DROP TABLE IF EXISTS `room`;
CREATE TABLE `room` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL COMMENT '房号',
`house` varchar(255) DEFAULT NULL COMMENT '所属楼栋',
`size` varchar(255) DEFAULT NULL COMMENT '面积',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='房间信息';
/*Data for the table `room` */
insert into `room`(`id`,`name`,`house`,`size`) values (1,'富力站','8','富师傅负责'),(2,'天马垃圾站','1','马师傅负责'),(3,'新沙回收站','2','罗师傅负责'),(4,'敏华垃圾站','3','王师傅负责');
/*Table structure for table `sys_config` */
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`key` varchar(50) DEFAULT NULL COMMENT 'key',
`value` varchar(2000) DEFAULT NULL COMMENT 'value',
`status` tinyint(4) DEFAULT '1' COMMENT '状态 0:隐藏 1:显示',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`),
UNIQUE KEY `key` (`key`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='系统配置信息表';
/*Data for the table `sys_config` */
insert into `sys_config`(`id`,`key`,`value`,`status`,`remark`) values (1,'CLOUD_STORAGE_CONFIG_KEY','{\"aliyunAccessKeyId\":\"\",\"aliyunAccessKeySecret\":\"\",\"aliyunBucketName\":\"\",\"aliyunDomain\":\"\",\"aliyunEndPoint\":\"\",\"aliyunPrefix\":\"\",\"qcloudBucketName\":\"\",\"qcloudDomain\":\"\",\"qcloudPrefix\":\"\",\"qcloudSecretId\":\"\",\"qcloudSecretKey\":\"\",\"qiniuAccessKey\":\"NrgMfABZxWLo5B-YYSjoE8-AZ1EISdi1Z3ubLOeZ\",\"qiniuBucketName\":\"ios-app\",\"qiniuDomain\":\"http://7xqbwh.dl1.z0.glb.clouddn.com\",\"qiniuPrefix\":\"upload\",\"qiniuSecretKey\":\"uIwJHevMRWU0VLxFvgy0tAcOdGqasdtVlJkdy6vV\",\"type\":1}',0,'配置信息');
/*Table structure for table `sys_log` */
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT NULL COMMENT '用户名',
`operation` varchar(50) DEFAULT NULL COMMENT '用户操作',
`method` varchar(200) DEFAULT NULL COMMENT '请求方法',
`params` varchar(5000) DEFAULT NULL COMMENT '请求参数',
`ip` varchar(64) DEFAULT NULL COMMENT 'IP地址',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COMMENT='系统日志';
/*Data for the table `sys_log` */
insert into `sys_log`(`id`,`username`,`operation`,`method`,`params`,`ip`,`create_date`) values (57,'admin','保存用户','com.learn.controller.SysUserController.save()','{\"email\":\"[email protected]\",\"mobile\":\"17562307526\",\"roleIdList\":[1],\"status\":1,\"username\":\"zhangmaowen\"}','127.0.0.1','2019-11-20 19:58:43'),(58,'admin','修改用户','com.learn.controller.SysUserController.update()','{\"createTime\":1549533783000,\"email\":\"[email protected]\",\"mobile\":\"13354260932\",\"roleIdList\":[1],\"status\":1,\"userId\":8,\"username\":\"李胜\"}','127.0.0.1','2019-11-20 21:04:17'),(59,'admin','保存用户','com.learn.controller.SysUserController.save()','{\"email\":\"1447628qq.com\",\"mobile\":\"1234567\",\"roleIdList\":[1],\"status\":1,\"username\":\"张三\"}','127.0.0.1','2019-12-20 21:04:55'),(60,'admin','修改用户','com.learn.controller.SysUserController.update()','{\"createTime\":1550663924000,\"createUserId\":-1,\"email\":\"[email protected]\",\"mobile\":\"17562307526\",\"roleIdList\":[1],\"status\":1,\"userId\":10,\"username\":\"zhangmaowen\"}','127.0.0.1','2019-11-27 15:35:56'),(61,'admin','保存用户','com.learn.controller.SysUserController.save()','{\"email\":\"123\",\"mobile\":\"1213\",\"roleIdList\":[1],\"status\":1,\"username\":\"xia\"}','127.0.0.1','2019-11-26 10:54:34'),(62,'admin1','修改用户','com.learn.controller.SysUserController.update()','{\"createTime\":1555124075000,\"createUserId\":-1,\"email\":\"[email protected]\",\"mobile\":\"13546754567\",\"roleIdList\":[1],\"status\":1,\"userId\":12,\"username\":\"碧桂园凤凰城凤馨苑\"}','0:0:0:0:0:0:0:1','2021-03-13 16:53:39'),(63,'admin1','修改用户','com.learn.controller.SysUserController.update()','{\"createTime\":1550667895000,\"createUserId\":-1,\"email\":\"1447628qq.com\",\"mobile\":\"15676789098\",\"roleIdList\":[1],\"status\":1,\"userId\":11,\"username\":\"万科云城米酷\"}','0:0:0:0:0:0:0:1','2021-03-13 16:54:02'),(64,'admin1','修改用户','com.learn.controller.SysUserController.update()','{\"createTime\":1550663924000,\"createUserId\":-1,\"email\":\"[email protected]\",\"mobile\":\"17562307526\",\"roleIdList\":[1],\"status\":1,\"userId\":10,\"username\":\"敏捷锦绣天伦\"}','0:0:0:0:0:0:0:1','2021-03-13 16:54:28'),(65,'admin1','修改用户','com.learn.controller.SysUserController.update()','{\"createTime\":1550502616000,\"createUserId\":-1,\"email\":\"[email protected]\",\"mobile\":\"13356789876\",\"roleIdList\":[1],\"room\":4,\"roomEntity\":{\"house\":3,\"houseEntity\":{\"ceng\":\"可回收\",\"id\":3,\"name\":\"纸质垃圾\",\"room\":1003},\"id\":4,\"name\":\"水仙里垃圾站\",\"size\":\"校师傅负责\"},\"status\":1,\"userId\":9,\"username\":\"富力金港城东区\"}','0:0:0:0:0:0:0:1','2021-03-13 16:54:49'),(66,'admin1','修改用户','com.learn.controller.SysUserController.update()','{\"createTime\":1549533783000,\"email\":\"[email protected]\",\"mobile\":\"13354260932\",\"roleIdList\":[1],\"status\":1,\"userId\":8,\"username\":\"敏捷华美国际\"}','0:0:0:0:0:0:0:1','2021-03-13 16:55:04');
/*Table structure for table `sys_menu` */
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT,
`parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单ID,一级菜单为0',
`name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
`url` varchar(200) DEFAULT NULL COMMENT '菜单URL',
`perms` varchar(500) DEFAULT NULL COMMENT '授权(多个用逗号分隔,如:user:list,user:create)',
`type` int(11) DEFAULT NULL COMMENT '类型 0:目录 1:菜单 2:按钮',
`icon` varchar(50) DEFAULT NULL COMMENT '菜单图标',
`order_num` int(11) DEFAULT NULL COMMENT '排序',
PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8 COMMENT='菜单管理';
/*Data for the table `sys_menu` */
insert into `sys_menu`(`menu_id`,`parent_id`,`name`,`url`,`perms`,`type`,`icon`,`order_num`) values (1,0,'系统管理',NULL,NULL,0,'fa fa-cog',0),(2,0,'小区管理','sys/user.html',NULL,1,'fa fa-user',1),(3,1,'角色管理','sys/role.html',NULL,1,'fa fa-user-secret',2),(4,1,'菜单管理','sys/menu.html',NULL,1,'fa fa-th-list',3),(15,2,'查看',NULL,'sys:user:list,sys:user:info',2,NULL,0),(16,2,'新增',NULL,'sys:user:save,sys:role:select',2,NULL,0),(17,2,'修改',NULL,'sys:user:update,sys:role:select',2,NULL,0),(18,2,'删除',NULL,'sys:user:delete',2,NULL,0),(19,3,'查看',NULL,'sys:role:list,sys:role:info',2,NULL,0),(20,3,'新增',NULL,'sys:role:save,sys:menu:perms',2,NULL,0),(21,3,'修改',NULL,'sys:role:update,sys:menu:perms',2,NULL,0),(22,3,'删除',NULL,'sys:role:delete',2,NULL,0),(23,4,'查看',NULL,'sys:menu:list,sys:menu:info',2,NULL,0),(24,4,'新增',NULL,'sys:menu:save,sys:menu:select',2,NULL,0),(25,4,'修改',NULL,'sys:menu:update,sys:menu:select',2,NULL,0),(26,4,'删除',NULL,'sys:menu:delete',2,NULL,0),(29,1,'系统日志','sys/log.html','sys:log:list',1,'fa fa-file-text-o',7),(65,0,'垃圾分类信息','admin/house.html',NULL,1,NULL,6),(66,65,'查看',NULL,'house:list,house:info',2,NULL,6),(67,65,'新增',NULL,'house:save',2,NULL,6),(68,65,'修改',NULL,'house:update',2,NULL,6),(69,65,'删除',NULL,'house:delete',2,NULL,6),(70,0,'垃圾站信息','admin/room.html',NULL,1,NULL,6),(71,70,'查看',NULL,'room:list,room:info',2,NULL,6),(72,70,'新增',NULL,'room:save',2,NULL,6),(73,70,'修改',NULL,'room:update',2,NULL,6),(74,70,'删除',NULL,'room:delete',2,NULL,6),(81,0,'垃圾运输信息','admin/record.html',NULL,1,NULL,6),(82,81,'查看',NULL,'record:list,record:info',2,NULL,6),(83,81,'新增',NULL,'record:save',2,NULL,6),(84,81,'修改',NULL,'record:update',2,NULL,6),(85,81,'删除',NULL,'record:delete',2,NULL,6),(86,0,'报修信息','admin/fix.html',NULL,1,NULL,6),(87,86,'查看',NULL,'fix:list,fix:info',2,NULL,6),(88,86,'新增',NULL,'fix:save',2,NULL,6),(89,86,'修改',NULL,'fix:update',2,NULL,6),(90,86,'删除',NULL,'fix:delete',2,NULL,6),(91,0,'报修管理','admin/fixall.html',NULL,1,NULL,6),(92,0,'投诉信息','admin/ts.html',NULL,1,NULL,6),(93,92,'查看',NULL,'ts:list,ts:info',2,NULL,6),(94,92,'新增',NULL,'ts:save',2,NULL,6),(95,92,'修改',NULL,'ts:update',2,NULL,6),(96,92,'删除',NULL,'ts:delete',2,NULL,6),(97,0,'投诉管理','admin/tsall.html',NULL,1,NULL,6);
/*Table structure for table `sys_role` */
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`role_id` bigint(20) NOT NULL AUTO_INCREMENT,
`role_name` varchar(100) DEFAULT NULL COMMENT '角色名称',
`remark` varchar(100) DEFAULT NULL COMMENT '备注',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建者ID',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='角色';
/*Data for the table `sys_role` */
insert into `sys_role`(`role_id`,`role_name`,`remark`,`create_user_id`,`create_time`) values (1,'普通',NULL,1,'2021-03-13 13:47:57'),(2,'系统管理员',NULL,-1,'2021-03-11 13:47:57');
/*Table structure for table `sys_role_menu` */
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
`menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系';
/*Data for the table `sys_role_menu` */
insert into `sys_role_menu`(`id`,`role_id`,`menu_id`) values (108,1,65),(109,1,66),(110,1,70),(111,1,71),(112,1,76),(113,1,77),(114,1,81),(115,1,82),(116,1,86),(117,1,87),(118,1,88),(119,1,89),(120,1,90),(121,1,92),(122,1,93),(123,1,94),(124,1,95),(125,1,96),(126,2,2),(127,2,15),(128,2,16),(129,2,17),(130,2,18),(131,2,65),(132,2,66),(133,2,67),(134,2,68),(135,2,69),(136,2,70),(137,2,71),(138,2,72),(139,2,73),(140,2,74),(141,2,75),(142,2,76),(143,2,77),(144,2,78),(145,2,79),(146,2,80),(147,2,81),(148,2,82),(149,2,83),(150,2,84),(151,2,85),(152,2,91),(153,2,97);
/*Table structure for table `sys_user` */
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`user_id` bigint(20) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL COMMENT '用户名',
`password` varchar(100) DEFAULT NULL COMMENT '密码',
`email` varchar(100) DEFAULT NULL COMMENT '邮箱',
`mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
`status` tinyint(4) DEFAULT NULL COMMENT '状态 0:禁用 1:正常',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建者ID',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`type` varchar(255) DEFAULT NULL,
`room` bigint(20) DEFAULT NULL,
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='系统用户';
/*Data for the table `sys_user` */
insert into `sys_user`(`user_id`,`username`,`password`,`email`,`mobile`,`status`,`create_user_id`,`create_time`,`type`,`room`) values (1,'admin','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','[email protected]','13612345678',1,NULL,'2021-03-11 13:47:57',NULL,NULL),(8,'敏捷华美国际','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','[email protected]','13354260932',1,NULL,'2021-03-11 13:47:57',NULL,NULL),(9,'富力金港城东区','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','[email protected]','13356789876',1,-1,'2021-03-11 13:47:57',NULL,4),(10,'敏捷锦绣天伦','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','[email protected]','17562307526',1,-1,'2021-03-11 13:47:57',NULL,NULL),(11,'万科云城米酷','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','1447628qq.com','15676789098',1,-1,'2021-03-11 13:47:57',NULL,NULL),(12,'碧桂园凤凰城凤馨苑','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','[email protected]','13546754567',1,-1,'2021-03-11 13:47:57',NULL,NULL);
/*Table structure for table `sys_user_role` */
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='用户与角色对应关系';
/*Data for the table `sys_user_role` */
insert into `sys_user_role`(`id`,`user_id`,`role_id`) values (7,1,2),(18,12,1),(19,11,1),(20,10,1),(21,9,1),(22,8,1);
/*Table structure for table `ts` */
DROP TABLE IF EXISTS `ts`;
CREATE TABLE `ts` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL COMMENT '投诉标题',
`content` varchar(255) DEFAULT NULL COMMENT '详情',
`user` bigint(20) DEFAULT NULL COMMENT '投诉人',
`state` varchar(255) DEFAULT NULL COMMENT '物业完成状态',
`ustate` varchar(255) DEFAULT NULL COMMENT '用户确认状态',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='投诉信息';
/*Data for the table `ts` */
insert into `ts`(`id`,`name`,`content`,`user`,`state`,`ustate`) values (2,'垃圾未丢','敏捷华美国际2021年03月09日未收垃圾',9,'已完成','已完成');
/*!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 */;