260722_01_ENH: 버그 수정 및 개선 사항 수정
This commit is contained in:
@@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -33,6 +34,28 @@ public class ListCallHistController {
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
LocalDateTime now = DateTimeUtil.nowKstLocalDateTime();
|
||||
return listCallHistService.saveCallHistory(prjctIdx, sid, request, ctx.getUserId(), now);
|
||||
return listCallHistService.saveCallHistory(
|
||||
prjctIdx,
|
||||
sid,
|
||||
request,
|
||||
ctx.getUserId(),
|
||||
ctx.getUserCmpn(),
|
||||
ctx.getUserRole(),
|
||||
now
|
||||
);
|
||||
}
|
||||
|
||||
@Operation(summary = "Find list call history by agent session")
|
||||
@GetMapping("/session/{agentSessionId}")
|
||||
public ListCallHistDto findByAgentSessionId(
|
||||
@PathVariable String agentSessionId,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return listCallHistService.findByAgentSessionId(
|
||||
agentSessionId,
|
||||
ctx.getUserId(),
|
||||
ctx.getUserCmpn(),
|
||||
ctx.getUserRole()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,6 +199,18 @@ public class ListController {
|
||||
return buildZipResponse(projectInfoDto.getPrjctName() + " item_files.zip", bytes);
|
||||
}
|
||||
|
||||
@Operation(summary = "리스트 단건 파일 다운로드")
|
||||
@GetMapping("/item-file/download/{prjctIdx}/{sid}/{listHderId}")
|
||||
public ResponseEntity<byte[]> downloadOneItemFile(
|
||||
@PathVariable Long prjctIdx,
|
||||
@PathVariable Integer sid,
|
||||
@PathVariable Integer listHderId
|
||||
) {
|
||||
getProjectOrThrow(prjctIdx);
|
||||
ListUploadFileInfoDto file = listDownloadService.downloadItemFile(prjctIdx, sid, listHderId);
|
||||
return buildFileResponse(file.getFileName(), file.getBytes());
|
||||
}
|
||||
|
||||
@Operation(summary = "리스트 초기화")
|
||||
@DeleteMapping("/{prjctIdx}")
|
||||
public int resetList(
|
||||
@@ -244,4 +256,14 @@ public class ListController {
|
||||
.contentType(MediaType.parseMediaType("application/zip"))
|
||||
.body(bytes);
|
||||
}
|
||||
|
||||
private ResponseEntity<byte[]> buildFileResponse(String fileName, byte[] bytes) {
|
||||
String contentDisposition = "attachment; filename*=UTF-8''" +
|
||||
URLEncoder.encode(fileName, StandardCharsets.UTF_8).replace("+", "%20");
|
||||
|
||||
return ResponseEntity.ok()
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, contentDisposition)
|
||||
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
||||
.body(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,8 @@ public class ListHistoryController {
|
||||
request,
|
||||
ctx.getClientIp(),
|
||||
ctx.getUserId(),
|
||||
ctx.getUserCmpn(),
|
||||
ctx.getUserRole(),
|
||||
now
|
||||
);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class ProjectController {
|
||||
);
|
||||
req.getProjectInfo().setContactSenario(newHtml);
|
||||
|
||||
projectService.updateProject(prjctIdx, req, ctx.getUserId(), now);
|
||||
projectService.updateProject(prjctIdx, req, ctx.getUserId(), now, ctx);
|
||||
|
||||
systemEventLogService.writeUpdateProject(ctx.getUserId(), now, ctx.getClientIp(), prjctIdx,
|
||||
req);
|
||||
|
||||
Reference in New Issue
Block a user