| | |
| | | |
| | | private final UserMapper userMapper; |
| | | private final ApplicationEventPublisher eventPublisher; |
| | | private final AuthenticationService authenticationService; |
| | | |
| | | |
| | | public List<User> getUsers() { |
| | |
| | | User teacher = new User(); |
| | | BeanUtils.copyProperties(form, teacher); |
| | | teacher.setRole(RoleEnum.ADMIN.getCode()); |
| | | teacher.setPassword(authenticationService.pwdEncode(form.getPassword())); |
| | | teacher.setUserUuid(UUID.randomUUID().toString()); |
| | | teacher.setLastActiveTime(new Date()); |
| | | teacher.setStatus(UserStatusEnum.Enable.getCode()); |
| | |
| | | User student = new User(); |
| | | BeanUtils.copyProperties(form, student); |
| | | student.setRole(RoleEnum.ADMIN.getCode()); |
| | | student.setPassword(authenticationService.pwdEncode(form.getPassword())); |
| | | student.setUserUuid(UUID.randomUUID().toString()); |
| | | student.setLastActiveTime(new Date()); |
| | | student.setStatus(UserStatusEnum.Enable.getCode()); |