src/main/java/com/zgn/hospital/controller/UserController.java
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.zgn.hospital.controller;
import com.zgn.hospital.entity.user;
import com.zgn.hospital.service.UserService;
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: hostpital_info
* @description:
* @author: ZGN
* @create: 2023-03-03 15:29
*/
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
UserService userService;
@PostMapping("/register")
R register(@RequestBody user user){
return userService.register(user);
}
@PostMapping("/login")
R login(@RequestBody user user, HttpServletRequest request){
return userService.login(user,request);
}
@PostMapping("/select/{currentPage}/{size}")
R select(@PathVariable("currentPage") int currentPage,@PathVariable("size") int size,@RequestBody user user){
return userService.selectByPage(currentPage,size,user);
}
@PostMapping("/lock")
R lock(@RequestBody user user){
return userService.lock(user);
}
@DeleteMapping("/delete/{id}")
R delete(@PathVariable("id") Integer id){
return userService.delete(id);
}
@PostMapping("/getitem/{id}")
R getitem(@PathVariable("id")Integer id){
return userService.getitem(id);
}
@PostMapping("/update")
R update(@RequestBody user user){
return userService.update(user);
}
@PostMapping("/repwd/{pwd}/{newpwd}/{id}")
R repwd(@PathVariable("pwd") String pwd,@PathVariable("newpwd") String newpwd,@PathVariable Integer id){
return userService.repwd(pwd,newpwd,id);
后面还有 11 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
