From 551d18a095e8fe462e4099fdd5b2578e12934d45 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 08 二月 2022 12:25:44 +0800 Subject: [PATCH] Merge branch 'Phase3' of https://dev.pollex.com.tw:8443/r/pcalife/PAM into Phase3 --- pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentMapper.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentMapper.java b/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentMapper.java index f92aac5..5526738 100644 --- a/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentMapper.java +++ b/pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentMapper.java @@ -4,6 +4,7 @@ import java.util.List; +import com.pollex.pam.enums.SatisfactionTypeEnum; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -13,7 +14,6 @@ import com.pollex.pam.enums.SatisfactionStatusEnum; import com.pollex.pam.repository.AppointmentRepository; import com.pollex.pam.service.dto.AppointmentDTO; -import com.pollex.pam.service.dto.SatisfactionCustomerScoreDTO; @Service public class AppointmentMapper { @@ -32,18 +32,19 @@ .map(s -> toAppointmentDTO(s)).collect(toList()); } - public Satisfaction toSatisfaction(Appointment appointment) { + public Satisfaction toAppointmentSatisfaction(Appointment appointment) { Satisfaction target = new Satisfaction(); target.setAppointmentId(appointment.getId()); target.setAgentNo(appointment.getAgentNo()); target.setCustomerId(appointment.getCustomerId()); + target.setType(SatisfactionTypeEnum.APPOINTMENT); target.setStatus(SatisfactionStatusEnum.UNFILLED); return target; } - public Satisfaction toSatisfaction(Long appointmentId) { + public Satisfaction toAppointmentSatisfaction(Long appointmentId) { Appointment appointment = appointmentRepository.findById(appointmentId).get(); - return toSatisfaction(appointment); + return toAppointmentSatisfaction(appointment); } -- Gitblit v1.8.0