小程序开发说明
开发语言:Java 框架:ssm JDK版本:JDK1.8 服务器:tomcat7 数据库:mysql 5.7(一定要5.7版本) 数据库工具:Navicat11 开发软件:eclipse/myeclipse/idea Maven包:Maven3.3.9 浏览器:谷歌浏览器
小程序框架:uniapp 小程序开发软件:HBuilder X 小程序运行软件:微信开发者
关键代码:
DROP TABLE IF EXISTS config
;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/!40101 SET character_set_client = utf8 /;
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=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';
/!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table config
--
LOCK TABLES config
WRITE;
/*!40000 ALTER TABLE config
DISABLE KEYS /;
INSERT INTO config
VALUES (1,'picture1','upload/picture1.jpg'),(2,'picture2','upload/picture2.jpg'),(3,'picture3','upload/picture3.jpg');
/!40000 ALTER TABLE config
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table discussshipinkecheng
--
DROP TABLE IF EXISTS discussshipinkecheng
;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/!40101 SET character_set_client = utf8 /;
CREATE TABLE discussshipinkecheng
(
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',
nickname
varchar(200) DEFAULT NULL COMMENT '用户名',
content
longtext NOT NULL COMMENT '评论内容',
reply
longtext COMMENT '回复内容',
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8 COMMENT='视频课程评论表';
/!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table discussshipinkecheng
--
LOCK TABLES discussshipinkecheng
WRITE;
/*!40000 ALTER TABLE discussshipinkecheng
DISABLE KEYS /;
INSERT INTO discussshipinkecheng
VALUES (111,'2022-02-21 08:35:17',1,1,'用户名1','评论内容1','回复内容1'),(112,'2022-02-21 08:35:17',2,2,'用户名2','评论内容2','回复内容2'),(113,'2022-02-21 08:35:17',3,3,'用户名3','评论内容3','回复内容3'),(114,'2022-02-21 08:35:17',4,4,'用户名4','评论内容4','回复内容4'),(115,'2022-02-21 08:35:17',5,5,'用户名5','评论内容5','回复内容5'),(116,'2022-02-21 08:35:17',6,6,'用户名6','评论内容6','回复内容6');
/!40000 ALTER TABLE discussshipinkecheng
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table exampaper
--
DROP TABLE IF EXISTS exampaper
;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/!40101 SET character_set_client = utf8 /;
CREATE TABLE exampaper
(
id
bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
addtime
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
name
varchar(200) NOT NULL COMMENT '知识测卷名称',
time
int(11) NOT NULL COMMENT '考试时长(分钟)',
status
int(11) NOT NULL DEFAULT '0' COMMENT '知识测卷状态',
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='知识测卷表';
/!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table exampaper
--
LOCK TABLES exampaper
WRITE;
/*!40000 ALTER TABLE exampaper
DISABLE KEYS /;
INSERT INTO exampaper
VALUES (1,'2022-02-21 08:35:17','十万个为什么',60,1);
/!40000 ALTER TABLE exampaper
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table examquestion
--
DROP TABLE IF EXISTS examquestion
;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/!40101 SET character_set_client = utf8 /;
CREATE TABLE examquestion
(
id
bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
addtime
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
paperid
bigint(20) NOT NULL COMMENT '所属知识测卷id(外键)',
papername
varchar(200) NOT NULL COMMENT '知识测卷名称',
questionname
varchar(200) NOT NULL COMMENT '试题名称',
options
longtext COMMENT '选项,json字符串',
score
bigint(20) DEFAULT '0' COMMENT '分值',
answer
varchar(200) DEFAULT NULL COMMENT '正确答案',
analysis
longtext COMMENT '答案解析',
type
bigint(20) DEFAULT '0' COMMENT '试题类型,0:单选题 1:多选题 2:判断题 3:填空题(暂不考虑多项填空)',
sequence
bigint(20) DEFAULT '100' COMMENT '试题排序,值越大排越前面',
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='试题表';
/!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table examquestion
--
LOCK TABLES examquestion
WRITE;
/*!40000 ALTER TABLE examquestion
DISABLE KEYS /;
INSERT INTO examquestion
VALUES (1,'2022-02-21 08:35:17',1,'十万个为什么','下面动物不属于昆虫的是()。','[{\"text\":\"A.苍蝇\",\"code\":\"A\"},{\"text\":\"B.蜜蜂\",\"code\":\"B\"},{\"text\":\"C.蜂鸟\",\"code\":\"C\"}]',20,'C','蜂鸟',0,1),(2,'2022-02-21 08:35:17',1,'十万个为什么','油着火后可以用水扑灭。','[{\"text\":\"A.对\",\"code\":\"A\"},{\"text\":\"B.错\",\"code\":\"B\"}]',20,'B','油着火后不可以用水扑灭',2,2),(3,'2022-02-21 08:35:17',1,'十万个为什么','地球是个球体,中间是( )。','[]',30,'赤道','赤道',3,3),(4,'2022-02-21 08:35:17',1,'十万个为什么','下面动物中会流汗的有( )。','[{\"text\":\"A.马\",\"code\":\"A\"},{\"text\":\"B.猫\",\"code\":\"B\"},{\"text\":\"C.狗\",\"code\":\"C\"}]',30,'A,B','狗不会流汗',1,4);
/!40000 ALTER TABLE examquestion
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table examrecord
--
DROP TABLE IF EXISTS examrecord
;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/!40101 SET character_set_client = utf8 /;
CREATE TABLE examrecord
(
id
bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
addtime
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
userid
bigint(20) NOT NULL COMMENT '用户id',
username
varchar(200) DEFAULT NULL COMMENT '用户名',
paperid
bigint(20) NOT NULL COMMENT '知识测卷id(外键)',
papername
varchar(200) NOT NULL COMMENT '知识测卷名称',
questionid
bigint(20) NOT NULL COMMENT '试题id(外键)',
questionname
varchar(200) NOT NULL COMMENT '试题名称',
options
longtext COMMENT '选项,json字符串',
score
bigint(20) DEFAULT '0' COMMENT '分值',
answer
varchar(200) DEFAULT NULL COMMENT '正确答案',
analysis
longtext COMMENT '答案解析',
myscore
bigint(20) NOT NULL DEFAULT '0' COMMENT '试题得分',
myanswer
varchar(200) DEFAULT NULL COMMENT '考生答案',
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=1645433332826 DEFAULT CHARSET=utf8 COMMENT='考试记录表';
/!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table examrecord
--
LOCK TABLES examrecord
WRITE;
/*!40000 ALTER TABLE examrecord
DISABLE KEYS /;
INSERT INTO examrecord
VALUES (1645433287063,'2022-02-21 08:48:06',11,'学生姓名1',1,'十万个为什么',1,'下面动物不属于昆虫的是()。','[{\"text\":\"A.苍蝇\",\"code\":\"A\",\"checked\":false},{\"text\":\"B.蜜蜂\",\"code\":\"B\",\"checked\":false},{\"text\":\"C.蜂鸟\",\"code\":\"C\",\"checked\":true}]',20,'C','蜂鸟',20,'C'),(1645433300893,'2022-02-21 08:48:20',11,'学生姓名1',1,'十万个为什么',2,'油着火后可以用水扑灭。','[{\"text\":\"A.对\",\"code\":\"A\",\"checked\":false},{\"text\":\"B.错\",\"code\":\"B\",\"checked\":true}]',20,'B','油着火后不可以用水扑灭',20,'B'),(1645433318940,'2022-02-21 08:48:38',11,'学生姓名1',1,'十万个为什么',3,'地球是个球体,中间是( )。','[]',30,'赤道','赤道',0,'11'),(1645433332825,'2022-02-21 08:48:51',11,'学生姓名1',1,'十万个为什么',4,'下面动物中会流汗的有( )。','[{\"text\":\"A.马\",\"code\":\"A\",\"checked\":true},{\"text\":\"B.猫\",\"code\":\"B\",\"checked\":true},{\"text\":\"C.狗\",\"code\":\"C\",\"checked\":false}]',30,'A,B','狗不会流汗',30,'A,B');
/!40000 ALTER TABLE examrecord
ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table forum
--
DROP TABLE IF EXISTS forum
;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/!40101 SET character_set_client = utf8 /;
CREATE TABLE forum
(
id
bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
addtime
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
title
varchar(200) DEFAULT NULL COMMENT '帖子标题',
content
longtext NOT NULL COMMENT '帖子内容',
parentid
bigint(20) DEFAULT NULL COMMENT '父节点id',
userid
bigint(20) NOT NULL COMMENT '用户id',
username
varchar(200) DEFAULT NULL COMMENT '用户名',
isdone
varchar(200) DEFAULT NULL COMMENT '状态',
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COMMENT='交流论坛';
/!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table forum
--
LOCK TABLES forum
WRITE;
/*!40000 ALTER TABLE forum
DISABLE KEYS /;
INSERT INTO forum
VALUES (61,'2022-02-21 08:35:17','帖子标题1','帖子内容1',0,1,'用户名1','开放'),(62,'2022-02-21 08:35:17','帖子标题2','帖子内容2',0,2,'用户名2','开放'),(63,'2022-02-21 08:35:17','帖子标题3','帖子内容3',0,3,'用户名3','开放'),(64,'2022-02-21 08:35:17','帖子标题4','帖子内容4',0,4,'用户名4','开放'),(65,'2022-02-21 08:35:17','帖子标题5','帖子内容5',0,5,'用户名5','开放'),(66,'2022-02-21 08:35:17','帖子标题6','帖子内容6',0,6,'用户名6','开放');
/!40000 ALTER TABLE forum
ENABLE KEYS */;
UNLOCK TABLES;