lrj
5 天以前 7ba080d35812e6db7bd5aa8f88161c02653eb6c1
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package com.rongyichuang.employee.dto.response;
 
import com.rongyichuang.employee.entity.Employee;
 
/**
 * 员工响应DTO
 */
public class EmployeeResponse {
    private Long id;
    private String name;
    private String phone;
    private String roleId;
    private String description;
    private String createTime;
    private String updateTime;
 
    // 构造函数
    public EmployeeResponse() {}
 
    public EmployeeResponse(Employee employee) {
        this.id = employee.getId();
        this.name = employee.getName();
        this.phone = employee.getPhone();
        this.roleId = employee.getRoleId();
        this.description = employee.getDescription();
        this.createTime = employee.getCreateTime() != null ? employee.getCreateTime().toString() : null;
        this.updateTime = employee.getUpdateTime() != null ? employee.getUpdateTime().toString() : null;
    }
 
    // Getter和Setter方法
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getPhone() {
        return phone;
    }
 
    public void setPhone(String phone) {
        this.phone = phone;
    }
 
    public String getRoleId() {
        return roleId;
    }
 
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }
 
    public String getDescription() {
        return description;
    }
 
    public void setDescription(String description) {
        this.description = description;
    }
 
    public String getCreateTime() {
        return createTime;
    }
 
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
 
    public String getUpdateTime() {
        return updateTime;
    }
 
    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}