관리자 관리수정, 에러코드 공통 추가
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package com.kamco.cd.kamcoback.members.dto;
|
||||
|
||||
import com.kamco.cd.kamcoback.common.enums.RoleType;
|
||||
import com.kamco.cd.kamcoback.common.enums.StatusType;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import com.kamco.cd.kamcoback.config.enums.EnumType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
@@ -22,11 +25,13 @@ public class MembersDto {
|
||||
private Long id;
|
||||
private UUID uuid;
|
||||
private String userRole;
|
||||
private String userRoleName;
|
||||
private String name;
|
||||
private String userId;
|
||||
private String employeeNo;
|
||||
private String tempPassword;
|
||||
private String status;
|
||||
private String statusName;
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime createdDttm;
|
||||
@JsonFormatDttm
|
||||
@@ -40,11 +45,13 @@ public class MembersDto {
|
||||
Long id,
|
||||
UUID uuid,
|
||||
String userRole,
|
||||
String userRoleName,
|
||||
String name,
|
||||
String userId,
|
||||
String employeeNo,
|
||||
String tempPassword,
|
||||
String status,
|
||||
String statusName,
|
||||
ZonedDateTime createdDttm,
|
||||
ZonedDateTime updatedDttm,
|
||||
ZonedDateTime firstLoginDttm,
|
||||
@@ -53,16 +60,29 @@ public class MembersDto {
|
||||
this.id = id;
|
||||
this.uuid = uuid;
|
||||
this.userRole = userRole;
|
||||
this.userRoleName = getUserRoleName(userRole);
|
||||
this.name = name;
|
||||
this.userId = userId;
|
||||
this.employeeNo = employeeNo;
|
||||
this.tempPassword = tempPassword;
|
||||
this.status = status;
|
||||
this.statusName = getStatusName(status);
|
||||
this.createdDttm = createdDttm;
|
||||
this.updatedDttm = updatedDttm;
|
||||
this.firstLoginDttm = firstLoginDttm;
|
||||
this.lastLoginDttm = lastLoginDttm;
|
||||
}
|
||||
|
||||
private String getUserRoleName(String roleId) {
|
||||
RoleType type = EnumType.fromId(RoleType.class, roleId);
|
||||
return type.getText();
|
||||
}
|
||||
|
||||
private String getStatusName(String status) {
|
||||
StatusType type = EnumType.fromId(StatusType.class, status);
|
||||
return type.getText();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
||||
Reference in New Issue
Block a user