保誠-保戶業務員媒合平台
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.pollex.pam.service.mapper;
 
import com.pollex.pam.service.dto.AppointmentDTO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
 
import com.pollex.pam.domain.Appointment;
import com.pollex.pam.enums.ContactStatusEnum;
import com.pollex.pam.service.dto.AppointmentCreateDTO;
 
@Service
public class AppointmentDTOMapper {
 
    public Appointment toAppointment(AppointmentCreateDTO source) {
        Appointment target = new Appointment();
        BeanUtils.copyProperties(source, target);
        return target;
    }
 
    public Appointment toAppointment(AppointmentDTO source) {
        Appointment target = new Appointment();
        BeanUtils.copyProperties(source, target);
        return target;
    }
}