数据库
drop table if exists am_user;
create table am_user(
id bigint not null auto_increment primary key comment '主键id',
user_name varchar(50) not null comment '用户名',
pwd varchar(50) not null comment '密码',
is_deleted tinyint default 0 comment '是否删除,1删除,0正常'
) comment '用户表';
insert into am_user values (1,'admin','1234',0);
drop table if exists am_student;
create table am_student(
id bigint not null auto_increment primary key comment '主键id',
number varchar(50) not null comment '学号,因为使用软删除,所以未设置唯一键索引',
real_name varchar(50) not null comment '姓名',
enroll_time datetime not null default CURRENT_TIMESTAMP comment '入学日期',
is_deleted tinyint default 0 comment '是否删除,1删除,0正常'
) comment '学生表';
insert into am_student values (1,'001','张三','2023-01-01',0);
drop table if exists am_score;
create table am_score(
id bigint not null auto_increment primary key comment '主键id',
student_id bigint not null comment '学生id',
exam_name varchar(100) not null comment '考试名称',
score_cn decimal(5,2) default 0 comment '语文成绩',
score_en decimal(5,2) default 0 comment '英语成绩',
score_math decimal(5,2) default 0 comment '数学成绩',
is_deleted tinyint default 0 comment '是否删除,1删除,0正常'
) comment '成绩表';
insert into am_score values(1,1,'摸底考试',99,99,99,0);
测试
登录
首页
学生管理
成绩管理
新增学生
编辑学生
新增成绩
编辑成绩
退出
以上就是本系统的全部代码。
希望对各位有帮助。