保誠-保戶業務員媒合平台
wayne
2022-02-17 a3716f72066d25d745f4d5103ff23a553c3e102b
pamapi/src/main/java/com/pollex/pam/service/AppointmentNoticeLogService.java
比對新檔案
@@ -0,0 +1,33 @@
package com.pollex.pam.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.pollex.pam.domain.AppointmentNoticeLog;
import com.pollex.pam.repository.AppointmentNoticeLogRepository;
import com.pollex.pam.service.dto.AppointmentNoticeSendDTO;
import com.pollex.pam.service.mapper.AppointmentNoticeSendMapper;
@Service
@Transactional
public class AppointmentNoticeLogService {
   @Autowired
   AppointmentNoticeLogRepository appointmentNoticeLogRepository;
   @Autowired
   AppointmentNoticeSendMapper appointmentNoticeSendMapper;
   public AppointmentNoticeLog create(AppointmentNoticeSendDTO noticeSendDTO) {
      AppointmentNoticeLog appointmentNoticeLog =
            appointmentNoticeSendMapper.toAppointmentNoticeLog(noticeSendDTO);
      return appointmentNoticeLogRepository.save(appointmentNoticeLog);
   }
   public List<AppointmentNoticeLog> findByAppointmentId(Long appointmentId){
      return appointmentNoticeLogRepository.findByAppointmentId(appointmentId);
   }
}