《垃圾分类查询管理系统》采用B/S架构,该系统的功能主要包括用户对生活垃圾所属分类的查询功能和管理员对于系统及系统内的垃圾和垃圾分类的管理功能。本系统在系统的设计与开发过程中严格遵守软件工程的规范,运用软件设计模式,从而减少系统模块间的偶合,力求做到系统的稳定性、可重用性和可扩充性。
《垃圾分类查询管理系统》主要功能如下:
(1)用户:
①查询垃圾所属分类:用户可以通过输入相应的垃圾名称来查询该垃圾所属的垃圾分类类别;
(2)管理员:
①登录功能:管理员需要登录后台来完成对网站的管理工作;
②用户管理:管理网站的用户信息,主要针对后台用户(即管理员)的管理;
③系统日志管理:管理网站后台的日志;
④垃圾分类管理:管理垃圾的名称以及各个名称垃圾所属的垃圾分类类别。
效果截图:
数据库设计:
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50717
Source Host : localhost:3306
Source Database : db_rubbish_category
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2020-03-05 20:30:41
*/
SET FOREIGN_KEY_CHECKS=0;
– Table structure for authority
DROP TABLE IF EXISTS authority
;
CREATE TABLE authority
(
id
int(11) NOT NULL AUTO_INCREMENT,
roleId
int(11) NOT NULL,
menuId
int(11) NOT NULL,
PRIMARY KEY (id
),
KEY roleId
(roleId
),
KEY menuId
(menuId
),
CONSTRAINT authority_ibfk_1
FOREIGN KEY (roleId
) REFERENCES role
(id
),
CONSTRAINT authority_ibfk_2
FOREIGN KEY (menuId
) REFERENCES menu
(id
)
) ENGINE=InnoDB AUTO_INCREMENT=241 DEFAULT CHARSET=utf8;
– Records of authority
INSERT INTO authority
VALUES (‘148’, ‘2’, ‘35’);
INSERT INTO authority
VALUES (‘149’, ‘2’, ‘36’);
INSERT INTO authority
VALUES (‘150’, ‘2’, ‘25’);
INSERT INTO authority
VALUES (‘151’, ‘2’, ‘1’);
INSERT INTO authority
VALUES (‘152’, ‘2’, ‘14’);
INSERT INTO authority
VALUES (‘153’, ‘2’, ‘15’);
INSERT INTO authority
VALUES (‘211’, ‘1’, ‘1’);
INSERT INTO authority
VALUES (‘212’, ‘1’, ‘5’);
INSERT INTO authority
VALUES (‘213’, ‘1’, ‘17’);
INSERT INTO authority
VALUES (‘214’, ‘1’, ‘18’);
INSERT INTO authority
VALUES (‘215’, ‘1’, ‘19’);
INSERT INTO authority
VALUES (‘216’, ‘1’, ‘20’);
INSERT INTO authority
VALUES (‘217’, ‘1’, ‘13’);
INSERT INTO authority
VALUES (‘218’, ‘1’, ‘21’);
INSERT INTO authority
VALUES (‘219’, ‘1’, ‘22’);
INSERT INTO authority
VALUES (‘220’, ‘1’, ‘23’);
INSERT INTO authority
VALUES (‘221’, ‘1’, ‘35’);
INSERT INTO authority
VALUES (‘222’, ‘1’, ‘36’);
INSERT INTO authority
VALUES (‘223’, ‘1’, ‘14’);
INSERT INTO authority
VALUES (‘224’, ‘1’, ‘15’);
INSERT INTO authority
VALUES (‘225’, ‘1’, ‘24’);
INSERT INTO authority
VALUES (‘226’, ‘1’, ‘25’);
INSERT INTO authority
VALUES (‘227’, ‘1’, ‘26’);
INSERT INTO authority
VALUES (‘228’, ‘1’, ‘31’);
INSERT INTO authority
VALUES (‘229’, ‘1’, ‘32’);
INSERT INTO authority
VALUES (‘230’, ‘1’, ‘33’);
INSERT INTO authority
VALUES (‘231’, ‘1’, ‘34’);
INSERT INTO authority
VALUES (‘232’, ‘1’, ‘37’);
INSERT INTO authority
VALUES (‘233’, ‘1’, ‘38’);
INSERT INTO authority
VALUES (‘234’, ‘1’, ‘43’);
INSERT INTO authority
VALUES (‘235’, ‘1’, ‘45’);
INSERT INTO authority
VALUES (‘236’, ‘1’, ‘46’);
INSERT INTO authority
VALUES (‘237’, ‘1’, ‘39’);
INSERT INTO authority
VALUES (‘238’, ‘1’, ‘40’);
INSERT INTO authority
VALUES (‘239’, ‘1’, ‘41’);
INSERT INTO authority
VALUES (‘240’, ‘1’, ‘42’);
– Table structure for c3p0testtable
DROP TABLE IF EXISTS c3p0testtable
;
CREATE TABLE c3p0testtable
(
a
char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
– Records of c3p0testtable
– Table structure for log
DROP TABLE IF EXISTS log
;
CREATE TABLE log
(
id
int(11) NOT NULL AUTO_INCREMENT,
content
varchar(255) NOT NULL,
createTime
datetime DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=132 DEFAULT CHARSET=utf8;
– Records of log
INSERT INTO log
VALUES (‘14’, ‘用户名为{admin},角色为{超级管理员}的用户登录成功!’, ‘2018-12-16 18:22:56’);
INSER