mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-07-23 11:43:00 +08:00
gai
This commit is contained in:
parent
a8718f87ae
commit
5308e05c80
src/main/java/top/suyiiyii/sims
@ -55,9 +55,3 @@ public class AdminController {
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* request.setAttribute();lUsers();
|
||||
* return Result.success(userList);
|
||||
* }
|
||||
* }
|
||||
**/
|
@ -62,9 +62,7 @@ RecordController {
|
||||
public Result<List<RecordDto>> record(@RequestParam(defaultValue = "0") int page,
|
||||
@RequestParam(defaultValue = "10") int size,
|
||||
HttpServletRequest request) {
|
||||
HttpSession session = request.getSession();
|
||||
String token = (String) session.getAttribute("token");
|
||||
String userId = JwtUtils.extractUserId(token);
|
||||
String userId = String.valueOf(JwtInterceptor.getUserIdFromReq(request));
|
||||
List<RecordDto> recordDtos = new ArrayList<>();
|
||||
List<Record> records = recordService.getMyAllRecords(page, size, userId);
|
||||
for (Record record : records) {
|
||||
|
@ -110,7 +110,8 @@ public class UserService {
|
||||
userDto.setUserGroup(user.getUserGroup());
|
||||
userDto.setStudentId(user.getStudentId());
|
||||
userDto.setRoles(new ArrayList<>());
|
||||
//TODO: 获取用户角色
|
||||
List<String> roles = roleMapper.getRolesById(id);
|
||||
userDto.setRoles(roles);
|
||||
return userDto;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user