| | |
| | | AppointmentService appointmentService; |
| | | |
| | | @Autowired |
| | | LoginRecordService loginRecordService; |
| | | |
| | | @Autowired |
| | | AppointmentCustomerViewMapper appointmentCustomerViewMapper; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | public ConsultantDetailDTO getConsultantDetail(String agentNo) { |
| | | Consultant consultant = consultantRepository.findOneByAgentNo(agentNo).orElseThrow(ConsultantNotFoundException::new); |
| | | ConsultantDetailDTO consultantDetailDTO = consultantMapper.toDetailDto(consultant); |
| | | |
| | | loginRecordService.findLatestLoginRecord(agentNo, LoginResult.SUCCESS) |
| | | .ifPresent(loginRecord -> consultantDetailDTO.setLatestLoginTime(loginRecord.getLoginDate())); |
| | | |
| | | return consultantDetailDTO; |
| | | return consultantMapper.toDetailDto(consultant); |
| | | } |
| | | |
| | | @Transactional |