Day10-作业(SpringBootWeb案例)

作业1:完成课上预留给大家自己完成的功能 【部门管理的修改功能】

注意:

部门管理的修改功能,需要开发两个接口:

  • 先开发根据ID查询部门信息的接口,该接口用户查询数据并展示 。(一定一定先做这个功能)

  • 再开发根据ID修改部门数据的接口,记得在修改的时候,需要修改updateTime为当前系统时间


作业2:根据如下提供的接口文档 及 页面原型(需求)完成接口文档中的接口开发,并通过postman测试接口

备注:根据接口文档开发接口,并给予postman进行测试即可, 前端 工程前端人员还未开发,所以无需联调测试。

页面原型:

页面原型,提取码:5555https://pan.baidu.com/s/1sSVPV1Nhu8hKDJPoMjDSNA

接口文档:

接口文档,提取码:5555https://pan.baidu.com/s/1f5IQVSXKlEZEcgX7xLN0Xw

基础代码:

基础代码,提取码:5555https://pan.baidu.com/s/1X30Q7sWKKXd1ZHt8sLqnwg

直接将提供的基础工程,导入到idea,基础工程结构如下:

温馨提示:上述的基础工程代码中,controller、service、mapper中都没有加注解,需要自己添加。

建表语句:

sql 复制代码
-- 学员表
create table student(
    id int unsigned primary key auto_increment comment 'ID,主键',
    name varchar(10) not null comment '姓名',
    no char(10) not null unique comment '学号',
    gender tinyint unsigned not null comment '性别, 1: 男, 2: 女',
    phone varchar(11) not null unique comment '手机号',
    degree tinyint unsigned comment '最高学历, 1:初中, 2:高中, 3:大专, 4:本科, 5:硕士, 6:博士',
    violation_count tinyint unsigned not null default 0 comment '违纪次数',
    violation_score tinyint unsigned not null default 0 comment '违纪扣分',
    class_id int unsigned not null comment '班级ID, 关联班级表ID',
    create_time datetime not null comment '创建时间',
    update_time datetime not null comment '修改时间'
) comment '学员表';

insert into student(name, no, gender, phone, degree, class_id, create_time, update_time)VALUES
        ('段誉','2022000001',1,'18800000001',1,1,now(),now()),
        ('萧峰','2022000002',1,'18800210003',2,1,now(),now()),
        ('虚竹','2022000003',1,'18800013001',2,1,now(),now()),
        ('萧远山','2022000004',1,'18800003211',3,1,now(),now()),
        ('阿朱','2022000005',2,'18800160002',4,1,now(),now()),
        ('阿紫','2022000006',2,'18800000034',4,2,now(),now()),
        ('游坦之','2022000007',1,'18800000067',4,2,now(),now()),
        ('康敏','2022000008',2,'18800000077',5,2,now(),now()),
        ('徐长老','2022000009',1,'18800000341',3,2,now(),now()),
        ('云中鹤','2022000010',1,'18800006571',2,2,now(),now()),
        ('钟万仇','2022000011',1,'18800000391',4,3,now(),now()),
        ('崔百泉','2022000012',1,'18800000781',4,3,now(),now()),
        ('耶律洪基','2022000013',1,'18800008901',4,3,now(),now()),
        ('天山童姥','2022000014',2,'18800009201',4,3,now(),now()),
        ('刘竹庄','2022000015',1,'18800009401',3,4,now(),now()),
        ('李春来','2022000016',1,'18800008501',4,4,now(),now()),
        ('王语嫣','2022000017',2,'18800007601',2,4,now(),now());

需求:

  1. 条件分页查询学生信息。【参照接口文档 及 页面原型 和 需求】

  2. 添加学生信息。【参照接口文档 及 页面原型 和 需求】

  3. 根据ID查询学生信息。【参照接口文档 及 页面原型 和 需求】

  4. 修改学生信息。【参照接口文档 及 页面原型 和 需求】

  5. 设计批量删除学生信息的接口文档,并实现批量删除。【自主设计接口 并完成需求】

  6. 设置接口文档,批量将多个学生的违纪次数清零。【自主设计接口 并完成需求】

相关推荐
哆啦A梦15883 小时前
Springboot整合MyBatis实现数据库操作
数据库·spring boot·mybatis
弹简特11 小时前
【JavaEE19-后端部分】 MyBatis 入门第三篇:使用XML完成增删改查
xml·mybatis
小江的记录本16 小时前
【VO、DTO、Entity】VO、DTO、Entity三大核心数据对象全解析(附核心对比表 + 代码示例)
java·数据库·spring boot·spring·架构·mybatis·数据库架构
计算机学姐16 小时前
基于SpringBoot的流浪动物救助收养系统
vue.js·spring boot·后端·mysql·java-ee·intellij-idea·mybatis
计算机学姐18 小时前
基于SpringBoot的蛋糕烘焙销售服务系统
java·spring boot·后端·spring·tomcat·intellij-idea·mybatis
zdl68618 小时前
Mybatis控制台打印SQL执行信息(执行方法、执行SQL、执行时间)
数据库·sql·mybatis
敲代码的嘎仔1 天前
Java后端面试——SSM框架面试题
java·面试·职场和发展·mybatis·ssm·springboot·八股
ruanyongjing1 天前
SpringBoot3 整合 Mybatis 完整版
mybatis
小江的记录本1 天前
【MyBatis-Plus】Spring Boot + MyBatis-Plus 进行各种数据库操作(附完整 CRUD 项目代码示例)
java·前端·数据库·spring boot·后端·sql·mybatis
小江的记录本1 天前
【MyBatis-Plus】MyBatis-Plus的核心特性、条件构造器、分页插件、乐观锁插件
java·前端·spring boot·后端·sql·tomcat·mybatis