use of com.dtstack.taier.dao.dto.UserDTO in project Taier by DTStack.
the class BatchTaskService method buildUserDTOInfo.
public void buildUserDTOInfo(final Map<Long, User> userMap, final ScheduleTaskVO vo) {
if (Objects.nonNull(vo.getCreateUserId())) {
User createUser = userMap.get(vo.getCreateUserId());
UserDTO dto = new UserDTO();
BeanUtils.copyProperties(createUser, dto);
vo.setCreateUser(dto);
if (vo.getCreateUserId().equals(vo.getModifyUserId())) {
vo.setModifyUser(dto);
} else {
UserDTO modifyDto = new UserDTO();
BeanUtils.copyProperties(userMap.getOrDefault(vo.getModifyUserId(), new User()), modifyDto);
vo.setModifyUser(modifyDto);
}
}
}
use of com.dtstack.taier.dao.dto.UserDTO in project Taier by DTStack.
the class UserService method getUserByDTO.
public UserDTO getUserByDTO(Long userId) {
if (userId == null) {
return null;
}
User one = getById(userId);
if (Objects.isNull(one)) {
return null;
}
UserDTO userDTO = new UserDTO();
BeanUtils.copyProperties(one, userDTO);
return userDTO;
}