[MODIFY] EdgeSWVO 및 관련 로직에서 ed_pkg_serial을 pkg_serial로 변경, sw_type에 따른 분기 처리 추가

main
bjkim 8 months ago
parent 44fde0b250
commit 1b49743cd4

@ -168,8 +168,8 @@ public class ExternalAuthController {
@RequestParam("auth_id") String authId, @RequestParam("auth_id") String authId,
@RequestParam @RequestParam
@Schema(description = "엣지 패키지 정보", example = "14", required = true) @Schema(description = "SW/엣지 패키지 정보", example = "14", required = true)
Integer edPkgSerial, Integer pkg_serial,
@RequestParam @RequestParam
@Schema(description = "압축여부(0:단일,1:묶음)", example = "1", required = true) @Schema(description = "압축여부(0:단일,1:묶음)", example = "1", required = true)
@ -214,17 +214,12 @@ public class ExternalAuthController {
edgeSWVO.setAuth_id(authId); edgeSWVO.setAuth_id(authId);
edgeSWVO.setUser_id(userId); edgeSWVO.setUser_id(userId);
edgeSWVO.setCreation_datetime(creationDatetime); edgeSWVO.setCreation_datetime(creationDatetime);
edgeSWVO.setEd_pkg_serial(edPkgSerial); edgeSWVO.setPkg_serial(pkg_serial);
edgeSWVO.setArchive_type(archiveType); edgeSWVO.setArchive_type(archiveType);
edgeSWVO.setDownload_location(downloadLocation); edgeSWVO.setDownload_location(downloadLocation);
edgeSWVO.setExec_yn(execYn); edgeSWVO.setExec_yn(execYn);
edgeSWVO.setSecret_at(secretAt); edgeSWVO.setSecret_at(secretAt);
// 파일이 있으면 S3 업로드 // 파일이 있으면 S3 업로드
if (file != null && !file.isEmpty()) { if (file != null && !file.isEmpty()) {
edgeSWUploadService.uploadFilesToS3Only(edgeSWVO, file); edgeSWUploadService.uploadFilesToS3Only(edgeSWVO, file);

@ -22,8 +22,8 @@ public class EdgeSWVO implements Serializable {
@Schema(description = "다운로드 위치", example = "/opt/edge/download") @Schema(description = "다운로드 위치", example = "/opt/edge/download")
private String download_location; private String download_location;
@Schema(description = "Edge 패키지 일련번호", nullable = true, example = "null") @Schema(description = "Edge/SW 패키지 일련번호", nullable = true, example = "null")
private Integer ed_pkg_serial = null; private Integer pkg_serial = null;
@Schema(description = "SW ID", example = "SW001", required = true) @Schema(description = "SW ID", example = "SW001", required = true)
private String sw_id; private String sw_id;

@ -78,7 +78,14 @@ public class EdgeSWUploadService {
Map<String, Object> jsonBody = new HashMap<>(); Map<String, Object> jsonBody = new HashMap<>();
jsonBody.put("creation_datetime", edgeSWVO.getCreation_datetime()); jsonBody.put("creation_datetime", edgeSWVO.getCreation_datetime());
jsonBody.put("download_location", edgeSWVO.getDownload_location()); jsonBody.put("download_location", edgeSWVO.getDownload_location());
jsonBody.put("ed_pkg_serial", edgeSWVO.getEd_pkg_serial());
if (sw_type == 0){
jsonBody.put("ed_pkg_serial", edgeSWVO.getPkg_serial());
}
else if (sw_type == 1) {
jsonBody.put("ad_pkg_serial", edgeSWVO.getPkg_serial());
}
jsonBody.put("sw_id", edgeSWVO.getSw_id()); jsonBody.put("sw_id", edgeSWVO.getSw_id());
jsonBody.put("sw_version", edgeSWVO.getSw_version()); jsonBody.put("sw_version", edgeSWVO.getSw_version());
jsonBody.put("sw_name", edgeSWVO.getSw_name()); jsonBody.put("sw_name", edgeSWVO.getSw_name());

Loading…
Cancel
Save