保誠-保戶業務員媒合平台
Jack
2021-11-14 b3b9387ff3e29ddabed067a3916c54ad2b70ad56
pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
@@ -4,6 +4,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.pollex.pam.domain.Appointment;
import com.pollex.pam.enums.ContactStatusEnum;
@@ -14,6 +15,7 @@
import com.pollex.pam.service.mapper.AppointmentMapper;
@Service
@Transactional
public class AppointmentService {
   
   @Autowired
@@ -21,6 +23,9 @@
   
   @Autowired
   AppointmentDTOMapper appointmentDTOMapper;
   @Autowired
   ConsultantService consultantService;
   
   
   public void customerCreateAppointment(AppointmentCreateDTO appointmentCreateDTO) {
@@ -34,4 +39,12 @@
   public List<Appointment> findByAgentNo(String agentNo) {
      return appointmentRepository.findByAgentNo(agentNo);
   }
   public void markAsContacted(Long appointmentId) {
      Appointment appointment = appointmentRepository.getById(appointmentId);
      appointment.setCommunicateStatus(ContactStatusEnum.CONTACTED);
      appointmentRepository.save(appointment);
   }
}