| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.controller.dto.UserDTO; |
| | | import com.example.erp.service.userInfo.UserService; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/userInfo") |
| | |
| | | return Result.seccess(userService.isLogin()); } |
| | | |
| | | @SaCheckLogin |
| | | @PostMapping("/userAdd") |
| | | @PostMapping("/getTokenInfo") |
| | | public Result userAdd() { |
| | | return Result.seccess(StpUtil.getTokenInfo()); |
| | | } |
| | | |
| | | @PostMapping("/userDelete") |
| | | @SaCheckPermission("user.delete") |
| | | public Result userDelete() { |
| | | return Result.seccess(123123); |
| | | @PostMapping("/userDelete/{id}") |
| | | public Result userDelete(@PathVariable Integer id) { |
| | | return Result.seccess(userService.userDelete(id)); |
| | | } |
| | | |
| | | @GetMapping("findAll") |
| | | public Result findAll(){ |
| | | return Result.seccess(userService.findAll()); |
| | | } |
| | | } |