基于Springboot+Vue实现高校疫情防控系统( 三 )


package com.zhiku.yiqing.web.admin;import com.baomidou.mybatisplus.core.metadata.IPage;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;import com.zhiku.yiqing.common.R;import com.zhiku.yiqing.pojo.Health;import com.zhiku.yiqing.pojo.Teacher;import com.zhiku.yiqing.service.HealthService;import com.zhiku.yiqing.service.TeacherService;import com.zhiku.yiqing.vo.HealthQueryParamsVo;import com.zhiku.yiqing.vo.UserQueryParamsVo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.*;import java.util.Arrays;@RestController@RequestMapping("/health")public class HealthController {@Autowiredprivate HealthService healthService;@DeleteMapping("/batchDelTeacherHealthById/{ids}")public R batchDelTeacherHealthById(@PathVariable("ids") Integer[] ids){System.out.println(Arrays.toString(ids));healthService.batchDelTeacherHealthById(ids);return R.success();}/*** 根据id删除teacher* @param id* @return*/@DeleteMapping("/delTeacherHealthById/{id}")public R delTeacherHealthById( @PathVariable(value = "http://www.kingceram.com/post/id" ) Integer id){healthService.delTeacherHealthById(id);return R.success();}/*** 上报省防疫办* @param id* @return*/@PutMapping("/reportedTeacherHealthById/{id}")public R reportedTeacherHealthById(@PathVariable(value = "http://www.kingceram.com/post/id" ) Integer id){System.out.println(id);healthService.reportedTeacherHealthById(id);return R.success();}/*** 查询所有的健康列表带分页以及条件查询* @param pageNo* @param pageSize* @param queryParamsVo* @return*/@GetMapping("/queryAllTeacherHealth/{pageNo}/{pageSize}/{remark}")public R queryAllTeacher(@PathVariable(value = "http://www.kingceram.com/post/pageNo" ) Integer pageNo,@PathVariable(value = "http://www.kingceram.com/post/pageSize") Integer pageSize,@PathVariable(value = "http://www.kingceram.com/post/remark") Integer remark,HealthQueryParamsVo queryParamsVo){Page page = new Page<>(pageNo, pageSize);IPage healthIPage = healthService.queryAllTeacherHealth(page,queryParamsVo,remark);return R.success(healthIPage);}}
package com.zhiku.yiqing.web.admin;import com.baomidou.mybatisplus.core.metadata.IPage;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;import com.zhiku.yiqing.common.R;import com.zhiku.yiqing.pojo.Student;import com.zhiku.yiqing.service.StudentService;import com.zhiku.yiqing.vo.UserQueryParamsVo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.*;import java.util.Arrays;@RestController@RequestMapping("/student")public class StudentController {@Autowiredprivate StudentService studentService;@DeleteMapping("/batchDelStudentById/{ids}")public R batchDelStudentById(@PathVariable("ids") Integer[] ids){System.out.println(Arrays.toString(ids));studentService.batchDelStudentById(ids);return R.success();}/*** 根据id删除teacher* @param id* @return*/@DeleteMapping("/delStudentById/{id}")public R delStudentById( @PathVariable(value = "http://www.kingceram.com/post/id" ) Integer id){studentService.delStudentById(id);return R.success();}/*** 重置老师的密码* @param id* @return*/@PutMapping("/updateStudentById/{id}")public R updateStudentById(@PathVariable(value = "http://www.kingceram.com/post/id" ) Integer id){studentService.updateStudentById(id);return R.success();}/*** 添加teacher* @param student* @return*/@PostMapping("/addStudent")public R addStudent(@RequestBody Student student){studentService.addStudent(student);return R.success();}/*** 查询所有的teacher带分页以及条件查询* @param pageNo* @param pageSize* @param queryParamsVo* @return*/@GetMapping("/queryAllStudent/{pageNo}/{pageSize}")public R queryAllTeacher(@PathVariable(value = "http://www.kingceram.com/post/pageNo" ) Integer pageNo,@PathVariable(value = "http://www.kingceram.com/post/pageSize") Integer pageSize,UserQueryParamsVo queryParamsVo){System.out.println("queryParamsVo: " + queryParamsVo);Page page = new Page