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));
|
||||
}
|
||||
|
||||
@Operation(summary = "직원 정보 수정", description = "기본 정보(이름/이메일/전화번호/생년월일/학력/전공/졸업일/거주지/프로필사진) 수정")
|
||||
@Operation(summary = "직원 정보 수정", description = "기본 정보(이름/이메일/전화번호/입사일/직급/프로필사진/사수) 수정")
|
||||
@PreAuthorize("hasRole('ADMIN')")
|
||||
@PutMapping("/{empId}")
|
||||
public ResponseEntity<ApiResponse<Employee>> update(
|
||||
|
||||
@@ -4,6 +4,7 @@ public record EmployeeSearchResult(
|
||||
Long empId,
|
||||
String name,
|
||||
String email,
|
||||
String department
|
||||
String roleCode,
|
||||
String dispatchStatus
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ public class EmployeeService {
|
||||
e.getEmpId(),
|
||||
e.getName(),
|
||||
e.getEmail(),
|
||||
e.getRoleCode() != null ? e.getRoleCode().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_TAG_LENGTH = 128;
|
||||
|
||||
private static SecretKey secretKey;
|
||||
private static final SecureRandom secureRandom = new SecureRandom();
|
||||
private SecretKey secretKey;
|
||||
private final SecureRandom secureRandom = new SecureRandom();
|
||||
|
||||
public PhoneEncryptionConverter(@Value("${app.encryption.phone-key}") String key) {
|
||||
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));
|
||||
return new String(cipher.doFinal(ciphertext));
|
||||
} catch (Exception e) {
|
||||
return encrypted;
|
||||
throw new RuntimeException("Phone decryption failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,22 @@ const ticketService = {
|
||||
deleteComment(ticketId: number, commentId: number) {
|
||||
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;
|
||||
|
||||
+2
-5
@@ -126,9 +126,7 @@ export interface IssueTicket {
|
||||
ticketId: number;
|
||||
projectId?: number;
|
||||
projectName?: string;
|
||||
requesterId: number;
|
||||
requesterName?: string;
|
||||
assigneeId: number | null;
|
||||
assigneeName?: string | null;
|
||||
category: TicketCategory;
|
||||
priority: TicketPriority;
|
||||
@@ -138,12 +136,11 @@ export interface IssueTicket {
|
||||
dueDate: string | null;
|
||||
resolvedAt: string | null;
|
||||
resolutionNote: string | null;
|
||||
slaWarnFlag: 'Y' | 'N';
|
||||
isImminent?: boolean;
|
||||
slaWarnFlag: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
attachmentUrl?: string;
|
||||
attachmentName?: string;
|
||||
isImminent?: boolean;
|
||||
approverId?: number;
|
||||
backupApproverId?: number;
|
||||
approvedBy?: number;
|
||||
|
||||
Reference in New Issue
Block a user