src/main/java/com/zgn/hospital/controller/DoctorController.java

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.zgn.hospital.controller;

import com.zgn.hospital.entity.doctor;
import com.zgn.hospital.service.DoctorService;
import com.zgn.hospital.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @program: hospital_info
 * @description:
 * @author: ZGN
 * @create: 2023-03-04 16:01
 */
@RestController
@RequestMapping("/doctor")
public class DoctorController {
    @Autowired
    DoctorService doctorService;
    @PostMapping("/login")
    R login(@RequestBody doctor doctor, HttpServletRequest request){
        return doctorService.login(doctor,request);
    }
    @PostMapping("/select/{currentPage}/{size}")
    R select(@PathVariable("currentPage") int currentPage, @PathVariable("size") int size, @RequestBody doctor doctor){
        return doctorService.selectByPage(currentPage,size,doctor);
    }
    @GetMapping("/dept")
    R searchdept(){
        return doctorService.searchdept();
    }
    @PostMapping("/add")
    R add(@RequestBody doctor doctor){
        return doctorService.add(doctor);
    }
    @PostMapping("/lock")
    R lock(@RequestBody doctor doctor){return doctorService.lock(doctor);}
    @DeleteMapping("/delete/{id}")
    R delete(@PathVariable("id") Integer id){
        return doctorService.delete(id);
    }
    @PostMapping("/update/{pass}")
    R update(@PathVariable("pass") String pass,@RequestBody doctor doctor){
        return doctorService.update(pass,doctor);
    }
    @PostMapping("/selectdoctor/{deptname}")
    R selectdoctor(@PathVariable("deptname") String deptname){
        return doctorService.selectdoctor(deptname);
    }
    @PostMapping("/sel/{currentPage}/{size}")
    R sel(@PathVariable("currentPage") int currentPage, @PathVariable("size") int size, @RequestBody doctor doctor){
        return doctorService.selByPage(currentPage,size,doctor);
    }
    @PostMapping("/getitem/{id}")
    R getitem(@PathVariable("id")Integer id){
        return doctorService.getitem(id);
    }
后面还有 14 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。