保誠-保戶業務員媒合平台
Jack
2021-12-01 ab79329b71e1c962764a6be325a25c3e3a255e35
pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
@@ -37,22 +37,26 @@
   @Autowired
   AppointmentCustomerViewRepository appointmentCustomerViewRepository;
   @Autowired
   SatisfactionService satisfactionService;
   public void customerCreateAppointment(AppointmentCreateDTO appointmentCreateDTO) {
      Appointment appointment = appointmentDTOMapper.toAppointment(appointmentCreateDTO);
      appointment.setCustomerId(SecurityUtils.getCustomerDBId());
      appointment.setCommunicateStatus(ContactStatusEnum.RESERVED);
      appointmentRepository.save(appointment);
   }
   public List<Appointment> findByAgentNo(String agentNo) {
      return appointmentRepository.findByAgentNo(agentNo);
   }
   public void markAsContacted(Long appointmentId) {
   public Appointment markAsContacted(Long appointmentId) {
      Appointment appointment = appointmentRepository.findById(appointmentId).get();
      appointment.setCommunicateStatus(ContactStatusEnum.CONTACTED);
      appointmentRepository.save(appointment);
      return appointmentRepository.save(appointment);
   }