fix: audit findings (typing, DTO, encryption, javadoc, service methods)
This commit is contained in:
@@ -100,7 +100,7 @@ public class EmployeeController {
|
|||||||
return ResponseEntity.ok(ApiResponse.ok("직원이 등록되었습니다", created));
|
return ResponseEntity.ok(ApiResponse.ok("직원이 등록되었습니다", created));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "직원 정보 수정", description = "기본 정보(이름/이메일/전화번호/생년월일/학력/전공/졸업일/거주지/프로필사진) 수정")
|
@Operation(summary = "직원 정보 수정", description = "기본 정보(이름/이메일/전화번호/입사일/직급/프로필사진/사수) 수정")
|
||||||
@PreAuthorize("hasRole('ADMIN')")
|
@PreAuthorize("hasRole('ADMIN')")
|
||||||
@PutMapping("/{empId}")
|
@PutMapping("/{empId}")
|
||||||
public ResponseEntity<ApiResponse<Employee>> update(
|
public ResponseEntity<ApiResponse<Employee>> update(
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ public record EmployeeSearchResult(
|
|||||||
Long empId,
|
Long empId,
|
||||||
String name,
|
String name,
|
||||||
String email,
|
String email,
|
||||||
String department
|
String roleCode,
|
||||||
|
String dispatchStatus
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public class EmployeeService {
|
|||||||
e.getEmpId(),
|
e.getEmpId(),
|
||||||
e.getName(),
|
e.getName(),
|
||||||
e.getEmail(),
|
e.getEmail(),
|
||||||
|
e.getRoleCode() != null ? e.getRoleCode().name() : null,
|
||||||
e.getDispatchStatus() != null ? e.getDispatchStatus().name() : null
|
e.getDispatchStatus() != null ? e.getDispatchStatus().name() : null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ public class PhoneEncryptionConverter implements AttributeConverter<String, Stri
|
|||||||
private static final int GCM_IV_LENGTH = 12;
|
private static final int GCM_IV_LENGTH = 12;
|
||||||
private static final int GCM_TAG_LENGTH = 128;
|
private static final int GCM_TAG_LENGTH = 128;
|
||||||
|
|
||||||
private static SecretKey secretKey;
|
private SecretKey secretKey;
|
||||||
private static final SecureRandom secureRandom = new SecureRandom();
|
private final SecureRandom secureRandom = new SecureRandom();
|
||||||
|
|
||||||
public PhoneEncryptionConverter(@Value("${app.encryption.phone-key}") String key) {
|
public PhoneEncryptionConverter(@Value("${app.encryption.phone-key}") String key) {
|
||||||
byte[] keyBytes = key.getBytes();
|
byte[] keyBytes = key.getBytes();
|
||||||
@@ -65,7 +65,7 @@ public class PhoneEncryptionConverter implements AttributeConverter<String, Stri
|
|||||||
cipher.init(Cipher.DECRYPT_MODE, secretKey, new GCMParameterSpec(GCM_TAG_LENGTH, iv));
|
cipher.init(Cipher.DECRYPT_MODE, secretKey, new GCMParameterSpec(GCM_TAG_LENGTH, iv));
|
||||||
return new String(cipher.doFinal(ciphertext));
|
return new String(cipher.doFinal(ciphertext));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return encrypted;
|
throw new RuntimeException("Phone decryption failed", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,22 @@ const ticketService = {
|
|||||||
deleteComment(ticketId: number, commentId: number) {
|
deleteComment(ticketId: number, commentId: number) {
|
||||||
return apiClient.delete<ApiResponse<void>>(`/tickets/${ticketId}/comments/${commentId}`);
|
return apiClient.delete<ApiResponse<void>>(`/tickets/${ticketId}/comments/${commentId}`);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getPendingApprovals() {
|
||||||
|
return apiClient.get<ApiResponse<IssueTicket[]>>('/tickets/pending');
|
||||||
|
},
|
||||||
|
|
||||||
|
approveTicket(ticketId: number) {
|
||||||
|
return apiClient.post<ApiResponse<IssueTicket>>(`/tickets/${ticketId}/approve`);
|
||||||
|
},
|
||||||
|
|
||||||
|
rejectTicket(ticketId: number, reason: string) {
|
||||||
|
return apiClient.post<ApiResponse<IssueTicket>>(`/tickets/${ticketId}/reject`, { reason });
|
||||||
|
},
|
||||||
|
|
||||||
|
reopenTicket(ticketId: number) {
|
||||||
|
return apiClient.post<ApiResponse<IssueTicket>>(`/tickets/${ticketId}/reopen`);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ticketService;
|
export default ticketService;
|
||||||
|
|||||||
+2
-5
@@ -126,9 +126,7 @@ export interface IssueTicket {
|
|||||||
ticketId: number;
|
ticketId: number;
|
||||||
projectId?: number;
|
projectId?: number;
|
||||||
projectName?: string;
|
projectName?: string;
|
||||||
requesterId: number;
|
|
||||||
requesterName?: string;
|
requesterName?: string;
|
||||||
assigneeId: number | null;
|
|
||||||
assigneeName?: string | null;
|
assigneeName?: string | null;
|
||||||
category: TicketCategory;
|
category: TicketCategory;
|
||||||
priority: TicketPriority;
|
priority: TicketPriority;
|
||||||
@@ -138,12 +136,11 @@ export interface IssueTicket {
|
|||||||
dueDate: string | null;
|
dueDate: string | null;
|
||||||
resolvedAt: string | null;
|
resolvedAt: string | null;
|
||||||
resolutionNote: string | null;
|
resolutionNote: string | null;
|
||||||
slaWarnFlag: 'Y' | 'N';
|
slaWarnFlag: boolean;
|
||||||
isImminent?: boolean;
|
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
|
||||||
attachmentUrl?: string;
|
attachmentUrl?: string;
|
||||||
attachmentName?: string;
|
attachmentName?: string;
|
||||||
|
isImminent?: boolean;
|
||||||
approverId?: number;
|
approverId?: number;
|
||||||
backupApproverId?: number;
|
backupApproverId?: number;
|
||||||
approvedBy?: number;
|
approvedBy?: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user