一、前言
考驾照的时候,科目一、科目四的系统如何做的,原来如此简单,就是一个简单的答题系统。
不仅让我联想到了,也可以做一个错题本,不仅仅关于数学,也来源于日常生活,经常做错的事、物。不过这些后续完善,目前系统仅仅只有固定功能,增加题目功能也很简单,如果感兴趣,可自行开发,也可联系。
二、开发设计思路
1、部分-效果图
2、表设计
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for exam_items
-- ----------------------------
DROP TABLE IF EXISTS `exam_items`;
CREATE TABLE `exam_items` (
`eid` int(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT COMMENT '主键',
`ename` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '题目名称',
`epaperid` int(11) NULL DEFAULT NULL COMMENT '试卷id',
`escore` int(11) NULL DEFAULT NULL COMMENT '分数',
`etype` int(11) NULL DEFAULT NULL COMMENT '类型(填空题、判断题、单选题、多选题、解答题)',
`elevel` int(11) NULL DEFAULT NULL,
`ea` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`eb` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ec` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ed` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ee` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`ef` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`eanswer` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '正确答案',
`eanalysis` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '解答',
PRIMARY KEY (`eid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '考试题目表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of exam_items
-- ----------------------------
INSERT INTO `exam_items` VALUES (00000000001, '若z=1+i,则|z²-2z|=', 1, 10, 3, 1, '0', '1', '√2', '2', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000002, '设集合A={x|x²-4≤0},B={x|2x+a≤0},且A∩B={x|-2≤x≤1},则a=', 1, 10, 3, 1, '-4', '-2', '2', '4', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000003, '埃及胡夫金字塔是古代世界建筑奇迹之一,它的形状可视为一个正四棱锥,以该四棱锥的高为边长的正方形面积等于该四棱锥一个侧面三角形的面积,则其侧面三角形底边上的高与底面正方形的边长的比值为', 1, 10, 3, 2, '(√5-1)/4', '(√5-1)/2', '(√5+1)/4', '(√5+1)/2', '', '', 'c', '略');
INSERT INTO `exam_items` VALUES (00000000004, '已知A为抛物线C:y²=2px(p>0)上一点,点A到C的焦点的距离为12,到y轴的距离为9,则p=', 1, 10, 3, 2, '2', '3', '6', '9', '', '', 'c', '略');
INSERT INTO `exam_items` VALUES (00000000005, '函数f(x)=x<sup>4</sup>-2x³的图像在点(1,f(1))处的切线方程为', 1, 10, 3, 3, 'y=-2x-1', 'y=-2x+1', 'y=2x-3', 'y=2x+1', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000006, '(x+y²/x)(x+y)<sup>5</sup>的展开式中x³y³的系数为', 1, 10, 3, 4, '5', '10', '15', '20', '', '', 'c', '略');
INSERT INTO `exam_items` VALUES (00000000007, '已知α∈(0,π),且3cos2α-8cosα=5,则sinα=', 1, 10, 3, 4, '√5/3', '2/3', '1/3', '√5/9', '', '', 'a', '略');
INSERT INTO `exam_items` VALUES (00000000008, '已知A,B,C为球O的球面上的三个点,⊙O<sub>1</sub>为△ABC的外接圆,若⊙O<sub>1</sub>的面积为4π,AB=BC=AC=OO<sub>1</sub>,则球O的表面积为', 1, 10, 3, 5, '64π', '48π', '36π', '32π', '', '', 'a', '略');
INSERT INTO `exam_items` VALUES (00000000009, '已知⊙M:x²+y²-2x-2y-2=0,直线l:2x+y+2=0,P为l上的动点.过点P作⊙M的切线PA,PB,切点为A,B,当|PM|·|AB|最小时,直线AB的方程为', 1, 10, 3, 5, '2x-y-1=0', '2x+y-1=0', '2x-y+1=0', '2x+y+1=0', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000010, '若2<sup>a</sup>+log<sub>2</sub>a=4<sup>b</sup>+2log<sub>4</sub>b,则', 1, 10, 3, 5, 'a>2b', 'a<2b', 'a>b²', 'a<b²', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000011, '已知集合A={x|x²-3x-4<0},B={-4,1,3,5},则A∩B=', 2, 10, 3, 1, '{-4,1}', '{1,5}', '{3,5}', '{1,3}', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000012, '若z=1+2i+i³,则|z|=', 2, 10, 3, 1, '0', '1', '√2', '2', '', '', 'c', '略');
INSERT INTO `exam_items` VALUES (00000000013, '埃及胡夫金字塔是古代世界建筑奇迹之一,它的形状可视为一个正四棱锥,以该四棱锥的高为边长的正方形面积等于该四棱锥一个侧面三角形的面积,则其侧面三角形底边上的高与底面正方形的边长的比值为', 2, 10, 3, 2, '(√5-1)/4', '(√5-1)/2', '(√5+1)/4', '(√5+1)/2', '', '', 'c', '略');
INSERT INTO `exam_items` VALUES (00000000014, '设O为正方形ABCD的中心,在O,A,B,C,D中任取3点,则取到的3点共线的概率为', 2, 10, 3, 2, '1/5', '2/5', '1/2', '4/5', '', '', 'a', '略');
INSERT INTO `exam_items` VALUES (00000000015, '已知圆x²+y²-6x=0,过点(1,2)的直线被该圆所截得的弦的长度的最小值为', 2, 10, 3, 3, '1', '2', '3', '4', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000016, '设alog<sub>3</sub>4=2,则4<sup>-a</sup>=', 2, 10, 3, 3, '1/16', '1/9', '1/8', '1/6', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000017, '设{a<sub>n</sub>}是等比数列,且a<sub>1</sub>+a<sub>2</sub>+a<sub>3</sub>=1,a<sub>2</sub>+a<sub>3</sub>+a<sub>4</sub>=2,则a<sub>6</sub>+a<sub>7</sub>+a<sub>8</sub>=', 2, 10, 3, 3, '12', '24', '30', '32', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000018, '设F1,F2是双曲线C:x²-y²/3=1的两个焦点,O为坐标原点,点P在C上且|OP|=2,则△PF<sub>1</sub>F<sub>2</sub>的面积为', 2, 10, 3, 4, '7/2', '3', '5/2', '2', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000019, '已知A,B,C为球O的球面上的三个点,⊙O<sub>1</sub>为△ABC的外接圆,若⊙O<sub>1</sub>的面积为4π,AB=BC=AC=OO<sub>1</sub>,则球O的表面积为', 2, 20, 3, 5, '64π', '48π', '36π', '32π', '', '', 'a', '略');
INSERT INTO `exam_items` VALUES (00000000021, '新冠肺炎疫情警示人们要养成良好的生活习惯,提高公共卫生安全意识.下列相关叙述错误的是', 3, 10, 3, 1, '戴口罩可以减少病原微生物通过飞沫在人与人之间的传播', '病毒能够在餐具上增殖,用食盐溶液浸泡餐具可以阻止病毒增殖', '高温可破坏病原体蛋白质的空间结构,煮沸处理餐具可杀死病原体', '生活中接触的物体表面可能存在病原微生物,勤洗手可降低感染风险', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000022, '种子贮藏中需要控制呼吸作用以减少有机物的消耗.若作物种子呼吸作用所利用的物质是淀粉分解产生的葡萄糖,下列关于种子呼吸作用的叙述,错误的是', 3, 10, 3, 1, '若产生的与乙醇的分子数相等,则细胞只进行无氧呼吸', '若细胞只进行有氧呼吸,则吸收的分子数与释放的相等', '若细胞只进行无氧呼吸且产物是乳酸,则无吸收也无释放', '若细胞同时进行有氧和无氧呼吸,则吸收的分子数比释放的多', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000023, '某研究人员以小鼠为材料进行了与甲状腺相关的实验,下列叙述错误的是', 3, 10, 3, 2, '切除小鼠垂体,会导致甲状腺激素分泌不足,机体产热减少', '给切除垂体的幼年小鼠注射垂体提取液后,其耗氧量会增加', '给成年小鼠注射甲状腺激素后,其神经系统的兴奋性会增强', '给切除垂体的小鼠注射促甲状腺激索释放激素,其代谢可恢复正常', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000024, '已知果蝇的长翅和截翅由一对等位基因控制,多只长翅果蝇进行单对交配(每个瓶中有1只雌果蝇和1只雄果蝇),子代果蝇将中长翅:截翅=3:1.据此无法判的是', 3, 10, 3, 2, '长翅是显性性状逐是隐性性状', '亲代雌蝇是杂合子还是纯合子', '该等位基因位于常染色体还是X染色体上', '该等位基因在雌蝇体细胞中是否成对存在', '', '', 'c', '略');
INSERT INTO `exam_items` VALUES (00000000025, '土壤小动物对动植物遗体的分解起着重要的作用,下列关于土壤小动物的叙述,错误的是', 3, 10, 3, 3, '调查身体微小、活动力强的小动物数量常用标志重捕法', '土中小动物类群的丰富度高,则该类群含有的物种数目多', '土壤小动物的代谢活动会影响土壤肥力,进而影响植物生长', '土壤小动物呼吸作用产生的CO<sub>2</sub>参与生态系统中的碳循环', '', '', 'a', '略');
INSERT INTO `exam_items` VALUES (00000000026, '国家卫健委公布的新型冠状病毒肺炎诊疗方案指出,乙醚、75%乙醇、含氯消毒剂、过氧乙酸(CH<sub>3</sub>COOOH)、氯仿等均可有效灭活病毒.对于上述化学药品,下列说法错误的是', 3, 10, 3, 1, 'CH<sub>3</sub>CH<sub>2</sub>OH能与水互溶', 'NaCIO通过氧化灭活病毒', '过氧乙酸相对分子质量为76', '氯仿的化学名称是四氯化碳', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000027, '下列气体去除杂质的方法(选项格式为:气体(杂质),方法)中,不能实现目的的是', 3, 10, 3, 2, 'SO<sub>2</sub>(H<sub>2</sub>S),通过酸性高锰酸钾溶液', 'CI<sub>2</sub>(HCI),通过饱和的食盐水', 'N<sub>2</sub>(O<sub>2</sub>),通过灼热的铜丝网', 'NO(NO<sub>2</sub>),通过氢氧化钠溶液', '', '', 'a', '略');
INSERT INTO `exam_items` VALUES (00000000028, '行驶中的汽车如果发生剧烈碰撞,车内的安全气囊会被弹出并瞬间充满气体.若碰撞后汽车的速度在很短时间内减小为零,关于安全气囊在此过程中的作用,下列说法正确的是', 3, 10, 3, 1, '增加了司机单位面积的受力大小', '减少了碰撞前后司机动量的变化量', '将司机的动能全部转换成汽车的动能', '延长了司机的受力时间并增大了司机的受力面积', '', '', 'd', '略');
INSERT INTO `exam_items` VALUES (00000000029, '火星的质量约为地球质量的1/10,半径约为地球半径的1/2,则同一物体在火星表面与在地球表面受到的引力的比值约为', 3, 10, 3, 1, '0.2', '0.4', '2.0', '2.5', '', '', 'b', '略');
INSERT INTO `exam_items` VALUES (00000000030, '一同学表演荡秋千:已知秋千的两根绳长均为10m,该同学和秋千踏板的总质量约为50kg。绳的质量忽略不计。当该同学荡到秋千支架的正下方时,速度大小为8m/s,此时每根绳子平均承受的拉力约为', 3, 10, 3, 2, '200N', '400N', '600N', '800N', '', '', 'b', '略');
SET FOREIGN_KEY_CHECKS = 1;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for exam_paper
-- ----------------------------
DROP TABLE IF EXISTS `exam_paper`;
CREATE TABLE `exam_paper` (
`paperid` int(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT COMMENT '主键',
`papername` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '试卷名称',
`papertype` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '试卷类型',
`method` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '方式',
`scores` int(10) NULL DEFAULT NULL COMMENT '分数',
`createtime` date NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`paperid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '卷宗表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of exam_paper
-- ----------------------------
INSERT INTO `exam_paper` VALUES (00000000001, '高考卷-全国Ⅰ数学(理)', '高考卷', '自动阅卷', 100, '2022-11-04');
INSERT INTO `exam_paper` VALUES (00000000002, '高考卷-全国Ⅰ数学(文)', '高考卷', '自动阅卷', 100, '2022-11-04');
INSERT INTO `exam_paper` VALUES (00000000003, '高考卷-全国Ⅰ理综', '高考卷', '自动阅卷', 100, '2022-11-04');
SET FOREIGN_KEY_CHECKS = 1;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for exam_score
-- ----------------------------
DROP TABLE IF EXISTS `exam_score`;
CREATE TABLE `exam_score` (
`scoreid` int(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT COMMENT '主键',
`userid` int(10) NULL DEFAULT NULL COMMENT '用户id',
`paperid` int(11) NULL DEFAULT NULL COMMENT '试卷id',
`score` int(11) NULL DEFAULT NULL COMMENT '分数',
`rights` int(11) NULL DEFAULT NULL COMMENT '对的',
`mistakes` int(11) NULL DEFAULT NULL COMMENT '错的',
PRIMARY KEY (`scoreid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '分数表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of exam_score
-- ----------------------------
INSERT INTO `exam_score` VALUES (0000000001, 4, 2, 10, 1, 8);
INSERT INTO `exam_score` VALUES (0000000002, 4, 1, 30, 3, 7);
INSERT INTO `exam_score` VALUES (0000000003, 1, 2, 100, 10, 0);
INSERT INTO `exam_score` VALUES (0000000004, 6, 3, 40, 4, 6);
INSERT INTO `exam_score` VALUES (0000000005, 6, 3, 20, 2, 8);
INSERT INTO `exam_score` VALUES (0000000006, 6, 1, 0, 0, 10);
INSERT INTO `exam_score` VALUES (0000000007, 4, 3, 30, 3, 7);
INSERT INTO `exam_score` VALUES (0000000008, 4, 2, 40, 4, 5);
INSERT INTO `exam_score` VALUES (0000000009, 4, 3, 10, 1, 9);
INSERT INTO `exam_score` VALUES (0000000010, 6, 2, 0, 0, 9);
INSERT INTO `exam_score` VALUES (0000000012, 4, 1, 0, 0, 10);
INSERT INTO `exam_score` VALUES (0000000013, 6, 2, 0, 0, 9);
INSERT INTO `exam_score` VALUES (0000000014, 6, 3, 0, 0, 10);
INSERT INTO `exam_score` VALUES (0000000015, 4, 3, 10, 1, 9);
INSERT INTO `exam_score` VALUES (0000000016, 2, 1, 30, 3, 7);
INSERT INTO `exam_score` VALUES (0000000017, 2, 2, 40, 4, 5);
INSERT INTO `exam_score` VALUES (0000000018, 1, 3, 10, 1, 9);
INSERT INTO `exam_score` VALUES (0000000019, 2, 1, 30, 3, 7);
INSERT INTO `exam_score` VALUES (0000000020, 2, 1, 20, 2, 8);
INSERT INTO `exam_score` VALUES (0000000021, 2, 1, 50, 5, 5);
INSERT INTO `exam_score` VALUES (0000000022, 2, 3, 20, 2, 8);
INSERT INTO `exam_score` VALUES (0000000023, 2, 3, 30, 3, 7);
INSERT INTO `exam_score` VALUES (0000000024, 1, 1, 10, 1, 9);
SET FOREIGN_KEY_CHECKS = 1;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for exam_score_detail
-- ----------------------------
DROP TABLE IF EXISTS `exam_score_detail`;
CREATE TABLE `exam_score_detail` (
`detailid` int(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
`scoreid` int(10) NULL DEFAULT NULL COMMENT '分数表id',
`eid` int(11) NULL DEFAULT NULL COMMENT '第几题',
`uanswer` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '答案',
`upoints` int(11) NULL DEFAULT NULL COMMENT '得分',
PRIMARY KEY (`detailid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 226 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '分数详情表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of exam_score_detail
-- ----------------------------
INSERT INTO `exam_score_detail` VALUES (0000000001, 1, 11, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000002, 1, 12, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000003, 1, 13, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000004, 1, 14, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000005, 1, 15, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000006, 1, 16, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000007, 1, 17, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000008, 1, 18, 'd', 0);
INSERT INTO `exam_score_detail` VALUES (0000000009, 1, 19, 'd', 0);
INSERT INTO `exam_score_detail` VALUES (0000000010, 2, 1, 'a', 0);
INSERT INTO `exam_score_detail` VALUES (0000000011, 2, 2, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000012, 2, 3, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000013, 2, 4, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000014, 2, 5, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000015, 2, 6, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000016, 2, 7, 'a', 10);
INSERT INTO `exam_score_detail` VALUES (0000000017, 2, 8, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000018, 2, 9, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000019, 2, 10, 'a', 0);
INSERT INTO `exam_score_detail` VALUES (0000000020, 3, 1, 'd', 10);
INSERT INTO `exam_score_detail` VALUES (0000000021, 3, 2, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000022, 3, 3, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000023, 3, 4, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000024, 3, 5, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000025, 3, 6, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000026, 3, 7, 'a', 10);
INSERT INTO `exam_score_detail` VALUES (0000000027, 3, 8, 'a', 10);
INSERT INTO `exam_score_detail` VALUES (0000000028, 3, 9, 'd', 10);
INSERT INTO `exam_score_detail` VALUES (0000000029, 3, 10, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000030, 4, 21, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000031, 4, 22, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000032, 4, 23, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000033, 4, 24, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000034, 4, 25, 'd', 0);
INSERT INTO `exam_score_detail` VALUES (0000000035, 4, 26, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000036, 4, 27, 'a', 10);
INSERT INTO `exam_score_detail` VALUES (0000000037, 4, 28, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000038, 4, 29, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000039, 4, 30, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000040, 5, 21, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000041, 5, 22, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000042, 5, 23, '', 0);
INSERT INTO `exam_score_detail` VALUES (0000000043, 5, 24, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000044, 5, 25, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000045, 5, 26, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000046, 5, 27, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000047, 5, 28, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000048, 5, 29, 'a', 0);
INSERT INTO `exam_score_detail` VALUES (0000000049, 5, 30, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000050, 6, 1, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000051, 6, 2, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000052, 6, 3, 'a', 0);
INSERT INTO `exam_score_detail` VALUES (0000000053, 6, 4, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000054, 6, 5, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000055, 6, 6, 'd', 0);
INSERT INTO `exam_score_detail` VALUES (0000000056, 6, 7, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000057, 6, 8, 'd', 0);
INSERT INTO `exam_score_detail` VALUES (0000000058, 6, 9, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000059, 6, 10, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000060, 7, 21, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000061, 7, 22, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000062, 7, 23, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000063, 7, 24, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000064, 7, 25, '', 0);
INSERT INTO `exam_score_detail` VALUES (0000000065, 7, 26, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000066, 7, 27, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000067, 7, 28, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000068, 7, 29, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000069, 7, 30, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000070, 8, 11, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000071, 8, 12, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000072, 8, 13, 'c', 10);
INSERT INTO `exam_score_detail` VALUES (0000000073, 8, 14, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000074, 8, 15, 'b', 10);
INSERT INTO `exam_score_detail` VALUES (0000000075, 8, 16, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000076, 8, 17, 'd', 10);
INSERT INTO `exam_score_detail` VALUES (0000000077, 8, 18, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000078, 8, 19, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000079, 9, 21, 'a', 0);
INSERT INTO `exam_score_detail` VALUES (0000000080, 9, 22, 'a', 0);
INSERT INTO `exam_score_detail` VALUES (0000000081, 9, 23, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000082, 9, 24, 'b', 0);
INSERT INTO `exam_score_detail` VALUES (0000000083, 9, 25, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000084, 9, 26, 'c', 0);
INSERT INTO `exam_score_detail` VALUES (0000000085, 9, 27, 'd', 0);
INSERT INTO `exam_score_detail` VALUES (0000000086, 9, 28, 'd', 10);
INSERT INTO `exam_score_detail` VALUES (0000000087, 9, 29, 'a', 0);
INSERT INTO `exam_score_detail` VALUES (0000000088, 9, 30, 'c', 0);
SET FOREIGN_KEY_CHECKS = 1;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for exam_user
-- ----------------------------
DROP TABLE IF EXISTS `exam_user`;
CREATE TABLE `exam_user` (
`userid` int(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT COMMENT '主键',
`uname` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名称',
`upwd` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码',
PRIMARY KEY (`userid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of exam_user
-- ----------------------------
INSERT INTO `exam_user` VALUES (0000000001, 'admin', '123456');
INSERT INTO `exam_user` VALUES (0000000002, '胡歌', '123456');
SET FOREIGN_KEY_CHECKS = 1;
3、代码设计
源码gitee分享地址下载:https://gitee.com/fengqile/demo_exam.git
项目使用SpringBoot+bootstrap+layer,MybatisPlus
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.hn.yuan</groupId>
<artifactId>demo_exam</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo_exam</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<aspectj-version>1.8.6</aspectj-version>
</properties>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.21</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj-version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj-version}</version>
</dependency>
<!--spring项目启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--通过注解消除实际开发中的样板式代码-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!--spring项目测试启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<!--mybatis-plus启动器-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
<!--mysql数据库驱动-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
</dependency>
<!--代码生成器-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.4.1</version>
</dependency>
<!--模板引擎-->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
三、开发扩展
①扩展功能
可以设计新增功能,新增不同考卷-卷宗表exam_paper,题目设计-题目表exam_items
②前后端分离
只需把前端代码拉到vue中,引入相关组件即可。
各位看官》创作不易,点个赞!!!
诸君共勉:万事开头难,只愿肯放弃。
免责声明:本文章仅用于学习参考