| | |
| | | package com.pollex.pam.service; |
| | | |
| | | import com.pollex.pam.domain.Appointment; |
| | | import com.pollex.pam.domain.AppointmentCustomerView; |
| | | import com.pollex.pam.domain.Consultant; |
| | | import com.pollex.pam.domain.CustomFavoriteConsultant; |
| | | import com.pollex.pam.domain.User; |
| | | import com.pollex.pam.enums.ContactStatusEnum; |
| | | import com.pollex.pam.repository.AppointmentCustomerViewRepository; |
| | | import com.pollex.pam.repository.ConsultantRepository; |
| | | import com.pollex.pam.repository.CustomFavoriteConsultantRepository; |
| | | import com.pollex.pam.security.SecurityUtils; |
| | | import com.pollex.pam.service.dto.*; |
| | | import com.pollex.pam.service.mapper.AppointmentCustomerViewMapper; |
| | | import com.pollex.pam.service.mapper.AppointmentMapper; |
| | | import com.pollex.pam.service.mapper.ConsultantMapper; |
| | | import com.pollex.pam.web.rest.errors.ConsultantNotFoundException; |
| | | import com.pollex.pam.web.rest.errors.NotLoginException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private final CustomFavoriteConsultantRepository customFavoriteConsultantRepository; |
| | | private final ConsultantMapper consultantMapper; |
| | | private final UserService userService; |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentService appointmentService; |
| | | |
| | | @Autowired |
| | | AppointmentCustomerViewRepository appointmentCustomerViewRepository; |
| | | |
| | | @Autowired |
| | | AppointmentCustomerViewMapper appointmentCustomerViewMapper; |
| | | |
| | | public ConsultantService( |
| | | ConsultantRepository consultantRepository, |
| | | CustomFavoriteConsultantRepository customFavoriteConsultantRepository, |
| | |
| | | }); |
| | | |
| | | } |
| | | |
| | | public List<AppointmentCustomerViewDTO> getMyAppointment() { |
| | | String agentNo = SecurityUtils.getAgentNo(); |
| | | List<AppointmentCustomerView> appointmentList = appointmentCustomerViewRepository.findByAgentNo(agentNo); |
| | | return appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointmentList); |
| | | } |
| | | } |