Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ public class PostDeployRequest {

private String title;
private String contents;
private Long systemId;
private Long deploySystemId; // 배포할 시스템 ID
private LocalDateTime requestAt;
private Long approverId;
private List<String> filePaths;
private Long resourceSystemId; // 파일(리소스)를 가져올 시스템 ID
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ public List<GetRecentDeployResponse> getApprovedDeployList(Long userId, Long per
@Transactional(rollbackFor = IOException.class)
public void requestDeploy(Long userId, PostDeployRequest postDeployRequest) throws IOException {
ServerInfo serverInfo = serverInfoRepository.findServerInfoBySystemId(
postDeployRequest.getSystemId())
postDeployRequest.getResourceSystemId())
.orElseThrow(() -> new NotFoundException(ErrorCode.NOT_EXISTS_SEVER));

Deploy deploy = Deploy.builder()
.requesterId(userId)
.title(postDeployRequest.getTitle())
.contents(postDeployRequest.getContents())
.systemId(postDeployRequest.getSystemId())
.systemId(postDeployRequest.getDeploySystemId())
.requestAt(postDeployRequest.getRequestAt())
.approverId(postDeployRequest.getApproverId())
.status(DeployStatus.REQUESTED)
Expand Down Expand Up @@ -175,7 +175,7 @@ public GetDetailDeployResponse getDetailDeploy(Long id) {

public String getFileContent(Long id, String path) {
Path filePath = Paths.get(localDir, id.toString() + path).normalize();

if (!Files.exists(filePath)) {
throw new InvalidException(ErrorCode.INVALID_FILE_PATH);
}
Expand All @@ -199,7 +199,7 @@ private String extractExtension(String fileName) {
}
return fileName.substring(dotIndex + 1).toLowerCase();
}

@Transactional(readOnly = true)
public GetDeployListResponse searchDeployListByKeyword(String keyword, Pageable pageable) {
Page<GetDeployResponse> deployList = deployRepository.findKeywordByCreatedAt(keyword,
Expand Down