Сделано: Пагинация, спринг секюрити, админ функции, полноценная работа с qr, а также добавлены проходы и терминалы
28 lines
759 B
Java
28 lines
759 B
Java
package com.example.nto.util;
|
|
|
|
import com.example.nto.dto.UsersDTO;
|
|
import com.example.nto.entity.Users;
|
|
import lombok.experimental.UtilityClass;
|
|
|
|
@UtilityClass
|
|
public class UsersMapper {
|
|
public static UsersDTO convertDTO(Users user) {
|
|
UsersDTO usersDTO = new UsersDTO();
|
|
usersDTO.setId(user.getId());
|
|
usersDTO.setUsername(user.getUsername());
|
|
usersDTO.setName(user.getName());
|
|
if (user.getAuthority() != null) {
|
|
usersDTO.setAuthority_id(user.getAuthority().getId());
|
|
}
|
|
usersDTO.setPhoto(user.getPhoto());
|
|
usersDTO.setPosition(user.getPosition());
|
|
usersDTO.setLastVisit(user.getLastVisit());
|
|
usersDTO.setIsCardBlocked(false);
|
|
|
|
|
|
return usersDTO;
|
|
|
|
}
|
|
|
|
}
|