保誠-保戶業務員媒合平台
Jack
2021-12-03 0e73f60f5e9acede5438b0c38332183916f9d552
Merge branch 'master' of ssh://192.168.0.10:29418/pcalife/PAM
刪除1個檔案
修改10個檔案
新增3個檔案
481 ■■■■■ 已變更過的檔案
pamapi/src/doc/sql/20211203_w.sql 1 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/doc/預約單/更新預約單明細API.txt 9 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/doc/預約單/顧問取得所有自己的預約單API 85 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/doc/預約單/顧問取得所有自己的預約單API.txt 140 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/doc/顧問API/客戶的顧問清單.txt 19 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java 49 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/ConsultantService.java 36 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentCustomerViewDTO.java 8 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentUpdateDTO.java 94 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/dto/CustomerFavoriteConsultantDTO.java 27 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/mapper/ConsultantMapper.java 7 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/web/rest/ConsultantResource.java 1 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/resources/config/application-dev.yml 1 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/doc/sql/20211203_w.sql
¤ñ¹ï·sÀÉ®×
@@ -0,0 +1 @@
UPDATE omo.appointment SET contact_time = appointment_date where communicate_status = 'CONTACTED';
pamapi/src/doc/¹w¬ù³æ/§ó·s¹w¬ù³æ©ú²ÓAPI.txt
@@ -11,15 +11,8 @@
    "age": "under_20",
    "job": "內勤",
    "requirement": "健康與保障,子女教育,資產規劃",
    "communicateStatus": "reserved",
    "hopeContactTime": "'禮拜一,禮拜二,禮拜三,禮拜四,禮拜五,禮拜六,禮拜日、9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
    "otherRequirement": null,
    "appointmentDate": "2021-12-01T04:27:20.154Z",
    "lastModifiedDate": "2021-12-01T04:27:20.154Z",
    "agentNo": "J149388015",
    "customerId": 76,
    "consultantViewTime": null,
    "consultantReadTime": null
    "otherRequirement": null
}
http response status: 204
pamapi/src/doc/¹w¬ù³æ/ÅU°Ý¨ú±o©Ò¦³¦Û¤vªº¹w¬ù³æAPI
Àɮפw§R°£
pamapi/src/doc/¹w¬ù³æ/ÅU°Ý¨ú±o©Ò¦³¦Û¤vªº¹w¬ù³æAPI.txt
¤ñ¹ï·sÀÉ®×
@@ -0,0 +1,140 @@
http get :
http://localhost:8080/api/consultant/getMyAppointment
[
    {
        "id": 110,
        "phone": "09123456789",
        "email": "",
        "contactType": "mobile",
        "gender": "male",
        "age": "30",
        "job": "內勤",
        "requirement": "子女教育,資產規劃,防疫保單相關",
        "communicateStatus": "contacted",
        "hopeContactTime": "'禮拜三,禮拜五、12:00~14:00,14:00~18:00'",
        "otherRequirement": null,
        "appointmentDate": "2021-12-02T09:58:58.932Z",
        "lastModifiedDate": "2021-12-02T09:58:58.932Z",
        "agentNo": "AG0109051204",
        "customerId": 70,
        "name": null,
        "consultantViewTime": "2021-12-02T09:58:12.066Z",
        "consultantReadTime": "2021-12-02T09:58:58.930Z",
        "contactTime": "2021-12-02T09:58:58.930Z",
        "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
    },
    {
        "id": 109,
        "phone": "09123456789",
        "email": "",
        "contactType": "mobile",
        "gender": "male",
        "age": "20",
        "job": "內勤",
        "requirement": "健康與保障,子女教育,保單健檢/規劃,防疫保單相關",
        "communicateStatus": "contacted",
        "hopeContactTime": "'禮拜一,禮拜二,禮拜三,禮拜四,禮拜五,禮拜六,禮拜日、12:00~14:00,14:00~18:00'",
        "otherRequirement": null,
        "appointmentDate": "2021-12-02T10:12:24.613Z",
        "lastModifiedDate": "2021-12-02T10:12:24.613Z",
        "agentNo": "AG0109051204",
        "customerId": 67,
        "name": null,
        "consultantViewTime": "2021-12-02T09:58:12.066Z",
        "consultantReadTime": "2021-12-02T10:12:24.612Z",
        "contactTime": null,
        "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
    },
    {
        "id": 114,
        "phone": "09123456789",
        "email": "",
        "contactType": "mobile",
        "gender": "male",
        "age": "70",
        "job": "內勤",
        "requirement": "健康與保障,子女教育,資產規劃,樂活退休,防疫保單相關",
        "communicateStatus": "contacted",
        "hopeContactTime": "'禮拜一,禮拜二,禮拜三,禮拜四,禮拜五,禮拜六,禮拜日、12:00~14:00,14:00~18:00'",
        "otherRequirement": null,
        "appointmentDate": "2021-12-02T09:58:12.248Z",
        "lastModifiedDate": "2021-12-02T09:58:12.248Z",
        "agentNo": "AG0109051204",
        "customerId": 71,
        "name": null,
        "consultantViewTime": "2021-12-02T09:58:12.066Z",
        "consultantReadTime": null,
        "contactTime": null,
        "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
    },
    {
        "id": 121,
        "phone": "09123456789",
        "email": "",
        "contactType": "mobile",
        "gender": "male",
        "age": "20",
        "job": "內勤",
        "requirement": "子女教育",
        "communicateStatus": "contacted",
        "hopeContactTime": "'禮拜一,禮拜二,禮拜三,禮拜四,禮拜五,禮拜六,禮拜日、9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00'",
        "otherRequirement": null,
        "appointmentDate": "2021-12-02T09:58:12.248Z",
        "lastModifiedDate": "2021-12-02T09:58:12.248Z",
        "agentNo": "AG0109051204",
        "customerId": 76,
        "name": "李哲維",
        "consultantViewTime": "2021-12-02T09:58:12.066Z",
        "consultantReadTime": "2021-12-02T09:54:20.872Z",
        "contactTime": null,
        "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
    },
    {
        "id": 118,
        "phone": "09123456789",
        "email": "",
        "contactType": "mobile",
        "gender": "male",
        "age": "20",
        "job": "內勤",
        "requirement": "健康與保障",
        "communicateStatus": "contacted",
        "hopeContactTime": "'禮拜一,禮拜二,禮拜三,禮拜四,禮拜五,禮拜六,禮拜日、12:00~14:00,14:00~18:00'",
        "otherRequirement": null,
        "appointmentDate": "2021-12-02T10:02:52.797Z",
        "lastModifiedDate": "2021-12-02T10:02:52.797Z",
        "agentNo": "AG0109051204",
        "customerId": 72,
        "name": null,
        "consultantViewTime": "2021-12-02T09:58:12.066Z",
        "consultantReadTime": "2021-12-02T10:02:52.796Z",
        "contactTime": null,
        "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
    },
    {
        "id": 180,
        "phone": "0911111111",
        "email": "",
        "contactType": "phone",
        "gender": "female",
        "age": "31-40",
        "job": "內勤",
        "requirement": "子女教育,健康與保障",
        "communicateStatus": "contacted",
        "hopeContactTime": "'禮拜二,禮拜三,禮拜四,禮拜五,禮拜六、9:00~12:00,12:00~14:00,14:00~18:00,18:00~21:00','禮拜一,禮拜二,禮拜三,禮拜四,禮拜五,禮拜日、12:00~14:00,14:00~18:00,18:00~21:00','禮拜一,禮拜四,禮拜六,禮拜日、14:00~18:00,18:00~21:00'",
        "otherRequirement": null,
        "appointmentDate": "2021-12-02T10:10:53.341Z",
        "lastModifiedDate": "2021-12-03T03:40:16.344Z",
        "agentNo": "AG0109051204",
        "customerId": 77,
        "name": "111",
        "consultantViewTime": "2021-12-02T10:10:46.358Z",
        "consultantReadTime": "2021-12-02T10:10:53.340Z",
        "contactTime": "2021-12-03T03:40:16.215Z",
        "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
    }
]
pamapi/src/doc/ÅU°ÝAPI/«È¤áªºÅU°Ý²M³æ.txt
@@ -20,9 +20,6 @@
        "updateTime": "2021-12-02T10:56:32.741Z",   // æœ€è¿‘更新時間
        "role": "威盛保險經紀人",
        "seniority": "22 å¹´ 8 æœˆ",
        "latestAppointmentId": 130,                 // æœ€å¾Œä¸€ç­†é ç´„å–®ID
        "latestAppointmentDate": "2021-12-02T10:56:32.741Z",    // æœ€å¾Œä¸€ç­†é ç´„單預約時間
        "latestAppointmentScore": null,                 // æœ€å¾Œä¸€ç­†é ç´„單的分數 (null為尚未評分)
        "appointments": [       // å®¢æˆ¶å·²é ç´„的顧問清單
            {
                "id": 130,
@@ -42,7 +39,8 @@
                "customerId": 76,
                "name": "李哲維",
                "consultantViewTime": null,
                "consultantReadTime": null
                "consultantReadTime": null,
                "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
            }
        ],
        "new": true
@@ -65,9 +63,6 @@
        "updateTime": "2021-12-02T10:56:56.946Z",
        "role": "錠嵂保險經紀人",
        "seniority": "30 å¹´ 8 æœˆ",
        "latestAppointmentId": 131,
        "latestAppointmentDate": "2021-12-02T10:56:56.946Z",
        "latestAppointmentScore": null,
        "appointments": [
            {
                "id": 131,
@@ -87,7 +82,8 @@
                "customerId": 76,
                "name": "李哲維",
                "consultantViewTime": null,
                "consultantReadTime": null
                "consultantReadTime": null,
                "satisfactionScore":3 // null ä»£è¡¨è©²ç­†é ç´„單尚未填寫滿意度
            }
        ],
        "new": true
@@ -110,9 +106,6 @@
        "updateTime": null,
        "role": "台名保險經紀人",
        "seniority": "38 å¹´ ",
        "latestAppointmentId": null,
        "latestAppointmentDate": null,
        "latestAppointmentScore": null,
        "appointments": [],
        "new": true
    },
@@ -133,10 +126,6 @@
        "createTime": "2021-12-02T10:56:04.620Z",
        "updateTime": null,
        "role": "和泰保險經紀人",
        "seniority": "17 å¹´ 1 æœˆ",
        "latestAppointmentId": null,
        "latestAppointmentDate": null,
        "latestAppointmentScore": null,                 // æœ€å¾Œä¸€ç­†é ç´„單的分數 (null為尚未評分)
        "appointments": [],
        "new": true
    }
pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
@@ -5,8 +5,8 @@
import java.util.Objects;
import java.util.stream.Collectors;
import com.pollex.pam.enums.AppointmentStatusEnum;
import com.pollex.pam.service.dto.AppointmentDTO;
import com.pollex.pam.domain.Satisfaction;
import com.pollex.pam.service.dto.AppointmentUpdateDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -60,9 +60,19 @@
        appointmentRepository.save(appointment);
    }
    public void updateAppointment(AppointmentDTO appointmentDTO) {
        Appointment appointment = appointmentDTOMapper.toAppointment(appointmentDTO);
        appointment.setStatus(AVAILABLE);
    public void updateAppointment(AppointmentUpdateDTO updateAppointmentDTO) {
        Appointment appointment = appointmentRepository.findById(updateAppointmentDTO.getId()).get();
        appointment.setPhone(updateAppointmentDTO.getPhone());
        appointment.setEmail(updateAppointmentDTO.getEmail());
        appointment.setContactType(updateAppointmentDTO.getContactType());
        appointment.setGender(updateAppointmentDTO.getGender());
        appointment.setAge(updateAppointmentDTO.getAge());
        appointment.setJob(updateAppointmentDTO.getJob());
        appointment.setRequirement(updateAppointmentDTO.getRequirement());
        appointment.setHopeContactTime(updateAppointmentDTO.getHopeContactTime());
        appointment.setOtherRequirement(updateAppointmentDTO.getOtherRequirement());
        appointmentRepository.save(appointment);
    }
@@ -87,8 +97,28 @@
    public AppointmentCustomerViewDTO getAppointmentDetail(Long appointmentId) {
        AppointmentCustomerView appointment = appointmentCustomerViewRepository.findById(appointmentId)
                .orElseThrow(AppointmentNotFoundException::new);
        return appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointment);
        AppointmentCustomerViewDTO dto = appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointment);
        setSatisfactionScore(dto, appointmentId);
        return dto;
    }
    public List<AppointmentCustomerViewDTO> getConsultantAvailableAppointments(String agentNo) {
        return appointmentCustomerViewRepository.findByAgentNo(agentNo).stream()
            .filter(appointment -> appointment.getStatus() == AVAILABLE)
            .map(appointmentCustomerView -> {
                AppointmentCustomerViewDTO dto = appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointmentCustomerView);
                setSatisfactionScore(dto, appointmentCustomerView.getId());
                return dto;
            })
            .collect(Collectors.toList());
    }
    public void setSatisfactionScore(AppointmentCustomerViewDTO dto, Long appointmentId) {
        satisfactionService.getByAppointmentId(appointmentId).ifPresent(satisfaction -> {
            dto.setSatisfactionScore(satisfaction.getScore());
        });
    }
    public List<AppointmentCustomerView> findAvailableByAgentNoAndCustomerId(String agentNo, Long customerId) {
        return appointmentCustomerViewRepository.findByAgentNoAndCustomerId(agentNo, customerId)
@@ -117,12 +147,5 @@
        consultantNotViewAppointments.forEach(appointment -> appointment.setConsultantViewTime(Instant.now()));
        appointmentRepository.saveAll(consultantNotViewAppointments);
    }
    public List<AppointmentCustomerViewDTO> getConsultantAppointments(String agentNo) {
        return appointmentCustomerViewRepository.findByAgentNo(agentNo).stream()
            .filter(appointment -> appointment.getStatus() != DELETED)
            .map(appointmentCustomerViewMapper::toAppointmentCustomerViewDTO)
            .collect(Collectors.toList());
    }
}
pamapi/src/main/java/com/pollex/pam/service/ConsultantService.java
@@ -3,7 +3,6 @@
import com.pollex.pam.domain.AppointmentCustomerView;
import com.pollex.pam.domain.Consultant;
import com.pollex.pam.domain.CustomerFavoriteConsultant;
import com.pollex.pam.domain.Satisfaction;
import com.pollex.pam.enums.ContactStatusEnum;
import com.pollex.pam.enums.LoginResult;
import com.pollex.pam.repository.ConsultantRepository;
@@ -21,7 +20,6 @@
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
@Service
@@ -60,10 +58,7 @@
                CustomerFavoriteConsultantDTO dto = consultantMapper.toCustomerFavoriteConsultantDto(consultant);
                dto.setContactStatus(ContactStatusEnum.PICKED);
                dto.setLatestAppointmentId(null);
                dto.setLatestAppointmentDate(null);
                dto.setLatestAppointmentScore(null);
                dto.setCreateTime(customerFavoriteConsultantRelation.getLastModifiedDate());
                dto.setCreateTime(customerFavoriteConsultantRelation.getCreatedDate());
                setAppointmentInfo(
                    dto,
@@ -75,32 +70,21 @@
            }).collect(Collectors.toList());
    }
    private void setAppointmentInfo(CustomerFavoriteConsultantDTO dto, List<AppointmentCustomerView> appointmentList) {
    private void setAppointmentInfo(CustomerFavoriteConsultantDTO customerFavoriteConsultantDTO, List<AppointmentCustomerView> appointmentList) {
        List<AppointmentCustomerView> appointments = appointmentList.stream()
            .sorted(Comparator.comparing(AppointmentCustomerView::getAppointmentDate).reversed())
            .collect(Collectors.toList());
        dto.setAppointments(appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointments));
        List<AppointmentCustomerViewDTO> appointmentCustomerViewDTOS = appointmentCustomerViewMapper.toAppointmentCustomerViewDTO(appointments);
        appointmentCustomerViewDTOS.forEach(appointmentCustomerViewDTO -> {
            appointmentService.setSatisfactionScore(appointmentCustomerViewDTO, appointmentCustomerViewDTO.getId());
        });
        customerFavoriteConsultantDTO.setAppointments(appointmentCustomerViewDTOS);
        if (!appointments.isEmpty()) {
            AppointmentCustomerView latestAppointment = appointments.get(0);
            dto.setContactStatus(latestAppointment.getCommunicateStatus());
            dto.setLatestAppointmentId(latestAppointment.getId());
            dto.setLatestAppointmentDate(latestAppointment.getAppointmentDate());
            dto.setUpdateTime(latestAppointment.getLastModifiedDate());
            setLatestAppointmentScore(dto, latestAppointment);
        }
    }
    private void setLatestAppointmentScore(CustomerFavoriteConsultantDTO dto, AppointmentCustomerView latestAppointment) {
        Optional<Satisfaction> satisfactionOptional = satisfactionService.getByAppointmentId(latestAppointment.getId());
        if(satisfactionOptional.isPresent()) {
            Satisfaction satisfaction = satisfactionOptional.get();
            dto.setLatestAppointmentScore(satisfaction.getScore());
        }
        else {
            dto.setLatestAppointmentScore(null);
            customerFavoriteConsultantDTO.setContactStatus(latestAppointment.getCommunicateStatus());
            customerFavoriteConsultantDTO.setUpdateTime(latestAppointment.getLastModifiedDate());
        }
    }
@@ -160,7 +144,7 @@
    public List<AppointmentCustomerViewDTO> getMyAppointment() {
        String agentNo = SecurityUtils.getAgentNo();
        return appointmentService.getConsultantAppointments(agentNo);
        return appointmentService.getConsultantAvailableAppointments(agentNo);
    }
    public void removeConsultantFromCustomList(String agentNo) {
pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentCustomerViewDTO.java
@@ -25,6 +25,8 @@
    private Instant consultantViewTime;
    private Instant consultantReadTime;
    private Instant contactTime;
    private Float satisfactionScore;
    public Long getId() {
        return id;
    }
@@ -139,4 +141,10 @@
    public void setContactTime(Instant contactTime) {
        this.contactTime = contactTime;
    }
    public Float getSatisfactionScore() {
        return satisfactionScore;
    }
    public void setSatisfactionScore(Float satisfactionScore) {
        this.satisfactionScore = satisfactionScore;
    }
}
pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentUpdateDTO.java
¤ñ¹ï·sÀÉ®×
@@ -0,0 +1,94 @@
package com.pollex.pam.service.dto;
public class AppointmentUpdateDTO {
    private Long id;
    private String phone;
    private String email;
    private String contactType;
    private String gender;
    private String age;
    private String job;
    private String requirement;
    private String hopeContactTime;
    private String otherRequirement;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public String getContactType() {
        return contactType;
    }
    public void setContactType(String contactType) {
        this.contactType = contactType;
    }
    public String getGender() {
        return gender;
    }
    public void setGender(String gender) {
        this.gender = gender;
    }
    public String getAge() {
        return age;
    }
    public void setAge(String age) {
        this.age = age;
    }
    public String getJob() {
        return job;
    }
    public void setJob(String job) {
        this.job = job;
    }
    public String getRequirement() {
        return requirement;
    }
    public void setRequirement(String requirement) {
        this.requirement = requirement;
    }
    public String getHopeContactTime() {
        return hopeContactTime;
    }
    public void setHopeContactTime(String hopeContactTime) {
        this.hopeContactTime = hopeContactTime;
    }
    public String getOtherRequirement() {
        return otherRequirement;
    }
    public void setOtherRequirement(String otherRequirement) {
        this.otherRequirement = otherRequirement;
    }
}
pamapi/src/main/java/com/pollex/pam/service/dto/CustomerFavoriteConsultantDTO.java
@@ -21,9 +21,6 @@
    private Instant updateTime;
    private String role;
    private String seniority;
    private Long latestAppointmentId;
    private Instant latestAppointmentDate;
    private Float latestAppointmentScore;
    private List<AppointmentCustomerViewDTO> appointments;
    public boolean isNewConsultant() {
@@ -66,14 +63,6 @@
        this.expertise = expertise;
    }
    public Float getLatestAppointmentScore() {
        return latestAppointmentScore;
    }
    public void setLatestAppointmentScore(Float latestAppointmentScore) {
        this.latestAppointmentScore = latestAppointmentScore;
    }
    public Float getAvgScore() {
        return avgScore;
    }
@@ -88,14 +77,6 @@
    public void setContactStatus(ContactStatusEnum contactStatus) {
        this.contactStatus = contactStatus;
    }
    public Instant getLatestAppointmentDate() {
        return latestAppointmentDate;
    }
    public void setLatestAppointmentDate(Instant latestAppointmentDate) {
        this.latestAppointmentDate = latestAppointmentDate;
    }
    public Instant getCreateTime() {
@@ -132,14 +113,6 @@
    public void setNewConsultant(boolean newConsultant) {
        this.newConsultant = newConsultant;
    }
    public Long getLatestAppointmentId() {
        return latestAppointmentId;
    }
    public void setLatestAppointmentId(Long latestAppointmentId) {
        this.latestAppointmentId = latestAppointmentId;
    }
    public List<AppointmentCustomerViewDTO> getAppointments() {
pamapi/src/main/java/com/pollex/pam/service/mapper/ConsultantMapper.java
@@ -1,16 +1,10 @@
package com.pollex.pam.service.mapper;
import com.pollex.pam.domain.Appointment;
import com.pollex.pam.domain.Consultant;
import com.pollex.pam.domain.CustomerFavoriteConsultant;
import com.pollex.pam.enums.ContactStatusEnum;
import com.pollex.pam.service.AppointmentService;
import com.pollex.pam.service.dto.ConsultantDTO;
import com.pollex.pam.service.dto.ConsultantDetailDTO;
import com.pollex.pam.service.dto.CustomerFavoriteConsultantDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@@ -33,7 +27,6 @@
        consultantDTO.setContactStatus(null);
        consultantDTO.setUpdateTime(null);
        consultantDTO.setLatestAppointmentId(null);
        return consultantDTO;
    }
pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java
@@ -1,6 +1,6 @@
package com.pollex.pam.web.rest;
import com.pollex.pam.service.dto.AppointmentDTO;
import com.pollex.pam.service.dto.AppointmentUpdateDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@@ -21,7 +21,7 @@
    SatisfactionService satisfactionService;
    @PutMapping("")
    public ResponseEntity<Void> updateAppointment(@RequestBody AppointmentDTO appointment) {
    public ResponseEntity<Void> updateAppointment(@RequestBody AppointmentUpdateDTO appointment) {
        appointmentService.updateAppointment(appointment);
        return ResponseEntity.noContent().build();
    }
pamapi/src/main/java/com/pollex/pam/web/rest/ConsultantResource.java
@@ -1,6 +1,5 @@
package com.pollex.pam.web.rest;
import com.pollex.pam.service.AppointmentService;
import com.pollex.pam.service.ConsultantService;
import com.pollex.pam.service.dto.*;
import org.apache.commons.compress.utils.IOUtils;
pamapi/src/main/resources/config/application-dev.yml
@@ -33,6 +33,7 @@
  datasource:
    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:postgresql://dev.pollex.com.tw:5433/pam
    #url: jdbc:postgresql://localhost:5432/omo?currentSchema=omo
    username: pamadmin
    password: pamadmin
    hikari: