保誠-保戶業務員媒合平台
wayne
2022-02-17 a3716f72066d25d745f4d5103ff23a553c3e102b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.pollex.pam.repository;
 
import java.util.List;
import java.util.Optional;
 
import com.pollex.pam.enums.AppointmentStatusEnum;
import com.pollex.pam.enums.ContactStatusEnum;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
 
import com.pollex.pam.domain.Appointment;
 
@Repository
public interface AppointmentRepository extends JpaRepository<Appointment, Long>{
 
    List<Appointment> findByAgentNo(String agentNo);
 
    List<Appointment> findByAgentNoAndCustomerId(String agentNo, Long customerId);
 
    Optional<Appointment> findTopByAgentNoAndCustomerIdOrderByAppointmentDateDesc(String agentNo, Long customerId);
 
    List<Appointment> findAllByCommunicateStatusAndStatus(ContactStatusEnum contactStatus, AppointmentStatusEnum status);
}