保誠-保戶業務員媒合平台
Jack
2021-11-29 13ae6947a48f4c061b1a6479df889fa2aaf07099
pamapi/src/main/java/com/pollex/pam/service/ConsultantService.java
@@ -44,7 +44,7 @@
    AppointmentCustomerViewMapper appointmentCustomerViewMapper;
    public List<ConsultantDTO> getMyConsultantList() {
        Long userId = SecurityUtils.getCustomerId();
        Long userId = SecurityUtils.getCustomerDBId();
        return customerFavoriteConsultantRepository.findAllByCustomerId(userId)
            .stream()
            .map(consultantMapper::toDto)
@@ -81,7 +81,7 @@
    public void addConsultantToCustomList(AddConsultantParam param) {
        List<String> agentNoList = param.getAgentNoList();
        List<Consultant> consultants = consultantRepository.findAllByAgentNoIn(agentNoList);
        Long userId = SecurityUtils.getCustomerId();
        Long userId = SecurityUtils.getCustomerDBId();
        consultants.forEach(consultant -> {
            boolean isConsultantInList = customerFavoriteConsultantRepository.findOneByCustomerIdAndConsultant(userId, consultant).isPresent();
@@ -107,7 +107,7 @@
   }
    public void removeConsultantFromCustomList(String agentNo) {
        Long customId = SecurityUtils.getCustomerId();
        Long customId = SecurityUtils.getCustomerDBId();
        Consultant consultant = consultantRepository.findOneByAgentNo(agentNo).orElseThrow(ConsultantNotFoundException::new);
        CustomerFavoriteConsultant target = customerFavoriteConsultantRepository.findOneByCustomerIdAndConsultant(customId, consultant).orElse(null);