|
|
@@ -87,10 +87,10 @@ public class UserController extends BaseController {
|
|
|
return userService.toDTO(userService.all(pageQuery));
|
|
|
}
|
|
|
|
|
|
-// @PreAuthorize("hasRole('ADMIN')")
|
|
|
+ // @PreAuthorize("hasRole('ADMIN')")
|
|
|
@GetMapping("/get/{id}")
|
|
|
- public User get(@PathVariable Long id) {
|
|
|
- return userRepo.findById(id).orElseThrow(new BusinessException("无记录"));
|
|
|
+ public UserDTO get(@PathVariable Long id) {
|
|
|
+ return userService.toDTO(userRepo.findById(id).orElseThrow(new BusinessException("无记录")), true);
|
|
|
}
|
|
|
|
|
|
@PreAuthorize("hasRole('ADMIN')")
|