상태값 enum 변경, spotlessApply 적용

This commit is contained in:
2025-12-16 14:12:29 +09:00
parent 103242d292
commit 372a1364b2
7 changed files with 40 additions and 27 deletions

View File

@@ -7,9 +7,9 @@ import lombok.Getter;
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
public enum StatusType implements EnumType { public enum StatusType implements EnumType {
ACTIVE("활성"), ACTIVE("사용"),
INACTIVE("미사용"), INACTIVE("미사용"),
PENDING("보류"); PENDING("계정등록");
private final String desc; private final String desc;

View File

@@ -14,7 +14,7 @@ public class CommonStringUtils {
*/ */
public static boolean isValidPassword(String password) { public static boolean isValidPassword(String password) {
String passwordPattern = String passwordPattern =
"^(?=.*[A-Za-z])(?=.*\\d)(?=.*[!@#$%^&*()_+\\-\\[\\]{};':\"\\\\|,.<>/?]).{8,20}$"; "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[!@#$%^&*()_+\\-\\[\\]{};':\"\\\\|,.<>/?=]).{8,20}$";
return Pattern.matches(passwordPattern, password); return Pattern.matches(passwordPattern, password);
} }

View File

@@ -46,7 +46,8 @@ public class MembersDto {
ZonedDateTime createdDttm, ZonedDateTime createdDttm,
ZonedDateTime firstLoginDttm, ZonedDateTime firstLoginDttm,
ZonedDateTime lastLoginDttm, ZonedDateTime lastLoginDttm,
ZonedDateTime statusChgDttm) { ZonedDateTime statusChgDttm,
Boolean pwdResetYn) {
this.id = id; this.id = id;
this.uuid = uuid; this.uuid = uuid;
this.userRole = userRole; this.userRole = userRole;
@@ -54,7 +55,7 @@ public class MembersDto {
this.name = name; this.name = name;
this.employeeNo = employeeNo; this.employeeNo = employeeNo;
this.status = status; this.status = status;
this.statusName = getStatusName(status); this.statusName = getStatusName(status, pwdResetYn);
this.createdDttm = createdDttm; this.createdDttm = createdDttm;
this.firstLoginDttm = firstLoginDttm; this.firstLoginDttm = firstLoginDttm;
this.lastLoginDttm = lastLoginDttm; this.lastLoginDttm = lastLoginDttm;
@@ -66,8 +67,12 @@ public class MembersDto {
return type.getText(); return type.getText();
} }
private String getStatusName(String status) { private String getStatusName(String status, Boolean pwdResetYn) {
StatusType type = Enums.fromId(StatusType.class, status); StatusType type = Enums.fromId(StatusType.class, status);
pwdResetYn = pwdResetYn != null && pwdResetYn;
if (type.equals(StatusType.PENDING) && pwdResetYn) {
type = StatusType.ACTIVE;
}
return type.getText(); return type.getText();
} }
} }

View File

@@ -54,7 +54,8 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt"); NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt");
NumberExpression<Long> doneCount = new CaseBuilder() NumberExpression<Long> doneCount =
new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("DONE")) .when(mapSheetMngHstEntity.dataState.eq("DONE"))
.then(1L) .then(1L)
.otherwise(0L) .otherwise(0L)
@@ -87,7 +88,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
.otherwise(0L) .otherwise(0L)
.sum(), .sum(),
new CaseBuilder() new CaseBuilder()
.when(mapSheetMngHstEntity.syncState.eq("NOFILE") .when(
mapSheetMngHstEntity
.syncState
.eq("NOFILE")
.or(mapSheetMngHstEntity.syncState.eq("NOTPAIR"))) .or(mapSheetMngHstEntity.syncState.eq("NOTPAIR")))
.then(1L) .then(1L)
.otherwise(0L) .otherwise(0L)
@@ -98,7 +102,10 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
.otherwise(0L) .otherwise(0L)
.sum(), .sum(),
new CaseBuilder() new CaseBuilder()
.when(mapSheetMngHstEntity.syncState.eq("TYPEERROR") .when(
mapSheetMngHstEntity
.syncState
.eq("TYPEERROR")
.or(mapSheetMngHstEntity.syncState.eq("SIZEERROR"))) .or(mapSheetMngHstEntity.syncState.eq("SIZEERROR")))
.then(1L) .then(1L)
.otherwise(0L) .otherwise(0L)

View File

@@ -125,7 +125,8 @@ public class MembersRepositoryImpl implements MembersRepositoryCustom {
memberEntity.createdDttm, memberEntity.createdDttm,
memberEntity.firstLoginDttm, memberEntity.firstLoginDttm,
memberEntity.lastLoginDttm, memberEntity.lastLoginDttm,
memberEntity.statusChgDttm)) memberEntity.statusChgDttm,
memberEntity.pwdResetYn))
.from(memberEntity) .from(memberEntity)
.where(builder) .where(builder)
.offset(pageable.getOffset()) .offset(pageable.getOffset())