Compare commits
60 Commits
dd16d8fb05
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| ad6a302867 | |||
| 548dca52c3 | |||
| 86e4a02759 | |||
| 5f11e3184e | |||
| 3197c4e16f | |||
| ab0eed8587 | |||
| c4ef361c3d | |||
| b15035cb32 | |||
| 88e0ddc274 | |||
| cdb63683d8 | |||
| d5be6c9b8f | |||
| 774c02f258 | |||
| ab5e2f2b8e | |||
| 9b0d3ad5c2 | |||
| fe7c1b0e75 | |||
| fc62f9cb38 | |||
| 05b1aca898 | |||
| 2399b6f352 | |||
| 645cc71192 | |||
| 70ddcdd9c3 | |||
| 64d830fe67 | |||
| 8f9dda7be1 | |||
| 2dbe803972 | |||
| a1e84b2f51 | |||
| f649282d2d | |||
| a1a9a08121 | |||
| 27442b2fc0 | |||
| 5439374711 | |||
| 3c8710f08c | |||
| 3cb37c6a6a | |||
| a13007e314 | |||
| 34f0f15499 | |||
| c48e1e6ab5 | |||
| 006c9d5aa7 | |||
| 02551fdc6a | |||
| 83b3925467 | |||
| b171ffd807 | |||
| 0106b641cf | |||
| 3b95701ed1 | |||
| 9e0ab9fae6 | |||
| 3ca4f72cfa | |||
| 969c21b9a5 | |||
| c9980cc50e | |||
| fd9438d619 | |||
| d0d0410f99 | |||
| e785be94b4 | |||
| d17922f137 | |||
| 0106981e7b | |||
| 7df341622e | |||
| 6a72470a3c | |||
| f7c905f9ff | |||
| 2abd3d8531 | |||
| aa7d6e4da1 | |||
| 91c14eff8c | |||
| 82efee2b1f | |||
| 15db53fe9d | |||
| f15dad9a8b | |||
| 62ad54107c | |||
| 5beb20199f | |||
| 1738507f83 |
@@ -38,7 +38,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.kri.common:starter:beta.1.7.0"
|
||||
implementation "com.kri.common:starter:beta.1.7.1"
|
||||
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||
|
||||
@@ -23,10 +23,11 @@ public final class ContactConstant {
|
||||
public static final int OUTSOURCE_USER_ROLE = 4000;
|
||||
public static final int FIELDWORK_USER_ROLE = 9000;
|
||||
public static final StreamingReadOptions UPPER_CASE_HEADER_OPTIONS =
|
||||
new StreamingReadOptions(null, 0, 1, header -> header == null ? null : header.toUpperCase(
|
||||
new StreamingReadOptions(null, 0, 1, header -> header == null ? null : header.trim().toUpperCase(
|
||||
Locale.ROOT));
|
||||
|
||||
public static final String LIST_HEADER_ACCEPT_REGEX = "^[가-힣a-zA-Z0-9()_\\-\\[\\] ]+$";
|
||||
public static final String LIST_HEADER_COLOR_REGEX = "^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$";
|
||||
|
||||
public static final List<ListHeaderType> DEFAULT_AND_FILE_TYPE = Stream.concat(
|
||||
Arrays.stream(ListHeaderTypeDefault.values())
|
||||
|
||||
@@ -3,11 +3,11 @@ package com.kri.contact.server.common.enums;
|
||||
import java.util.List;
|
||||
|
||||
public enum ListAsyncJobStatus {
|
||||
QUEUED, RUNNING, CANCEL_REQUESTED, CANCELLED, SUCCEEDED, FAILED;
|
||||
QUEUED, RUNNING, CANCEL_REQUESTED, CANCELLED, SUCCEEDED, FAILED, PARTIALLY_SUCCEEDED;
|
||||
|
||||
public static final List<ListAsyncJobStatus> ACTIVE = List.of(QUEUED, RUNNING, CANCEL_REQUESTED);
|
||||
|
||||
public boolean isTerminal() {
|
||||
return this == CANCELLED || this == SUCCEEDED || this == FAILED;
|
||||
return this == CANCELLED || this == SUCCEEDED || this == FAILED || this == PARTIALLY_SUCCEEDED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,12 +22,18 @@ public enum ListHeaderType implements CodeEnum<Short> {
|
||||
EMAIL(ListHeaderTypeSpecific.EMAIL), //31 : 이메일
|
||||
FILE(ListHeaderTypeSpecific.FILE), //81 : 파일업로드
|
||||
CONTENT_ITEM(ListHeaderTypeSpecific.CONTENT_ITEM), //91 : 목록형
|
||||
MULTILINE_TEXT(ListHeaderTypeSpecific.MULTILINE_TEXT), //98 : 여러 줄 텍스트
|
||||
TEXT((short) 99); //99 : 텍스트
|
||||
|
||||
private final Short code;
|
||||
|
||||
ListHeaderType(CodeEnum<Short> source) { this.code = source.getCode();}
|
||||
|
||||
/** 저장·처리 방식이 일반 텍스트와 동일한 타입 여부 */
|
||||
public boolean isText() {
|
||||
return this == TEXT || this == MULTILINE_TEXT;
|
||||
}
|
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
|
||||
public static ListHeaderType fromCode(Short code) {
|
||||
if (code == null) {
|
||||
|
||||
@@ -15,7 +15,8 @@ public enum ListHeaderTypeSpecific implements CodeEnum<Short> {
|
||||
TEL_NUM((short) 21), //21 : 전화번호
|
||||
EMAIL((short) 31), //31 : 이메일
|
||||
FILE((short) 81), //81 : 파일업로드
|
||||
CONTENT_ITEM((short) 91); //목록형
|
||||
CONTENT_ITEM((short) 91), //목록형
|
||||
MULTILINE_TEXT((short) 98); //98 : 여러 줄 텍스트 (텍스트 계열)
|
||||
|
||||
private final Short code;
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public class ContactSurveyApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Unsupported contact survey target profile");
|
||||
throw BusinessException.internalError("UNSUPPORTED_CONTACT_SURVEY_PROFILE", "Unsupported contact survey target profile");
|
||||
}
|
||||
|
||||
private Map<String, String> headers() {
|
||||
|
||||
@@ -1,30 +1,25 @@
|
||||
package com.kri.contact.server.common.external.intranet;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@NoArgsConstructor // Jackson이 빈 객체를 생성할 수 있도록 추가
|
||||
@AllArgsConstructor // Builder 패턴 사용 시 필요
|
||||
@Schema(description = "인트라넷 사용자 검색 응답 DTO")
|
||||
public class SearchLoginInfoResponseDto {
|
||||
public record SearchLoginInfoResponseDto(
|
||||
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
String userId,
|
||||
|
||||
@Schema(description = "사용자 소속 회사")
|
||||
private String userCmpn;
|
||||
String userCmpn,
|
||||
|
||||
@Schema(description = "사용자 이름")
|
||||
private String userNm;
|
||||
String userNm,
|
||||
|
||||
@Schema(description = "사용자 팀")
|
||||
private String userTeam;
|
||||
String userTeam,
|
||||
|
||||
@Schema(description = "사용자 역할")
|
||||
private int userRole;
|
||||
int userRole
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -16,10 +16,6 @@ public enum ChannelType implements CodeEnum<Short> {
|
||||
|
||||
private final Short code;
|
||||
|
||||
ChannelType(CodeEnum<Short> source) {
|
||||
this.code = source.getCode();
|
||||
}
|
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
|
||||
public static ChannelType fromCode(Short code) {
|
||||
if (code == null) {
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.kri.common.feature.web.RequestUserContext;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendCreateRequestDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendInfoDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubBulkSendResponseDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
|
||||
@@ -31,6 +32,8 @@ import com.kri.contact.server.common.external.notihub.dto.NotiHubTemplateBasicDt
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubTemplateDetailDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubTemplateDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubTemplateSummaryDto;
|
||||
import com.kri.contact.server.dto.message.MessageSendCancelBulkRequestDto;
|
||||
import com.kri.contact.server.dto.message.MessageSendCancelSingleRequestDto;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -74,6 +77,22 @@ public class NotiHubApiClient {
|
||||
@Value("${kri.auth.apikey.key}")
|
||||
private String apiKey;
|
||||
|
||||
public ResponseEntity<byte[]> cancelSingle(
|
||||
MessageSendCancelSingleRequestDto body,
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return forward(request, toJsonBytes(body), request.getContentType(), ctx);
|
||||
}
|
||||
|
||||
public ResponseEntity<byte[]> cancelBulk(
|
||||
MessageSendCancelBulkRequestDto body,
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return forward(request, toJsonBytes(body), request.getContentType(), ctx);
|
||||
}
|
||||
|
||||
public NotiHubTemplateDto getTemplate(Long tmplatIdx) {
|
||||
String url = notiHubBaseUrl + "/template/" + tmplatIdx;
|
||||
try {
|
||||
@@ -114,6 +133,13 @@ public class NotiHubApiClient {
|
||||
return sendBulk("/send-kko/bulk", request);
|
||||
}
|
||||
|
||||
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return relay(request, null, new ParameterizedTypeReference<>() {}, ctx);
|
||||
}
|
||||
|
||||
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
|
||||
NotiHubKkoTemplateListRequestDto body,
|
||||
HttpServletRequest request,
|
||||
@@ -180,6 +206,13 @@ public class NotiHubApiClient {
|
||||
return relay(request, null, NotiHubTemplateDetailDto.class, ctx);
|
||||
}
|
||||
|
||||
public ResponseEntity<byte[]> deleteTemplate(
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return forward(request, null, null, ctx);
|
||||
}
|
||||
|
||||
public ResponseEntity<NotiHubTemplateDetailDto> createTemplate(
|
||||
NotiHubTemplateBasicDto template,
|
||||
List<MultipartFile> files,
|
||||
@@ -498,7 +531,8 @@ public class NotiHubApiClient {
|
||||
}
|
||||
|
||||
private String toNotiHubPath(String path) {
|
||||
String notiHubPath = replacePathPrefix(path, "/message-template", "/template");
|
||||
String notiHubPath = replacePathPrefix(path, "/message-send/cancel", "/send/cancel");
|
||||
notiHubPath = replacePathPrefix(notiHubPath, "/message-template", "/template");
|
||||
notiHubPath = replacePathPrefix(notiHubPath, "/message-report", "/report");
|
||||
return replacePathPrefix(notiHubPath, "/report/bulk-detail-excel", "/report/bulk-detail/excel");
|
||||
}
|
||||
|
||||
@@ -5,28 +5,34 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "NotiHubBulkSendCreateRequestDto")
|
||||
public class NotiHubBulkSendCreateRequestDto {
|
||||
public record NotiHubBulkSendCreateRequestDto(
|
||||
|
||||
@Schema(description = "reqstCmpn")
|
||||
private String reqstCmpn;
|
||||
String reqstCmpn,
|
||||
|
||||
@Schema(description = "reqstUser")
|
||||
private String reqstUser;
|
||||
String reqstUser,
|
||||
|
||||
@Schema(description = "reqstSvc")
|
||||
private String reqstSvc;
|
||||
String reqstSvc,
|
||||
|
||||
@Schema(description = "prjctCd")
|
||||
private String prjctCd;
|
||||
String prjctCd,
|
||||
|
||||
@Schema(description = "tmplatIdx")
|
||||
private Long tmplatIdx;
|
||||
Long tmplatIdx,
|
||||
|
||||
@Schema(description = "resve")
|
||||
private Boolean resve;
|
||||
Boolean resve,
|
||||
|
||||
@Schema(description = "sendDt")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime sendDt;
|
||||
LocalDateTime sendDt,
|
||||
|
||||
@Schema(description = "trgtCnt")
|
||||
private Integer trgtCnt;
|
||||
Integer trgtCnt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,23 +3,21 @@ package com.kri.contact.server.common.external.notihub.dto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Schema(description = "NotiHubBulkSendResponseDto")
|
||||
public class NotiHubBulkSendResponseDto {
|
||||
public record NotiHubBulkSendResponseDto(
|
||||
|
||||
@Schema(description = "bulkSendKey")
|
||||
private String bulkSendKey;
|
||||
String bulkSendKey,
|
||||
|
||||
@Schema(description = "requestCount")
|
||||
private Integer requestCount;
|
||||
Integer requestCount,
|
||||
|
||||
@Schema(description = "acceptCount")
|
||||
private Integer acceptCount;
|
||||
Integer acceptCount,
|
||||
|
||||
@Schema(description = "failCount")
|
||||
private Integer failCount;
|
||||
Integer failCount
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,21 +4,24 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "NotiHubDestInfoDto")
|
||||
public class NotiHubDestInfoDto {
|
||||
public record NotiHubDestInfoDto(
|
||||
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@Schema(description = "destEml")
|
||||
private String destEml;
|
||||
String destEml,
|
||||
|
||||
@Schema(description = "destTel")
|
||||
private String destTel;
|
||||
String destTel,
|
||||
|
||||
@Schema(description = "destNm")
|
||||
private String destNm;
|
||||
String destNm,
|
||||
|
||||
@Schema(description = "msgParam")
|
||||
private Map<String, String> msgParam;
|
||||
Map<String, String> msgParam
|
||||
) {
|
||||
}
|
||||
|
||||
11
src/main/java/com/kri/contact/server/common/external/notihub/dto/NotiHubKkoSenderProfileDto.java
vendored
Normal file
11
src/main/java/com/kri/contact/server/common/external/notihub/dto/NotiHubKkoSenderProfileDto.java
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.kri.contact.server.common.external.notihub.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "Kakao sender profile")
|
||||
public record NotiHubKkoSenderProfileDto(
|
||||
String senderKey,
|
||||
String name,
|
||||
String uuid
|
||||
) {
|
||||
}
|
||||
@@ -3,33 +3,50 @@ package com.kri.contact.server.common.external.notihub.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class NotiHubKkoTemplateDetailDto {
|
||||
public record NotiHubKkoTemplateDetailDto(
|
||||
|
||||
private String templateCode;
|
||||
private String templateName;
|
||||
private String templateContent;
|
||||
private String templatePreviewMessage;
|
||||
private String templateMessageType;
|
||||
private String templateEmphasizeType;
|
||||
private String inspectionStatus;
|
||||
private String status;
|
||||
private Boolean block;
|
||||
private Boolean dormant;
|
||||
private String templateExtra;
|
||||
private String templateImageName;
|
||||
private String templateImageUrl;
|
||||
private String templateTitle;
|
||||
private String templateSubtitle;
|
||||
private String templateHeader;
|
||||
private JsonNode templateItemHighlight;
|
||||
private JsonNode templateItem;
|
||||
private JsonNode templateRepresentLink;
|
||||
private List<JsonNode> buttons;
|
||||
private List<JsonNode> quickReplies;
|
||||
String templateCode,
|
||||
|
||||
String templateName,
|
||||
|
||||
String templateContent,
|
||||
|
||||
String templatePreviewMessage,
|
||||
|
||||
String templateMessageType,
|
||||
|
||||
String templateEmphasizeType,
|
||||
|
||||
String inspectionStatus,
|
||||
|
||||
String status,
|
||||
|
||||
Boolean block,
|
||||
|
||||
Boolean dormant,
|
||||
|
||||
String templateExtra,
|
||||
|
||||
String templateImageName,
|
||||
|
||||
String templateImageUrl,
|
||||
|
||||
String templateTitle,
|
||||
|
||||
String templateSubtitle,
|
||||
|
||||
String templateHeader,
|
||||
|
||||
JsonNode templateItemHighlight,
|
||||
|
||||
JsonNode templateItem,
|
||||
|
||||
JsonNode templateRepresentLink,
|
||||
|
||||
List<JsonNode> buttons,
|
||||
|
||||
List<JsonNode> quickReplies
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
package com.kri.contact.server.common.external.notihub.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class NotiHubKkoTemplateDetailRequestDto {
|
||||
public record NotiHubKkoTemplateDetailRequestDto(
|
||||
|
||||
@Schema(description = "Selected sender profile key; validated by NotiHub", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
String senderKey,
|
||||
@NotBlank
|
||||
@Size(max = 30)
|
||||
@Pattern(regexp = "[A-Za-z0-9_-]+")
|
||||
private String templateCode;
|
||||
String templateCode
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
package com.kri.contact.server.common.external.notihub.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
public class NotiHubKkoTemplateListRequestDto {
|
||||
public record NotiHubKkoTemplateListRequestDto(
|
||||
|
||||
@Schema(description = "Selected sender profile key; validated by NotiHub", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
String senderKey,
|
||||
@Size(min = 2, max = 50)
|
||||
private String keyword;
|
||||
String keyword
|
||||
) {
|
||||
|
||||
public NotiHubKkoTemplateListRequestDto(String keyword) {
|
||||
setKeyword(keyword);
|
||||
}
|
||||
|
||||
public void setKeyword(String keyword) {
|
||||
this.keyword = keyword == null || keyword.isBlank() ? null : keyword.trim();
|
||||
public NotiHubKkoTemplateListRequestDto {
|
||||
keyword = keyword == null || keyword.isBlank() ? null : keyword.trim();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
package com.kri.contact.server.common.external.notihub.dto;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class NotiHubKkoTemplateListResponseDto {
|
||||
public record NotiHubKkoTemplateListResponseDto(
|
||||
|
||||
private int totalCount;
|
||||
private int totalPage;
|
||||
private int currentPage;
|
||||
private List<NotiHubKkoTemplateSummaryDto> list;
|
||||
int totalCount,
|
||||
|
||||
int totalPage,
|
||||
|
||||
int currentPage,
|
||||
|
||||
List<NotiHubKkoTemplateSummaryDto> list
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
package com.kri.contact.server.common.external.notihub.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class NotiHubKkoTemplateSummaryDto {
|
||||
public record NotiHubKkoTemplateSummaryDto(
|
||||
|
||||
private String templateCode;
|
||||
private String templateName;
|
||||
private String serviceStatus;
|
||||
private String createdAt;
|
||||
private String modifiedAt;
|
||||
String templateCode,
|
||||
|
||||
String templateName,
|
||||
|
||||
String serviceStatus,
|
||||
|
||||
String createdAt,
|
||||
|
||||
String modifiedAt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,21 +4,24 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "NotiHubSendRequestBulkDto")
|
||||
public class NotiHubSendRequestBulkDto {
|
||||
public record NotiHubSendRequestBulkDto(
|
||||
|
||||
@Schema(description = "sendEml")
|
||||
private String sendEml;
|
||||
String sendEml,
|
||||
|
||||
@Schema(description = "sendTel")
|
||||
private String sendTel;
|
||||
String sendTel,
|
||||
|
||||
@Schema(description = "sendNm")
|
||||
private String sendNm;
|
||||
String sendNm,
|
||||
|
||||
@Schema(description = "bulkSendKey")
|
||||
private String bulkSendKey;
|
||||
String bulkSendKey,
|
||||
|
||||
@Schema(description = "destInfoList")
|
||||
private List<NotiHubDestInfoDto> destInfoList;
|
||||
List<NotiHubDestInfoDto> destInfoList
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,29 +4,36 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "NotiHubSendRequestSingleDto")
|
||||
public class NotiHubSendRequestSingleDto {
|
||||
public record NotiHubSendRequestSingleDto(
|
||||
|
||||
@Schema(description = "sendEml")
|
||||
private String sendEml;
|
||||
String sendEml,
|
||||
|
||||
@Schema(description = "sendTel")
|
||||
private String sendTel;
|
||||
String sendTel,
|
||||
|
||||
@Schema(description = "sendNm")
|
||||
private String sendNm;
|
||||
String sendNm,
|
||||
|
||||
@Schema(description = "destInfo")
|
||||
private NotiHubDestInfoDto destInfo;
|
||||
NotiHubDestInfoDto destInfo,
|
||||
|
||||
@Schema(description = "tmplatIdx")
|
||||
private Long tmplatIdx;
|
||||
Long tmplatIdx,
|
||||
|
||||
@Schema(description = "reqstSvc")
|
||||
private String reqstSvc;
|
||||
String reqstSvc,
|
||||
|
||||
@Schema(description = "prjctCd")
|
||||
private String prjctCd;
|
||||
String prjctCd,
|
||||
|
||||
@Schema(description = "resve")
|
||||
private Boolean resve;
|
||||
Boolean resve,
|
||||
|
||||
@Schema(description = "sendDt")
|
||||
private LocalDateTime sendDt;
|
||||
LocalDateTime sendDt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,32 +3,27 @@ package com.kri.contact.server.common.external.notihub.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Schema(description = "NotiHubSendResultLastWithSidDto")
|
||||
public class NotiHubSendResultLastWithSidDto {
|
||||
public record NotiHubSendResultLastWithSidDto(
|
||||
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@Schema(description = "lastResultCode")
|
||||
private Integer lastResultCode;
|
||||
Integer lastResultCode,
|
||||
|
||||
@Schema(description = "lastResultLabel")
|
||||
private String lastResultLabel;
|
||||
String lastResultLabel,
|
||||
|
||||
@Schema(description = "lastResultViewLabel")
|
||||
private String lastResultViewLabel;
|
||||
String lastResultViewLabel,
|
||||
|
||||
@Schema(description = "lastSendDt")
|
||||
private LocalDateTime lastSendDt;
|
||||
LocalDateTime lastSendDt,
|
||||
|
||||
@Schema(description = "totalSendCount")
|
||||
private Integer totalSendCount;
|
||||
Integer totalSendCount
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,18 +3,18 @@ package com.kri.contact.server.common.external.notihub.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Schema(description = "NotiHubSendSingleResponseDto")
|
||||
public class NotiHubSendSingleResponseDto {
|
||||
public record NotiHubSendSingleResponseDto(
|
||||
|
||||
@Schema(description = "NotiHub send identifier for single cancellation")
|
||||
Long sendIdx,
|
||||
|
||||
@Schema(description = "cmid")
|
||||
private String cmid;
|
||||
String cmid,
|
||||
|
||||
@Schema(description = "data")
|
||||
private Map<String, Object> data;
|
||||
Map<String, Object> data
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class NotiHubTemplateBasicDto extends NotiHubExtensibleDto {
|
||||
private Short tmplatPurpose;
|
||||
|
||||
@NotBlank
|
||||
@Size(max = 32)
|
||||
@Size(max = 128)
|
||||
private String tmplatNm;
|
||||
|
||||
@Size(max = 128)
|
||||
|
||||
@@ -3,29 +3,30 @@ package com.kri.contact.server.common.external.notihub.dto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Schema(description = "NotiHubTemplateDto")
|
||||
public class NotiHubTemplateDto {
|
||||
public record NotiHubTemplateDto(
|
||||
|
||||
@Schema(description = "tmplatIdx")
|
||||
private Long tmplatIdx;
|
||||
Long tmplatIdx,
|
||||
|
||||
@Schema(description = "tmplatPurpose")
|
||||
private Integer tmplatPurpose;
|
||||
Integer tmplatPurpose,
|
||||
|
||||
@Schema(description = "tmplatTitle")
|
||||
private String tmplatTitle;
|
||||
String tmplatTitle,
|
||||
|
||||
@Schema(description = "tmplatBody")
|
||||
private String tmplatBody;
|
||||
String tmplatBody,
|
||||
|
||||
@Schema(description = "sendTel")
|
||||
private String sendTel;
|
||||
String sendTel,
|
||||
|
||||
@Schema(description = "sendEml")
|
||||
private String sendEml;
|
||||
String sendEml,
|
||||
|
||||
@Schema(description = "sendNm")
|
||||
private String sendNm;
|
||||
String sendNm
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.kri.contact.server.common.external.shorturl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class ShortUrlCreateRequestDto {
|
||||
public record ShortUrlCreateRequestDto(
|
||||
|
||||
private String orgUrl;
|
||||
private boolean useParam;
|
||||
String orgUrl,
|
||||
|
||||
boolean useParam
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.kri.contact.server.controller;
|
||||
|
||||
import com.kri.common.feature.auth.dto.JwtUserClaimsDto;
|
||||
import com.kri.common.feature.datetime.DateTimeUtil;
|
||||
import com.kri.common.feature.web.RequestUserContext;
|
||||
import com.kri.contact.server.dto.auth.LoginRequestDto;
|
||||
@@ -11,6 +12,10 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.CacheControl;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.annotation.CurrentSecurityContext;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -35,11 +40,19 @@ public class AuthController {
|
||||
final LocalDateTime now = DateTimeUtil.nowKstLocalDateTime();
|
||||
|
||||
LoginResponseDto response = authService.tryLogin(request);
|
||||
systemEventLogService.writeLoginLog(response.getUser().getUserId(), now, ctx.getClientIp());
|
||||
systemEventLogService.writeLoginLog(response.user().getUserId(), now, ctx.getClientIp());
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@Operation(summary = "현재 인증 사용자 조회")
|
||||
@GetMapping("/my-info")
|
||||
public ResponseEntity<JwtUserClaimsDto> myInfo(
|
||||
@CurrentSecurityContext(expression = "authentication.details") JwtUserClaimsDto user
|
||||
) {
|
||||
return ResponseEntity.ok().cacheControl(CacheControl.noStore()).body(user);
|
||||
}
|
||||
|
||||
@Operation(summary = "로그아웃 요청")
|
||||
@PostMapping("/logout/{userId}")
|
||||
public boolean logout(@PathVariable String userId, RequestUserContext ctx) {
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.kri.contact.server.controller;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.kri.common.feature.web.RequestUserContext;
|
||||
import com.kri.contact.server.service.KartService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/kart/project")
|
||||
@RequiredArgsConstructor
|
||||
@Validated
|
||||
public class KartController {
|
||||
|
||||
private final KartService kartService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public JsonNode projects(
|
||||
@RequestParam @NotBlank @Size(max = 32) String intranetCode,
|
||||
@RequestParam @Min(0) @Max(1) int projectType,
|
||||
@RequestParam(defaultValue = "") String keyword,
|
||||
HttpServletRequest request,
|
||||
RequestUserContext user
|
||||
) {
|
||||
return kartService.projects(intranetCode, projectType, keyword, request, user);
|
||||
}
|
||||
|
||||
@PostMapping("/{projectType}/{pkey}/share")
|
||||
public String reportUrl(
|
||||
@PathVariable @Min(0) @Max(1) int projectType,
|
||||
@PathVariable String pkey,
|
||||
HttpServletRequest request,
|
||||
RequestUserContext user
|
||||
) {
|
||||
return kartService.reportUrl(projectType, pkey, request, user);
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,6 @@ 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.PatchMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -66,27 +64,4 @@ public class ListCallHistController {
|
||||
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()
|
||||
);
|
||||
}
|
||||
|
||||
@Operation(summary = "Update Call History at Client Hangup")
|
||||
@PatchMapping("hangup/{agentSessionId}")
|
||||
public boolean hangupClient(
|
||||
@PathVariable String agentSessionId,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return listCallHistService.hangupClient(agentSessionId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class ListController {
|
||||
) {
|
||||
getProjectOrThrow(prjctIdx);
|
||||
ListUploadFileInfoDto uploadFile = listUploadService.downloadUploadFile(prjctIdx, listUploadLogId);
|
||||
return buildExcelResponse(uploadFile.getFileName(), uploadFile.getBytes());
|
||||
return buildExcelResponse(uploadFile.fileName(), uploadFile.bytes());
|
||||
}
|
||||
|
||||
@Operation(summary = "리스트 수정")
|
||||
@@ -147,7 +147,7 @@ public class ListController {
|
||||
) {
|
||||
getProjectOrThrow(prjctIdx);
|
||||
ListUploadFileInfoDto file = listDownloadService.downloadItemFile(prjctIdx, sid, listHderId);
|
||||
return buildFileResponse(file.getFileName(), file.getBytes());
|
||||
return buildFileResponse(file.fileName(), file.bytes());
|
||||
}
|
||||
|
||||
private ProjectInfoDto getProjectOrThrow(Long prjctIdx) {
|
||||
|
||||
@@ -58,8 +58,8 @@ public class ListHistoryController {
|
||||
@Valid @RequestBody ListEventHistFromSurveyDto request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
if (request.getMeta().getRemoteAddr() == null) {
|
||||
request.getMeta().setRemoteAddr(ctx.getClientIp());
|
||||
if (request.meta().getRemoteAddr() == null) {
|
||||
request.meta().setRemoteAddr(ctx.getClientIp());
|
||||
}
|
||||
String regUser = resolveRegUser(request, ctx);
|
||||
final LocalDateTime now = DateTimeUtil.nowKstLocalDateTime();
|
||||
@@ -103,7 +103,7 @@ public class ListHistoryController {
|
||||
if (ctx.getUserId() != null) {
|
||||
return ctx.getUserId();
|
||||
}
|
||||
ListEventHistSurveyMetaDto meta = request.getMeta();
|
||||
ListEventHistSurveyMetaDto meta = request.meta();
|
||||
if (meta != null && meta.getEntryType() != null) {
|
||||
return meta.getEntryType().name();
|
||||
}
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
package com.kri.contact.server.controller;
|
||||
|
||||
import com.kri.common.feature.web.RequestUserContext;
|
||||
import com.kri.contact.server.dto.message.MessageSendCancelBulkRequestDto;
|
||||
import com.kri.contact.server.dto.message.MessageSendCancelResponseDto;
|
||||
import com.kri.contact.server.dto.message.MessageSendCancelSingleRequestDto;
|
||||
import com.kri.contact.server.dto.message.MessageSendSingleRequestDto;
|
||||
import com.kri.contact.server.dto.message.MessageSendSingleResponseDto;
|
||||
import com.kri.contact.server.service.MessageSendService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -22,6 +31,30 @@ public class MessageSendController {
|
||||
|
||||
private final MessageSendService messageSendService;
|
||||
|
||||
@Operation(summary = "Cancel a scheduled message")
|
||||
@ApiResponse(responseCode = "200", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
|
||||
schema = @Schema(implementation = MessageSendCancelResponseDto.class)))
|
||||
@PostMapping(value = "/cancel/single", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<byte[]> cancelSingle(
|
||||
@Valid @RequestBody MessageSendCancelSingleRequestDto body,
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return messageSendService.cancelSingle(body, request, ctx);
|
||||
}
|
||||
|
||||
@Operation(summary = "Cancel eligible scheduled messages in a bulk send")
|
||||
@ApiResponse(responseCode = "200", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
|
||||
schema = @Schema(implementation = MessageSendCancelResponseDto.class)))
|
||||
@PostMapping(value = "/cancel/bulk", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<byte[]> cancelBulk(
|
||||
@Valid @RequestBody MessageSendCancelBulkRequestDto body,
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return messageSendService.cancelBulk(body, request, ctx);
|
||||
}
|
||||
|
||||
@Operation(summary = "Email single send")
|
||||
@PostMapping("/email/single/{prjctIdx}")
|
||||
public MessageSendSingleResponseDto sendEmailSingle(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.kri.contact.server.controller;
|
||||
|
||||
import com.kri.common.feature.web.RequestUserContext;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoSenderProfileDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateDetailRequestDto;
|
||||
import com.kri.contact.server.common.external.notihub.dto.NotiHubKkoTemplateListRequestDto;
|
||||
@@ -16,6 +17,7 @@ import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PatchMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -36,6 +38,14 @@ public class MessageTemplateController {
|
||||
|
||||
private final MessageTemplateService messageTemplateService;
|
||||
|
||||
@GetMapping("/kko/profiles")
|
||||
public ResponseEntity<List<NotiHubKkoSenderProfileDto>> getKkoSenderProfiles(
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return messageTemplateService.getKkoSenderProfiles(request, ctx);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/kko/list", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<NotiHubKkoTemplateListResponseDto> getKkoTemplateList(
|
||||
@Valid @RequestBody NotiHubKkoTemplateListRequestDto body,
|
||||
@@ -72,6 +82,15 @@ public class MessageTemplateController {
|
||||
return messageTemplateService.getTemplate(request, ctx);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{tmplatIdx:[0-9]+}")
|
||||
public ResponseEntity<byte[]> deleteTemplate(
|
||||
@PathVariable Long tmplatIdx,
|
||||
HttpServletRequest request,
|
||||
RequestUserContext ctx
|
||||
) {
|
||||
return messageTemplateService.deleteTemplate(tmplatIdx, request, ctx);
|
||||
}
|
||||
|
||||
@GetMapping("/{tmplatIdx:[0-9]+}/attachment")
|
||||
public ResponseEntity<byte[]> getAttachment(
|
||||
@PathVariable Long tmplatIdx,
|
||||
|
||||
@@ -116,10 +116,10 @@ public class ProjectController {
|
||||
final LocalDateTime now = DateTimeUtil.nowKstLocalDateTime();
|
||||
|
||||
String newHtml = contactScenarioFileService.syncOnSave(
|
||||
req.getProjectInfo().getPrjctCd(),
|
||||
req.getProjectInfo().getContactSenario()
|
||||
req.projectInfo().getPrjctCd(),
|
||||
req.projectInfo().getContactSenario()
|
||||
);
|
||||
req.getProjectInfo().setContactSenario(newHtml);
|
||||
req.projectInfo().setContactSenario(newHtml);
|
||||
|
||||
projectService.updateProject(prjctIdx, req, ctx.getUserId(), now, ctx);
|
||||
|
||||
|
||||
@@ -2,14 +2,15 @@ package com.kri.contact.server.dto.assign;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "외주사별 리스트 배정 현황")
|
||||
public class CompanyAssignSummaryItemDto {
|
||||
public record CompanyAssignSummaryItemDto(
|
||||
|
||||
private String cmpnId;
|
||||
private String cmpnAlias;
|
||||
private long assignedCount;
|
||||
String cmpnId,
|
||||
|
||||
String cmpnAlias,
|
||||
|
||||
long assignedCount
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -2,15 +2,17 @@ package com.kri.contact.server.dto.assign;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "필드워커별 리스트 배정 현황")
|
||||
public class FieldworkAssignSummaryItemDto {
|
||||
public record FieldworkAssignSummaryItemDto(
|
||||
|
||||
private String userId;
|
||||
private String userName;
|
||||
private String userCmpn;
|
||||
private long assignedCount;
|
||||
String userId,
|
||||
|
||||
String userName,
|
||||
|
||||
String userCmpn,
|
||||
|
||||
long assignedCount
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,14 +3,15 @@ package com.kri.contact.server.dto.assign;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "프로젝트 외주사 리스트 배정 요약")
|
||||
public class ProjectCompanyAssignSummaryDto {
|
||||
public record ProjectCompanyAssignSummaryDto(
|
||||
|
||||
private long totalCount;
|
||||
private long unassignedCount;
|
||||
private List<CompanyAssignSummaryItemDto> assignees;
|
||||
long totalCount,
|
||||
|
||||
long unassignedCount,
|
||||
|
||||
List<CompanyAssignSummaryItemDto> assignees
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,14 +3,15 @@ package com.kri.contact.server.dto.assign;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "프로젝트 필드워커 리스트 배정 요약")
|
||||
public class ProjectFieldworkAssignSummaryDto {
|
||||
public record ProjectFieldworkAssignSummaryDto(
|
||||
|
||||
private long totalCount;
|
||||
private long unassignedCount;
|
||||
private List<FieldworkAssignSummaryItemDto> assignees;
|
||||
long totalCount,
|
||||
|
||||
long unassignedCount,
|
||||
|
||||
List<FieldworkAssignSummaryItemDto> assignees
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
package com.kri.contact.server.dto.auth;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "사용자 로그인 요청")
|
||||
public class LoginRequestDto {
|
||||
public record LoginRequestDto(
|
||||
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
String userId,
|
||||
|
||||
@Schema(description = "사용자 PW")
|
||||
private String userPw;
|
||||
String userPw
|
||||
) {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LoginRequestDto[redacted]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,18 +4,17 @@ package com.kri.contact.server.dto.auth;
|
||||
import com.kri.common.feature.auth.dto.JwtUserClaimsDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "로그인 응답")
|
||||
public class LoginResponseDto {
|
||||
public record LoginResponseDto(
|
||||
|
||||
@Schema(description = "jwt access 토큰")
|
||||
private String accessToken;
|
||||
String accessToken,
|
||||
|
||||
@Schema(description = "사용자 정보")
|
||||
private JwtUserClaimsDto user;
|
||||
JwtUserClaimsDto user
|
||||
) {
|
||||
|
||||
public static LoginResponseDto from(String accessToken, JwtUserClaimsDto jwtUserClaims) {
|
||||
return LoginResponseDto.builder()
|
||||
@@ -23,4 +22,9 @@ public class LoginResponseDto {
|
||||
.user(jwtUserClaims)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LoginResponseDto[redacted]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,58 +7,51 @@ import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "회사 정보")
|
||||
public class CmpnInfoDto {
|
||||
public record CmpnInfoDto(
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "회사 id(회사이름)")
|
||||
private String cmpnId;
|
||||
String cmpnId,
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "회사 별칭")
|
||||
private String cmpnAlias;
|
||||
String cmpnAlias,
|
||||
|
||||
@Size(max = 16)
|
||||
@Schema(description = "회사 전화번호")
|
||||
private String cmpnTel;
|
||||
String cmpnTel,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "자사 여부")
|
||||
private Boolean ownCmpn;
|
||||
Boolean ownCmpn,
|
||||
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
String memo,
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
String regUser,
|
||||
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
LocalDateTime regDt,
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
String modUser,
|
||||
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
LocalDateTime modDt
|
||||
) {
|
||||
|
||||
public static CmpnInfoDto from(TCmpnEntity entity) {
|
||||
return CmpnInfoDto.builder()
|
||||
|
||||
@@ -1,30 +1,40 @@
|
||||
package com.kri.contact.server.dto.common;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonSetter;
|
||||
import com.fasterxml.jackson.annotation.Nulls;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@JsonDeserialize(builder = DataVerificationDto.JsonBuilder.class)
|
||||
@Schema(description = "데이터 검증에 대한 공용 Dto")
|
||||
public class DataVerificationDto {
|
||||
public record DataVerificationDto(
|
||||
|
||||
@Schema(description = "데이터 검증 통과 여부")
|
||||
private boolean success;
|
||||
boolean success,
|
||||
|
||||
@Schema(description = "검증 필드명")
|
||||
private String fieldName;
|
||||
String fieldName,
|
||||
|
||||
@Schema(description = "검증 메시지(error)")
|
||||
private String errMessage;
|
||||
String errMessage
|
||||
) {
|
||||
|
||||
public DataVerificationDto() {
|
||||
this.success = true;
|
||||
this.fieldName = "";
|
||||
this.errMessage = "";
|
||||
this(true, "", "");
|
||||
}
|
||||
|
||||
@JsonPOJOBuilder(withPrefix = "")
|
||||
public static class JsonBuilder {
|
||||
@JsonSetter(nulls = Nulls.AS_EMPTY)
|
||||
public boolean success = true;
|
||||
public String fieldName = "";
|
||||
public String errMessage = "";
|
||||
|
||||
public DataVerificationDto build() {
|
||||
return new DataVerificationDto(success, fieldName, errMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,22 +2,16 @@ package com.kri.contact.server.dto.common;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "날짜 범위 Dto")
|
||||
public class DateRangeDto {
|
||||
public record DateRangeDto(
|
||||
|
||||
@Schema(description = "시작 날짜")
|
||||
private LocalDateTime startDate;
|
||||
LocalDateTime startDate,
|
||||
|
||||
@Schema(description = "종료 날짜")
|
||||
private LocalDateTime endDate;
|
||||
LocalDateTime endDate
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -2,32 +2,29 @@ package com.kri.contact.server.dto.excel;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@Schema(description = "ExcelUploadResultDto")
|
||||
public class ExcelUploadResultDto {
|
||||
public record ExcelUploadResultDto(
|
||||
|
||||
@Schema(description = "전체 읽은 행 수 (헤더 제외)")
|
||||
private int totalCount;
|
||||
int totalCount,
|
||||
|
||||
@Schema(description = "DB에 실제로 insert/update 성공한 개수")
|
||||
private int successCount;
|
||||
int successCount,
|
||||
|
||||
@Schema(description = "실패(에러) 개수")
|
||||
private int failCount;
|
||||
int failCount,
|
||||
|
||||
@Schema(description = "에러 엑셀 파일이 있는지 여부")
|
||||
private boolean hasErrorFile;
|
||||
boolean hasErrorFile,
|
||||
|
||||
@Schema(description = "프론트가 저장용으로 쓸 파일명")
|
||||
private String errorFileName;
|
||||
String errorFileName,
|
||||
|
||||
@Schema(description = "에러 엑셀 파일 (xlsx)의 Base64 문자열 (hasErrorFile == true일 때만 세팅)")
|
||||
private String errorFileBase64;
|
||||
String errorFileBase64
|
||||
) {
|
||||
|
||||
public static ExcelUploadResultDto success(int totalCount, int successCount) {
|
||||
return ExcelUploadResultDto.builder()
|
||||
@@ -37,5 +34,4 @@ public class ExcelUploadResultDto {
|
||||
.hasErrorFile(false)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,28 +6,23 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.AssertTrue;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "마지막 이벤트 일자 필터 조건")
|
||||
public class LastEventDateRangeDto {
|
||||
public record LastEventDateRangeDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "결과 코드 타입")
|
||||
private ResultCodeType resultCodeType;
|
||||
ResultCodeType resultCodeType,
|
||||
|
||||
@Schema(description = "프로젝트 설문 고유번호. SURVEY 타입인 경우 필수")
|
||||
private Long prjctSurveyIdx;
|
||||
Long prjctSurveyIdx,
|
||||
|
||||
@Schema(description = "시작 일시")
|
||||
private LocalDateTime startDate;
|
||||
LocalDateTime startDate,
|
||||
|
||||
@Schema(description = "종료 일시")
|
||||
private LocalDateTime endDate;
|
||||
LocalDateTime endDate
|
||||
) {
|
||||
|
||||
@JsonIgnore
|
||||
@AssertTrue(message = "SURVEY 타입은 prjctSurveyIdx가 필요합니다.")
|
||||
|
||||
@@ -5,53 +5,71 @@ import com.kri.contact.server.persistence.entity.TListCallHistEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "ListCallHistDto")
|
||||
public class ListCallHistDto {
|
||||
public record ListCallHistDto(
|
||||
|
||||
@Schema(description = "listCallHistIdx")
|
||||
private Long listCallHistIdx;
|
||||
Long listCallHistIdx,
|
||||
|
||||
@Schema(description = "prjctIdx")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@Schema(description = "listHderId")
|
||||
private Integer listHderId;
|
||||
Integer listHderId,
|
||||
|
||||
@Schema(description = "destNum")
|
||||
private String destNum;
|
||||
String destNum,
|
||||
|
||||
@Schema(description = "agentNum")
|
||||
private String agentNum;
|
||||
String agentNum,
|
||||
|
||||
@Schema(description = "aniNum")
|
||||
private String aniNum;
|
||||
String aniNum,
|
||||
|
||||
@Schema(description = "agentSessionId")
|
||||
private String agentSessionId;
|
||||
String agentSessionId,
|
||||
|
||||
@Schema(description = "destSessionId")
|
||||
private String destSessionId;
|
||||
String destSessionId,
|
||||
|
||||
@Schema(description = "callTy")
|
||||
private String callTy;
|
||||
String callTy,
|
||||
|
||||
@Schema(description = "callStatus")
|
||||
private CallStatus callStatus;
|
||||
CallStatus callStatus,
|
||||
|
||||
@Schema(description = "startDt")
|
||||
private LocalDateTime startDt;
|
||||
LocalDateTime startDt,
|
||||
|
||||
@Schema(description = "endDt")
|
||||
private LocalDateTime endDt;
|
||||
LocalDateTime endDt,
|
||||
|
||||
@Schema(description = "totalTime")
|
||||
private Integer totalTime;
|
||||
Integer totalTime,
|
||||
|
||||
@Schema(description = "talkTime")
|
||||
private Integer talkTime;
|
||||
Integer talkTime,
|
||||
|
||||
@Schema(description = "mediaServerId")
|
||||
private Integer mediaServerId;
|
||||
Integer mediaServerId,
|
||||
|
||||
@Schema(description = "mediaServerName")
|
||||
private String mediaServerName;
|
||||
String mediaServerName,
|
||||
|
||||
@Schema(description = "recordFileName")
|
||||
private String recordFileName;
|
||||
String recordFileName,
|
||||
|
||||
@Schema(description = "regUser")
|
||||
private String regUser;
|
||||
String regUser,
|
||||
|
||||
@Schema(description = "regDt")
|
||||
private LocalDateTime regDt;
|
||||
LocalDateTime regDt
|
||||
) {
|
||||
|
||||
public static ListCallHistDto from(TListCallHistEntity entity) {
|
||||
return ListCallHistDto.builder()
|
||||
|
||||
@@ -9,37 +9,32 @@ import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "리스트 + 컨택이력 다운로드 요청 DTO")
|
||||
public class ListEventHistDownloadRequestDto {
|
||||
public record ListEventHistDownloadRequestDto(
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@Schema(description = "리스트 필터")
|
||||
private ListFilterDto listFilter;
|
||||
ListFilterDto listFilter,
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "조회할 ResultCodeType 목록")
|
||||
private List<ResultCodeType> resultCodeTypes;
|
||||
List<ResultCodeType> resultCodeTypes,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "조회 기준")
|
||||
private ListEventHistoryBase searchBase;
|
||||
ListEventHistoryBase searchBase,
|
||||
|
||||
@Schema(description = "이력 정렬 순서. ASC=오래된 이력 우선, DESC=최근 이력 우선", defaultValue = "ASC")
|
||||
private ListEventHistoryOrder historyOrder = ListEventHistoryOrder.ASC;
|
||||
ListEventHistoryOrder historyOrder,
|
||||
|
||||
@Valid
|
||||
@Schema(description = "조회 기간")
|
||||
private DateRangeDto dateRange;
|
||||
DateRangeDto dateRange
|
||||
) {
|
||||
|
||||
public ListEventHistoryOrder getHistoryOrder() {
|
||||
public ListEventHistoryOrder historyOrder() {
|
||||
return historyOrder == null ? ListEventHistoryOrder.ASC : historyOrder;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,30 +4,25 @@ import com.kri.contact.server.common.enums.ListEventHistorySurveyType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "설문 결과 입력 DTO")
|
||||
public class ListEventHistFromSurveyDto {
|
||||
public record ListEventHistFromSurveyDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "설문 action 코드")
|
||||
private ListEventHistorySurveyType action;
|
||||
ListEventHistorySurveyType action,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 설문 고유번호")
|
||||
private Long prjctSurveyIdx;
|
||||
Long prjctSurveyIdx,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "리스트 고유번호")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
@Schema(description = "메타 데이터")
|
||||
private ListEventHistSurveyMetaDto meta;
|
||||
ListEventHistSurveyMetaDto meta
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,40 +4,35 @@ import com.kri.contact.server.common.enums.ResultCodeType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "내부 리스트 이벤트 이력 추가 요청 DTO")
|
||||
public class ListEventHistInsertRequestDto {
|
||||
public record ListEventHistInsertRequestDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 고유 번호")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "리스트 고유 번호")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "결과 코드 타입")
|
||||
private ResultCodeType resultCodeType;
|
||||
ResultCodeType resultCodeType,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "결과 코드")
|
||||
private Integer resultCd;
|
||||
Integer resultCd,
|
||||
|
||||
@Schema(description = "전화 이력 id")
|
||||
private Long listCallHistIdx;
|
||||
Long listCallHistIdx,
|
||||
|
||||
@Valid
|
||||
@Schema(description = "메타 데이터")
|
||||
private ListEventHistInternalMetaDto meta;
|
||||
ListEventHistInternalMetaDto meta,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "사용자 메모")
|
||||
private String memo;
|
||||
String memo
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,55 +1,32 @@
|
||||
package com.kri.contact.server.dto.list;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "ListEventHistInternalMetaDto")
|
||||
public class ListEventHistInternalMetaDto {
|
||||
public record ListEventHistInternalMetaDto(
|
||||
|
||||
@Schema(description = "GPS 위도")
|
||||
private Double latitude;
|
||||
Double latitude,
|
||||
|
||||
@Schema(description = "GPS 경도")
|
||||
private Double longitude;
|
||||
Double longitude,
|
||||
|
||||
@Schema(description = "GPS 위치 정확도(미터)")
|
||||
private Double accuracy;
|
||||
Double accuracy,
|
||||
|
||||
@Schema(description = "요청 클라이언트 IP 주소")
|
||||
private String remoteAddr;
|
||||
|
||||
@Builder(access = AccessLevel.PRIVATE)
|
||||
private ListEventHistInternalMetaDto(
|
||||
Double latitude,
|
||||
Double longitude,
|
||||
Double accuracy,
|
||||
String remoteAddr
|
||||
) {
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
this.accuracy = accuracy;
|
||||
this.remoteAddr = remoteAddr;
|
||||
}
|
||||
String remoteAddr
|
||||
) {
|
||||
|
||||
public static ListEventHistInternalMetaDto withRemoteAddr(
|
||||
ListEventHistInternalMetaDto meta,
|
||||
String remoteAddr
|
||||
) {
|
||||
if (meta == null) {
|
||||
meta = new ListEventHistInternalMetaDto();
|
||||
}
|
||||
return ListEventHistInternalMetaDto.builder()
|
||||
.latitude(meta.getLatitude())
|
||||
.longitude(meta.getLongitude())
|
||||
.accuracy(meta.getAccuracy())
|
||||
.remoteAddr(remoteAddr)
|
||||
.build();
|
||||
return new ListEventHistInternalMetaDto(
|
||||
meta == null ? null : meta.latitude(),
|
||||
meta == null ? null : meta.longitude(),
|
||||
meta == null ? null : meta.accuracy(),
|
||||
remoteAddr
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,35 +4,44 @@ import com.kri.contact.server.persistence.entity.TListEventHistEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "ListEventHistoryDto")
|
||||
public class ListEventHistoryDto {
|
||||
public record ListEventHistoryDto(
|
||||
|
||||
@Schema(description = "listEventHistIdx")
|
||||
private Long listEventHistIdx;
|
||||
Long listEventHistIdx,
|
||||
|
||||
@Schema(description = "eventTy")
|
||||
private Short eventTy;
|
||||
Short eventTy,
|
||||
|
||||
@Schema(description = "prjctIdx")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@Schema(description = "prjctSurveyIdx")
|
||||
private Long prjctSurveyIdx;
|
||||
Long prjctSurveyIdx,
|
||||
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@Schema(description = "resultCd")
|
||||
private Integer resultCd;
|
||||
Integer resultCd,
|
||||
|
||||
@Schema(description = "metaData")
|
||||
private String metaData;
|
||||
String metaData,
|
||||
|
||||
@Schema(description = "listCallHistIdx")
|
||||
private Long listCallHistIdx;
|
||||
Long listCallHistIdx,
|
||||
|
||||
@Schema(description = "memo")
|
||||
private String memo;
|
||||
String memo,
|
||||
|
||||
@Schema(description = "regUser")
|
||||
private String regUser;
|
||||
String regUser,
|
||||
|
||||
@Schema(description = "regDt")
|
||||
private LocalDateTime regDt;
|
||||
LocalDateTime regDt
|
||||
) {
|
||||
|
||||
public static ListEventHistoryDto from(TListEventHistEntity entity) {
|
||||
return ListEventHistoryDto.builder()
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.kri.contact.server.common.enums.ListHeaderType;
|
||||
import com.kri.contact.server.persistence.entity.TListHeaderEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
@@ -44,6 +45,9 @@ public class ListHeaderDto {
|
||||
@Schema(description = "헤더 타입")
|
||||
private ListHeaderType listHderTy;
|
||||
|
||||
@Schema(description = "헤더 색상 hex (#RRGGBB 또는 #RRGGBBAA, null: 기본색)")
|
||||
private String listHderColor;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "필터 사용 여부")
|
||||
private Boolean useFilter = false;
|
||||
@@ -60,6 +64,29 @@ public class ListHeaderDto {
|
||||
@Schema(description = "면접원 수정가능 여부")
|
||||
private Boolean useIntrvwerEdit = false;
|
||||
|
||||
public String getListHderNm() {
|
||||
return listHderNm == null ? null : listHderNm.trim();
|
||||
}
|
||||
|
||||
public void setListHderNm(String listHderNm) {
|
||||
this.listHderNm = listHderNm == null ? null : listHderNm.trim();
|
||||
}
|
||||
|
||||
public String getListHderColor() {
|
||||
return normalizeColor(listHderColor);
|
||||
}
|
||||
|
||||
public void setListHderColor(String listHderColor) {
|
||||
this.listHderColor = normalizeColor(listHderColor);
|
||||
}
|
||||
|
||||
private static String normalizeColor(String color) {
|
||||
if (color == null || color.isBlank()) {
|
||||
return null;
|
||||
}
|
||||
return color.trim().toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
public static ListHeaderDto fromEntity(TListHeaderEntity entity) {
|
||||
return ListHeaderDto.builder()
|
||||
.prjctIdx(entity.getPrjctIdx())
|
||||
@@ -68,6 +95,7 @@ public class ListHeaderDto {
|
||||
.listHderGrad(ListHeaderGrade.fromCode(entity.getListHderGrad()))
|
||||
.listHderNm(entity.getListHderNm())
|
||||
.listHderTy(ListHeaderType.fromCode(entity.getListHderTy()))
|
||||
.listHderColor(entity.getListHderColor())
|
||||
.useFilter(entity.getUseFilter())
|
||||
.useColView(entity.getUseColView())
|
||||
.useIntrvwerView(entity.getUseIntrvwerView())
|
||||
@@ -83,6 +111,7 @@ public class ListHeaderDto {
|
||||
.listHderGrad(src.getListHderGrad())
|
||||
.listHderNm(src.getListHderNm())
|
||||
.listHderTy(src.getListHderTy())
|
||||
.listHderColor(src.getListHderColor())
|
||||
.useFilter(src.getUseFilter())
|
||||
.useColView(src.getUseColView())
|
||||
.useIntrvwerView(src.getUseIntrvwerView())
|
||||
@@ -96,7 +125,7 @@ public class ListHeaderDto {
|
||||
.listHderId(headerId)
|
||||
.listHderOrder((short) headerId)
|
||||
.listHderGrad(ListHeaderGrade.COMMON)
|
||||
.listHderNm(headerName)
|
||||
.listHderNm(headerName == null ? null : headerName.trim())
|
||||
.listHderTy(type)
|
||||
.useFilter(true)
|
||||
.useColView(true)
|
||||
@@ -109,13 +138,13 @@ public class ListHeaderDto {
|
||||
return Objects.equals(listHderId, dto.listHderId) &&
|
||||
Objects.equals(listHderOrder, dto.listHderOrder) &&
|
||||
Objects.equals(listHderGrad, dto.listHderGrad) &&
|
||||
Objects.equals(listHderNm, dto.listHderNm) &&
|
||||
Objects.equals(getListHderNm(), dto.getListHderNm()) &&
|
||||
Objects.equals(listHderTy, dto.listHderTy);
|
||||
}
|
||||
|
||||
public boolean isEqualSimple(ListHeaderDto dto) {
|
||||
return Objects.equals(listHderId, dto.listHderId) &&
|
||||
Objects.equals(listHderGrad, dto.listHderGrad) &&
|
||||
Objects.equals(listHderNm, dto.listHderNm);
|
||||
Objects.equals(getListHderNm(), dto.getListHderNm());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ public class ListHeaderWithFilterContentDto extends ListHeaderDto {
|
||||
.listHderGrad(ListHeaderGrade.fromCode(entity.getListHderGrad()))
|
||||
.listHderNm(entity.getListHderNm())
|
||||
.listHderTy(ListHeaderType.fromCode(entity.getListHderTy()))
|
||||
.listHderColor(entity.getListHderColor())
|
||||
.useFilter(entity.getUseFilter())
|
||||
.useColView(entity.getUseColView())
|
||||
.useIntrvwerView(entity.getUseIntrvwerView())
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.kri.contact.server.common.enums.ListResetMode;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@@ -14,10 +15,21 @@ import lombok.Setter;
|
||||
@Schema(description = "리스트 초기화 요청 DTO")
|
||||
public class ListResetRequestDto {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "초기화 범위")
|
||||
@Schema(description = "기존 초기화 모드(0: 전체, 1: 전체 이력). 신규 선택 필드와 함께 사용할 수 없습니다.", deprecated = true)
|
||||
private ListResetMode resetMode;
|
||||
|
||||
@Schema(description = "리스트 초기화 여부. true이면 모든 이력과 연동 설문을 선택해야 합니다.")
|
||||
private Boolean resetList;
|
||||
|
||||
@Schema(description = "컨택이력 초기화 여부")
|
||||
private Boolean resetContactHistory;
|
||||
|
||||
@Schema(description = "면접이력 초기화 여부")
|
||||
private Boolean resetInterviewHistory;
|
||||
|
||||
@Schema(description = "상태이력을 초기화할 프로젝트 설문 고유번호 목록. 미선택은 빈 배열")
|
||||
private List<Long> resetSurveyIds;
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@Schema(description = "리스트 필터")
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.kri.contact.server.dto.list;
|
||||
|
||||
import com.kri.contact.server.common.enums.ListResetMode;
|
||||
import java.util.Set;
|
||||
|
||||
public record ListResetScopeDto(
|
||||
ListResetMode mode,
|
||||
boolean selective,
|
||||
boolean contactHistory,
|
||||
boolean interviewHistory,
|
||||
Set<Long> surveyIds
|
||||
) {
|
||||
public ListResetScopeDto {
|
||||
surveyIds = Set.copyOf(surveyIds);
|
||||
}
|
||||
}
|
||||
@@ -2,25 +2,19 @@ package com.kri.contact.server.dto.list;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "외부에서 리스트 조회")
|
||||
public class ListSearchExternalDto {
|
||||
public record ListSearchExternalDto(
|
||||
|
||||
@Schema(description = "프로젝트 코드")
|
||||
private String prjctCd;
|
||||
String prjctCd,
|
||||
|
||||
@Schema(description = "SID")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@Schema(description = "리스트 값 정보(헤더 네임 기반)")
|
||||
private Map<String, String> itemList;
|
||||
Map<String, String> itemList
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,28 +4,21 @@ import com.kri.common.feature.web.page.PageRequestDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "리스트 검색 조건")
|
||||
public class ListSearchRequestDto {
|
||||
public record ListSearchRequestDto(
|
||||
|
||||
@Valid
|
||||
@NotNull
|
||||
@Schema(description = "리스트 필터")
|
||||
private ListFilterDto listFilter;
|
||||
ListFilterDto listFilter,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "페이지네이션 정보")
|
||||
private PageRequestDto pageRequest;
|
||||
PageRequestDto pageRequest
|
||||
) {
|
||||
|
||||
public static ListSearchRequestDto of(ListFilterDto listFilter, PageRequestDto pageRequest){
|
||||
return ListSearchRequestDto.builder()
|
||||
|
||||
@@ -28,11 +28,11 @@ public class ListSendResultDto extends ListResultBaseDto {
|
||||
}
|
||||
|
||||
return ListSendResultDto.builder()
|
||||
.lastResultCd(dto.getLastResultCode() == null ? null : dto.getLastResultCode().shortValue())
|
||||
.lastResultDt(dto.getLastSendDt())
|
||||
.attemptCount(dto.getTotalSendCount())
|
||||
.lastResultLabel(dto.getLastResultLabel())
|
||||
.lastResultViewLabel(dto.getLastResultViewLabel())
|
||||
.lastResultCd(dto.lastResultCode() == null ? null : dto.lastResultCode().shortValue())
|
||||
.lastResultDt(dto.lastSendDt())
|
||||
.attemptCount(dto.totalSendCount())
|
||||
.lastResultLabel(dto.lastResultLabel())
|
||||
.lastResultViewLabel(dto.lastResultViewLabel())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,21 +4,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "설문별 결과 필터 조건")
|
||||
public class ListSurveyResultFilterConditionDto {
|
||||
public record ListSurveyResultFilterConditionDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 설문 고유번호")
|
||||
private Long prjctSurveyIdx;
|
||||
Long prjctSurveyIdx,
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "설문 결과 코드 목록")
|
||||
private Set<Integer> resultCodes;
|
||||
Set<Integer> resultCodes
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -2,21 +2,16 @@ package com.kri.contact.server.dto.list;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "설문 결과 수정 내용")
|
||||
public class ListSurveyResultUpdateDto {
|
||||
public record ListSurveyResultUpdateDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 설문 고유번호")
|
||||
private Long prjctSurveyIdx;
|
||||
Long prjctSurveyIdx,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "설문 결과 코드")
|
||||
private Integer resultCd;
|
||||
Integer resultCd
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,29 +5,35 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.kri.contact.server.persistence.entity.TListUpdateHistEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "ListUpdateHistoryDto")
|
||||
public class ListUpdateHistoryDto {
|
||||
public record ListUpdateHistoryDto(
|
||||
|
||||
@Schema(description = "listUpdateHistIdx")
|
||||
private Long listUpdateHistIdx;
|
||||
Long listUpdateHistIdx,
|
||||
|
||||
@Schema(description = "prjctIdx")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@Schema(description = "listHderId")
|
||||
private Integer listHderId;
|
||||
Integer listHderId,
|
||||
|
||||
@Schema(description = "beforeVal")
|
||||
private String beforeVal;
|
||||
String beforeVal,
|
||||
|
||||
@Schema(description = "afterVal")
|
||||
private String afterVal;
|
||||
String afterVal,
|
||||
|
||||
@Schema(description = "regUser")
|
||||
private String regUser;
|
||||
String regUser,
|
||||
|
||||
@Schema(description = "regDt")
|
||||
private LocalDateTime regDt;
|
||||
LocalDateTime regDt
|
||||
) {
|
||||
|
||||
public static ListUpdateHistoryDto from(TListUpdateHistEntity entity) {
|
||||
return ListUpdateHistoryDto.builder()
|
||||
|
||||
@@ -2,16 +2,15 @@ package com.kri.contact.server.dto.list;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "리스트 업로드 파일 정보")
|
||||
public class ListUploadFileInfoDto {
|
||||
public record ListUploadFileInfoDto(
|
||||
|
||||
@Schema(description = "파일명")
|
||||
private String fileName;
|
||||
String fileName,
|
||||
|
||||
@Schema(description = "파일 바이트")
|
||||
private byte[] bytes;
|
||||
byte[] bytes
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,36 +5,35 @@ import com.kri.contact.server.persistence.entity.TListUploadLogEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "리스트 업로드 이력")
|
||||
public class ListUploadHistoryDto {
|
||||
public record ListUploadHistoryDto(
|
||||
|
||||
@Schema(description = "리스트 업로드 로그 ID")
|
||||
private String listUploadLogId;
|
||||
String listUploadLogId,
|
||||
|
||||
@Schema(description = "업로드 차수")
|
||||
private Integer wave;
|
||||
Integer wave,
|
||||
|
||||
@Schema(description = "업로드 파일명")
|
||||
private String fileName;
|
||||
String fileName,
|
||||
|
||||
@Schema(description = "업로드 리스트 수")
|
||||
private Integer listCount;
|
||||
Integer listCount,
|
||||
|
||||
@Schema(description = "업로드 모드")
|
||||
private ListUploadMode uploadMode;
|
||||
ListUploadMode uploadMode,
|
||||
|
||||
@Schema(description = "등록 사용자")
|
||||
private String regUser;
|
||||
String regUser,
|
||||
|
||||
@Schema(description = "등록 일시")
|
||||
private LocalDateTime regDt;
|
||||
LocalDateTime regDt,
|
||||
|
||||
@Schema(description = "업로드 파일 자동삭제 일시")
|
||||
private LocalDateTime schedulingDelDt;
|
||||
LocalDateTime schedulingDelDt
|
||||
) {
|
||||
|
||||
public static ListUploadHistoryDto fromEntity(TListUploadLogEntity entity) {
|
||||
return ListUploadHistoryDto.builder()
|
||||
|
||||
@@ -5,26 +5,21 @@ import com.kri.contact.server.common.enums.ListUploadMode;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "리스트 업로드 요청 DTO")
|
||||
public class ListUploadRequestDto {
|
||||
public record ListUploadRequestDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "업로드 모드")
|
||||
private ListUploadMode uploadMode;
|
||||
ListUploadMode uploadMode,
|
||||
|
||||
@Schema(description = "이메일 중복 체크")
|
||||
private boolean checkDuplicateEmail;
|
||||
boolean checkDuplicateEmail,
|
||||
|
||||
@Schema(description = "전화번호 중복 체크")
|
||||
private boolean checkDuplicatePhone;
|
||||
boolean checkDuplicatePhone,
|
||||
|
||||
@Schema(description = "특수 헤더 정보")
|
||||
private Map<String, ListHeaderTypeSpecific> specificHeader;
|
||||
Map<String, ListHeaderTypeSpecific> specificHeader
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
public record ListAsyncAvailabilityDto(ListAsyncJobType requestedJobType, boolean allowed,
|
||||
String reasonCode, int blockerCount, List<Blocker> blockers) {
|
||||
String reasonCode, int blockerCount, List<Blocker> blockers,
|
||||
ListAsyncMutationCompletionDto mutationCompletion) {
|
||||
public record Blocker(ListAsyncJobType jobType, ListAsyncJobStatus jobStatus,
|
||||
String blockingPhase, String requestUserId, String requestUserName,
|
||||
boolean mine, String jobKey, LocalDateTime regDt, ListAsyncAssignOperation operation) {}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.kri.contact.server.dto.list.async;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/** Existing job history summary; no separate data version is stored. */
|
||||
public record ListAsyncMutationCompletionDto(long finishedCount, LocalDateTime lastFinishedAt) {}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.kri.contact.server.dto.message;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "MessageFailedChunkDto")
|
||||
public class MessageFailedChunkDto {
|
||||
|
||||
@Schema(description = "chunkIndex")
|
||||
private int chunkIndex;
|
||||
@Schema(description = "from")
|
||||
private int from;
|
||||
@Schema(description = "to")
|
||||
private int to;
|
||||
@Schema(description = "targetCount")
|
||||
private int targetCount;
|
||||
@Schema(description = "errorMessage")
|
||||
private String errorMessage;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.kri.contact.server.dto.message;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonSetter;
|
||||
import com.fasterxml.jackson.annotation.Nulls;
|
||||
import com.kri.contact.server.dto.list.ListFilterDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
@@ -8,39 +10,35 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "Message bulk send request")
|
||||
public class MessageSendBulkRequestDto {
|
||||
public record MessageSendBulkRequestDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "템플릿 고유 번호", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long tmplatIdx;
|
||||
Long tmplatIdx,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "예약 발송 여부", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Boolean resve;
|
||||
Boolean resve,
|
||||
|
||||
@Schema(description = "예약 발송 일시")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime sendDt;
|
||||
LocalDateTime sendDt,
|
||||
|
||||
@Valid
|
||||
@Schema(description = "리스트 필터")
|
||||
private ListFilterDto listFilter;
|
||||
ListFilterDto listFilter,
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "수신처로 사용할 리스트 헤더 ID 목록", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<Integer> destHeaderIds;
|
||||
List<Integer> destHeaderIds,
|
||||
|
||||
@Schema(description = "수신자 이름으로 사용할 리스트 헤더 ID")
|
||||
private Integer destNameHeaderId;
|
||||
Integer destNameHeaderId,
|
||||
|
||||
@Schema(description = "수신처 중복 제거 여부", defaultValue = "false")
|
||||
private Boolean dedupe = false;
|
||||
@JsonSetter(nulls = Nulls.AS_EMPTY)
|
||||
boolean dedupe
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.kri.contact.server.dto.message;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "MessageBulkSendResponseDto")
|
||||
public class MessageSendBulkResponseDto {
|
||||
|
||||
@Schema(description = "bulkSendKey")
|
||||
private String bulkSendKey;
|
||||
@Schema(description = "targetCount")
|
||||
private int targetCount;
|
||||
@Schema(description = "requestCount")
|
||||
private int requestCount;
|
||||
@Schema(description = "acceptCount")
|
||||
private int acceptCount;
|
||||
@Schema(description = "failCount")
|
||||
private int failCount;
|
||||
@Builder.Default
|
||||
@Schema(description = "failedChunks")
|
||||
private List<MessageFailedChunkDto> failedChunks = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.kri.contact.server.dto.message;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
@Schema(description = "Bulk scheduled message cancellation request")
|
||||
public record MessageSendCancelBulkRequestDto(
|
||||
@NotBlank @Size(max = 32)
|
||||
@Schema(description = "NotiHub bulk send key", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
String bulkSendKey
|
||||
) {}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.kri.contact.server.dto.message;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "NotiHub cancellation counts; non-cancelable items may be included in a successful response")
|
||||
public record MessageSendCancelResponseDto(
|
||||
long targetCount,
|
||||
long canceledCount,
|
||||
long alreadyCanceledCount,
|
||||
long notCancelableCount
|
||||
) {}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.kri.contact.server.dto.message;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
|
||||
@Schema(description = "Single scheduled message cancellation request")
|
||||
public record MessageSendCancelSingleRequestDto(
|
||||
@NotNull @Positive
|
||||
@Schema(description = "NotiHub send identifier", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
Long sendIdx
|
||||
) {}
|
||||
@@ -6,36 +6,31 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "Message single send request")
|
||||
public class MessageSendSingleRequestDto {
|
||||
public record MessageSendSingleRequestDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "tmplatIdx")
|
||||
private Long tmplatIdx;
|
||||
Long tmplatIdx,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "resve")
|
||||
private Boolean resve;
|
||||
Boolean resve,
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "sendDt")
|
||||
private LocalDateTime sendDt;
|
||||
LocalDateTime sendDt,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@NotEmpty
|
||||
@Schema(description = "destHeaderIds")
|
||||
private List<Integer> destHeaderIds;
|
||||
List<Integer> destHeaderIds,
|
||||
|
||||
@Schema(description = "destNameHeaderId")
|
||||
private Integer destNameHeaderId;
|
||||
Integer destNameHeaderId
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,23 +4,26 @@ import com.kri.contact.server.common.external.notihub.dto.NotiHubSendSingleRespo
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.Map;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "Message single send response")
|
||||
public class MessageSendSingleResponseDto {
|
||||
public record MessageSendSingleResponseDto(
|
||||
|
||||
@Schema(description = "NotiHub send identifier for single cancellation")
|
||||
Long sendIdx,
|
||||
|
||||
@Schema(description = "cmid")
|
||||
private String cmid;
|
||||
String cmid,
|
||||
|
||||
@Schema(description = "data")
|
||||
private Map<String, Object> data;
|
||||
Map<String, Object> data
|
||||
) {
|
||||
|
||||
public static MessageSendSingleResponseDto from(NotiHubSendSingleResponseDto response) {
|
||||
return MessageSendSingleResponseDto.builder()
|
||||
.cmid(response.getCmid())
|
||||
.data(response.getData())
|
||||
.sendIdx(response.sendIdx())
|
||||
.cmid(response.cmid())
|
||||
.data(response.data())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
package com.kri.contact.server.dto.progress;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "진행 현황 조회 요청")
|
||||
public class ProgressSearchRequestDto {
|
||||
public record ProgressSearchRequestDto(
|
||||
|
||||
@Schema(description = "사용자 ID")
|
||||
private String userId;
|
||||
String userId,
|
||||
|
||||
@Schema(description = "회사 ID")
|
||||
private String cmpnId;
|
||||
String cmpnId,
|
||||
|
||||
@Schema(description = "시작일시")
|
||||
private String startDt;
|
||||
String startDt,
|
||||
|
||||
@Schema(description = "종료일시")
|
||||
private String endDt;
|
||||
String endDt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,35 +3,28 @@ package com.kri.contact.server.dto.project;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 생성 요청")
|
||||
public class ProjectCreateRequestDto {
|
||||
public record ProjectCreateRequestDto(
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "프로젝트 명")
|
||||
private String prjctName;
|
||||
String prjctName,
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "인트라넷 프로젝트 코드")
|
||||
private String itrntPrjctCd;
|
||||
String itrntPrjctCd,
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 그룹")
|
||||
private String ownerDept;
|
||||
String ownerDept,
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "담당 실사")
|
||||
private String ownerFw;
|
||||
String ownerFw
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,27 +3,19 @@ package com.kri.contact.server.dto.project;
|
||||
import com.kri.contact.server.common.enums.ChannelType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 생성 요청")
|
||||
public class ProjectMainTemplateUpdateRequestDto {
|
||||
public record ProjectMainTemplateUpdateRequestDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 명")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "템플릿 채널 타입")
|
||||
private ChannelType chnnlTy;
|
||||
ChannelType chnnlTy,
|
||||
|
||||
@Schema(description = "템플릿 ID")
|
||||
private Long tmplatIdx;
|
||||
|
||||
Long tmplatIdx
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -2,20 +2,14 @@ package com.kri.contact.server.dto.project;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "프로젝트 담당들 정보")
|
||||
public class ProjectOwnerResponseDto {
|
||||
public record ProjectOwnerResponseDto(
|
||||
|
||||
@Schema(description = "담당 연구 부서")
|
||||
List<String> ownerDeptList;
|
||||
List<String> ownerDeptList,
|
||||
|
||||
@Schema(description = "담당 실사 인원")
|
||||
List<String> ownerFwList;
|
||||
List<String> ownerFwList
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,26 +3,23 @@ package com.kri.contact.server.dto.project;
|
||||
import com.kri.common.feature.web.page.PageRequestDto;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "프로젝트 검색 조건")
|
||||
public class ProjectSearchRequestDto {
|
||||
public record ProjectSearchRequestDto(
|
||||
|
||||
@Schema(description = "검색 텍스트")
|
||||
private String prjctText; // like 대상
|
||||
String prjctText, // like 대상
|
||||
|
||||
@Schema(description = "프로젝트 상태 리스트")
|
||||
private List<Short> prjctStatusList; // in (0,1,10)
|
||||
List<Short> prjctStatusList, // in (0,1,10)
|
||||
|
||||
@Schema(description = "담당 부서 리스트")
|
||||
private List<String> ownerDeptList; // in ('S101','P101')
|
||||
List<String> ownerDeptList, // in ('S101','P101')
|
||||
|
||||
@Schema(description = "담당 실사 리스트")
|
||||
private List<String> ownerFwList; // in ('jspark','jhchae')
|
||||
List<String> ownerFwList, // in ('jspark','jhchae')
|
||||
|
||||
@Schema(description = "페이지네이션 정보")
|
||||
private PageRequestDto pageRequest;
|
||||
PageRequestDto pageRequest
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -3,21 +3,18 @@ package com.kri.contact.server.dto.project;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "프로젝트 수정 요청")
|
||||
public class ProjectUpdateRequestDto {
|
||||
public record ProjectUpdateRequestDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "프로젝트 정보")
|
||||
private ProjectInfoDto projectInfo;
|
||||
ProjectInfoDto projectInfo,
|
||||
|
||||
@Schema(description = "프로젝트 수정 대상 결과 코드")
|
||||
private List<ResultCodeDto> resultCodeList;
|
||||
List<ResultCodeDto> resultCodeList,
|
||||
|
||||
@Schema(description = "프로젝트 배정 회사 목록")
|
||||
private List<String> assignCmpnIdList;
|
||||
List<String> assignCmpnIdList
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,32 +5,29 @@ import com.kri.contact.server.common.enums.ResultCodeType;
|
||||
import com.kri.contact.server.persistence.entity.TResultCodeEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@Schema(description = "결과 코드")
|
||||
public class ResultCodeDto {
|
||||
public record ResultCodeDto(
|
||||
|
||||
@Schema(description = "결과 코드 고유 키")
|
||||
private String resultCdUUID;
|
||||
String resultCdUUID,
|
||||
|
||||
@Schema(description = "프로젝트 인덱스")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@Schema(description = "결과 코드 타입")
|
||||
private ResultCodeType resultCdTy;
|
||||
ResultCodeType resultCdTy,
|
||||
|
||||
@Schema(description = "결과 코드")
|
||||
private Short resultCd;
|
||||
Short resultCd,
|
||||
|
||||
@Schema(description = "결과 코드 라벨")
|
||||
private String resultCdLbl;
|
||||
String resultCdLbl,
|
||||
|
||||
@Schema(description = "isDefault")
|
||||
private Boolean isDefault;
|
||||
Boolean isDefault
|
||||
) {
|
||||
|
||||
public static ResultCodeDto from(TResultCodeEntity entity) {
|
||||
return ResultCodeDto.builder()
|
||||
|
||||
@@ -5,33 +5,41 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.kri.contact.server.persistence.entity.TListResveEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Schema(description = "ListReserveDto")
|
||||
public class ListReserveDto {
|
||||
public record ListReserveDto(
|
||||
|
||||
@Schema(description = "listResveIdx")
|
||||
private Long listResveIdx;
|
||||
Long listResveIdx,
|
||||
|
||||
@Schema(description = "prjctIdx")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@Schema(description = "프로젝트명")
|
||||
private String prjctName;
|
||||
String prjctName,
|
||||
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@Schema(description = "memo")
|
||||
private String memo;
|
||||
String memo,
|
||||
|
||||
@Schema(description = "cnfirm")
|
||||
private Boolean cnfirm;
|
||||
Boolean cnfirm,
|
||||
|
||||
@Schema(description = "resveDt")
|
||||
private LocalDateTime resveDt;
|
||||
LocalDateTime resveDt,
|
||||
|
||||
@Schema(description = "resveUser")
|
||||
private String resveUser;
|
||||
String resveUser,
|
||||
|
||||
@Schema(description = "regUser")
|
||||
private String regUser;
|
||||
String regUser,
|
||||
|
||||
@Schema(description = "regDt")
|
||||
private LocalDateTime regDt;
|
||||
LocalDateTime regDt
|
||||
) {
|
||||
|
||||
public static ListReserveDto from(TListResveEntity entity) {
|
||||
return from(entity, null);
|
||||
|
||||
@@ -5,29 +5,24 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Schema(description = "ListReserveRequestDto")
|
||||
public class ListReserveRequestDto {
|
||||
public record ListReserveRequestDto(
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "prjctIdx")
|
||||
private Long prjctIdx;
|
||||
Long prjctIdx,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "sid")
|
||||
private String sid;
|
||||
String sid,
|
||||
|
||||
@NotBlank
|
||||
@Schema(description = "userId")
|
||||
private String userId;
|
||||
String userId,
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "resveDt")
|
||||
private LocalDateTime resveDt;
|
||||
LocalDateTime resveDt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -2,23 +2,19 @@ package com.kri.contact.server.dto.systemlog;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "UploadContentDto")
|
||||
public class UploadContentDto {
|
||||
String fileName;
|
||||
String fileType;
|
||||
Long fileSize;
|
||||
public record UploadContentDto(
|
||||
|
||||
String fileName,
|
||||
|
||||
String fileType,
|
||||
|
||||
Long fileSize
|
||||
) {
|
||||
|
||||
public static UploadContentDto from(MultipartFile file){
|
||||
return UploadContentDto.builder()
|
||||
@@ -28,4 +24,3 @@ public class UploadContentDto {
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,40 +5,36 @@ import com.kri.contact.server.persistence.entity.TRoleEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@Schema(description = "권한 정보")
|
||||
public class RoleInfoDto {
|
||||
public record RoleInfoDto(
|
||||
|
||||
@Schema(description = "권한 코드")
|
||||
private Integer roleCd;
|
||||
Integer roleCd,
|
||||
|
||||
@Schema(description = "권한 명")
|
||||
private String roleNm;
|
||||
String roleNm,
|
||||
|
||||
@Schema(description = "메모")
|
||||
private String memo;
|
||||
String memo,
|
||||
|
||||
@Schema(description = "등록자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String regUser;
|
||||
String regUser,
|
||||
|
||||
@Schema(description = "등록일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime regDt;
|
||||
LocalDateTime regDt,
|
||||
|
||||
@Schema(description = "수정자", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private String modUser;
|
||||
String modUser,
|
||||
|
||||
@Schema(description = "수정일시", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
private LocalDateTime modDt;
|
||||
|
||||
LocalDateTime modDt
|
||||
) {
|
||||
|
||||
public static RoleInfoDto from(TRoleEntity roleEntity) {
|
||||
return RoleInfoDto.builder()
|
||||
|
||||
@@ -71,21 +71,21 @@ public class TCmpnEntity {
|
||||
|
||||
public static TCmpnEntity fromDto(CmpnInfoDto dto, String regUser, LocalDateTime regDt) {
|
||||
return TCmpnEntity.builder()
|
||||
.cmpnId(dto.getCmpnId())
|
||||
.cmpnAlias(dto.getCmpnAlias())
|
||||
.cmpnTel(dto.getCmpnTel())
|
||||
.ownCmpn(Boolean.TRUE.equals(dto.getOwnCmpn()))
|
||||
.memo(dto.getMemo())
|
||||
.cmpnId(dto.cmpnId())
|
||||
.cmpnAlias(dto.cmpnAlias())
|
||||
.cmpnTel(dto.cmpnTel())
|
||||
.ownCmpn(Boolean.TRUE.equals(dto.ownCmpn()))
|
||||
.memo(dto.memo())
|
||||
.regUser(regUser)
|
||||
.regDt(regDt)
|
||||
.build();
|
||||
}
|
||||
|
||||
public void updateFromDto(CmpnInfoDto dto, String modUser, LocalDateTime modDt) {
|
||||
this.cmpnAlias = dto.getCmpnAlias();
|
||||
this.cmpnTel = dto.getCmpnTel();
|
||||
this.ownCmpn = Boolean.TRUE.equals(dto.getOwnCmpn());
|
||||
this.memo = dto.getMemo();
|
||||
this.cmpnAlias = dto.cmpnAlias();
|
||||
this.cmpnTel = dto.cmpnTel();
|
||||
this.ownCmpn = Boolean.TRUE.equals(dto.ownCmpn());
|
||||
this.memo = dto.memo();
|
||||
this.modUser = modUser;
|
||||
this.modDt = modDt;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -155,19 +154,6 @@ public class TListCallHistEntity {
|
||||
}
|
||||
|
||||
|
||||
public boolean markUserHangup(LocalDateTime endDt) {
|
||||
if (this.callStatus == CallStatus.CALL_CLOSE) {
|
||||
return false;
|
||||
}
|
||||
LocalDateTime resolvedEndDt = this.endDt == null ? endDt : this.endDt;
|
||||
int durationSeconds = durationSeconds(this.startDt, resolvedEndDt);
|
||||
this.endDt = resolvedEndDt;
|
||||
this.totalTime = durationSeconds;
|
||||
this.talkTime = durationSeconds;
|
||||
this.callStatus = CallStatus.USER_HANGUP;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static LocalDateTime resolveEndDt(ListCallCloseRequestDto request, LocalDateTime now) {
|
||||
return isCompletedRequest(request) ? now : null;
|
||||
}
|
||||
@@ -181,14 +167,6 @@ public class TListCallHistEntity {
|
||||
|| isPositive(request.getTalkTime());
|
||||
}
|
||||
|
||||
private static int durationSeconds(LocalDateTime startDt, LocalDateTime endDt) {
|
||||
if (startDt == null || endDt == null || endDt.isBefore(startDt)) {
|
||||
return 0;
|
||||
}
|
||||
long seconds = Duration.between(startDt, endDt).getSeconds();
|
||||
return seconds > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) seconds;
|
||||
}
|
||||
|
||||
private static boolean isPositive(Integer value) {
|
||||
return value != null && value > 0;
|
||||
}
|
||||
|
||||
@@ -85,11 +85,11 @@ public class TListEventHistEntity {
|
||||
return TListEventHistEntity.builder()
|
||||
.eventTy(ResultCodeType.SURVEY.getCode())
|
||||
.prjctIdx(prjctIdx)
|
||||
.prjctSurveyIdx(request.getPrjctSurveyIdx())
|
||||
.sid(request.getSid())
|
||||
.resultCd(request.getAction().getCode().intValue())
|
||||
.prjctSurveyIdx(request.prjctSurveyIdx())
|
||||
.sid(request.sid())
|
||||
.resultCd(request.action().getCode().intValue())
|
||||
.metaData(metaData)
|
||||
.memo(request.getAction().name())
|
||||
.memo(request.action().name())
|
||||
.regUser(regUser)
|
||||
.regDt(regDt)
|
||||
.build();
|
||||
@@ -102,13 +102,13 @@ public class TListEventHistEntity {
|
||||
LocalDateTime regDt
|
||||
) {
|
||||
return TListEventHistEntity.builder()
|
||||
.eventTy(request.getResultCodeType().getCode())
|
||||
.prjctIdx(request.getPrjctIdx())
|
||||
.sid(request.getSid())
|
||||
.resultCd(request.getResultCd())
|
||||
.listCallHistIdx(request.getListCallHistIdx())
|
||||
.eventTy(request.resultCodeType().getCode())
|
||||
.prjctIdx(request.prjctIdx())
|
||||
.sid(request.sid())
|
||||
.resultCd(request.resultCd())
|
||||
.listCallHistIdx(request.listCallHistIdx())
|
||||
.metaData(metaData)
|
||||
.memo(request.getMemo())
|
||||
.memo(request.memo())
|
||||
.regUser(regUser)
|
||||
.regDt(regDt)
|
||||
.build();
|
||||
|
||||
@@ -46,6 +46,10 @@ public class TListHeaderEntity {
|
||||
@Column(name = "list_hder_ty", nullable = false)
|
||||
private Short listHderTy;
|
||||
|
||||
@Size(max = 16)
|
||||
@Column(name = "list_hder_color", length = 16)
|
||||
private String listHderColor;
|
||||
|
||||
@NotNull
|
||||
@ColumnDefault("0")
|
||||
@Column(name = "use_filter", nullable = false)
|
||||
@@ -101,8 +105,9 @@ public class TListHeaderEntity {
|
||||
.id(TListHeaderEntityId.create(prjctIdx, src.getListHderId()))
|
||||
.listHderOrder(src.getListHderOrder())
|
||||
.listHderGrad(src.getListHderGrad())
|
||||
.listHderNm(src.getListHderNm())
|
||||
.listHderNm(src.getListHderNm() == null ? null : src.getListHderNm().trim())
|
||||
.listHderTy(src.getListHderTy())
|
||||
.listHderColor(src.getListHderColor())
|
||||
.useFilter(src.getUseFilter())
|
||||
.useColView(src.getUseColView())
|
||||
.useIntrvwerView(src.getUseIntrvwerView())
|
||||
@@ -119,6 +124,7 @@ public class TListHeaderEntity {
|
||||
.listHderGrad(dto.getListHderGrad().getCode())
|
||||
.listHderNm(dto.getListHderNm())
|
||||
.listHderTy(dto.getListHderTy().getCode())
|
||||
.listHderColor(dto.getListHderColor())
|
||||
.useFilter(dto.getUseFilter())
|
||||
.useColView(dto.getUseColView())
|
||||
.useIntrvwerView(dto.getUseIntrvwerView())
|
||||
|
||||
@@ -120,10 +120,10 @@ public class TPrjctEntity {
|
||||
return TPrjctEntity.builder()
|
||||
.prjctCd(prjctCd)
|
||||
.prjctStatus(ProjectStatus.STANDBY.getCode())
|
||||
.prjctNm(req.getPrjctName())
|
||||
.itrntPrjctCd(req.getItrntPrjctCd())
|
||||
.ownerDept(req.getOwnerDept())
|
||||
.ownerFw(req.getOwnerFw())
|
||||
.prjctNm(req.prjctName())
|
||||
.itrntPrjctCd(req.itrntPrjctCd())
|
||||
.ownerDept(req.ownerDept())
|
||||
.ownerFw(req.ownerFw())
|
||||
.callerTelNum(DEFAULT_CALLER_TELNUM)
|
||||
.ff(false)
|
||||
.useContactSenario(false)
|
||||
|
||||
@@ -46,8 +46,8 @@ public class TPrjctMainTmplatEntity {
|
||||
public static TPrjctMainTmplatEntity create(ProjectMainTemplateUpdateRequestDto req,
|
||||
String regUser, LocalDateTime regDt) {
|
||||
return TPrjctMainTmplatEntity.builder()
|
||||
.id(TPrjctMainTmplatEntityId.create(req.getPrjctIdx(), req.getChnnlTy().getCode()))
|
||||
.tmplatIdx(req.getTmplatIdx())
|
||||
.id(TPrjctMainTmplatEntityId.create(req.prjctIdx(), req.chnnlTy().getCode()))
|
||||
.tmplatIdx(req.tmplatIdx())
|
||||
.regUser(regUser)
|
||||
.regDt(regDt)
|
||||
.build();
|
||||
|
||||
@@ -69,8 +69,8 @@ public class TResultCodeEntity {
|
||||
public static TResultCodeEntity fromDto(Long prjctIdx, ResultCodeType resultCdTy,
|
||||
ResultCodeDto req, String regUser, LocalDateTime regDt) {
|
||||
return TResultCodeEntity.builder()
|
||||
.id(TResultCodeEntityId.create(prjctIdx, resultCdTy, req.getResultCd()))
|
||||
.resultCdLbl(req.getResultCdLbl())
|
||||
.id(TResultCodeEntityId.create(prjctIdx, resultCdTy, req.resultCd()))
|
||||
.resultCdLbl(req.resultCdLbl())
|
||||
.defaultCode(false)
|
||||
.regUser(regUser)
|
||||
.regDt(regDt)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.kri.contact.server.persistence.jdbc;
|
||||
|
||||
import com.kri.common.feature.web.BusinessException;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
@@ -150,7 +151,7 @@ public class ListAssignJdbcSupport {
|
||||
return List.of();
|
||||
}
|
||||
if (chunkSize <= 0) {
|
||||
throw new IllegalArgumentException("chunkSize must be greater than 0");
|
||||
throw BusinessException.internalError("INVALID_LIST_CHUNK_SIZE", "chunkSize must be greater than 0");
|
||||
}
|
||||
|
||||
List<String> sidList = sids instanceof List<String> list ? list : new ArrayList<>(sids);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.kri.contact.server.persistence.jdbc;
|
||||
|
||||
import com.kri.common.feature.web.BusinessException;
|
||||
import com.kri.contact.server.common.enums.ResultCodeType;
|
||||
import com.kri.contact.server.dto.list.ListResetScopeDto;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.Query;
|
||||
import java.util.ArrayList;
|
||||
@@ -17,6 +20,44 @@ public class ListResetJdbcSupport {
|
||||
|
||||
private final EntityManager entityManager;
|
||||
|
||||
public DeleteCounts deleteSelectedHistories(Long prjctIdx, Collection<String> sids,
|
||||
ListResetScopeDto scope, int chunkSize) {
|
||||
if (sids == null || sids.isEmpty()) {
|
||||
return DeleteCounts.empty();
|
||||
}
|
||||
try {
|
||||
prepareTempSids(sids, chunkSize);
|
||||
int historyCount = deleteSelectedEvents("t_list_event_hist", prjctIdx, scope);
|
||||
int latestCount = deleteSelectedEvents("t_list_event_latest", prjctIdx, scope);
|
||||
return DeleteCounts.histories(historyCount, latestCount, 0, 0);
|
||||
} finally {
|
||||
dropTempSids();
|
||||
}
|
||||
}
|
||||
|
||||
private int deleteSelectedEvents(String tableName, Long prjctIdx, ListResetScopeDto scope) {
|
||||
List<Short> eventTypes = new ArrayList<>();
|
||||
if (scope.contactHistory()) eventTypes.add(ResultCodeType.CONTACT.getCode());
|
||||
if (scope.interviewHistory()) eventTypes.add(ResultCodeType.INTERVIEW.getCode());
|
||||
List<String> conditions = new ArrayList<>();
|
||||
if (!eventTypes.isEmpty()) conditions.add("target.event_ty in (:eventTypes)");
|
||||
if (!scope.surveyIds().isEmpty()) {
|
||||
conditions.add("(target.event_ty = :surveyType and target.prjct_survey_idx in (:surveyIds))");
|
||||
}
|
||||
if (conditions.isEmpty()) return 0;
|
||||
Query query = entityManager.createNativeQuery(
|
||||
"delete target from " + tableName + " target "
|
||||
+ "join " + TEMP_SID_TABLE + " reset_sid on reset_sid.sid = target.sid "
|
||||
+ "where target.prjct_idx = :prjctIdx and (" + String.join(" or ", conditions) + ")");
|
||||
query.setParameter("prjctIdx", prjctIdx);
|
||||
if (!eventTypes.isEmpty()) query.setParameter("eventTypes", eventTypes);
|
||||
if (!scope.surveyIds().isEmpty()) {
|
||||
query.setParameter("surveyType", ResultCodeType.SURVEY.getCode());
|
||||
query.setParameter("surveyIds", scope.surveyIds());
|
||||
}
|
||||
return query.executeUpdate();
|
||||
}
|
||||
|
||||
public DeleteCounts deleteHistories(Long prjctIdx, Collection<String> sids, int chunkSize) {
|
||||
if (sids == null || sids.isEmpty()) {
|
||||
return DeleteCounts.empty();
|
||||
@@ -123,7 +164,7 @@ public class ListResetJdbcSupport {
|
||||
return List.of();
|
||||
}
|
||||
if (chunkSize <= 0) {
|
||||
throw new IllegalArgumentException("chunkSize must be greater than 0");
|
||||
throw BusinessException.internalError("INVALID_LIST_CHUNK_SIZE", "chunkSize must be greater than 0");
|
||||
}
|
||||
|
||||
List<String> sidList = new ArrayList<>(sids);
|
||||
@@ -179,20 +220,5 @@ public class ListResetJdbcSupport {
|
||||
);
|
||||
}
|
||||
|
||||
public DeleteCounts plus(DeleteCounts other) {
|
||||
return new DeleteCounts(
|
||||
fileCount + other.fileCount,
|
||||
callHistCount + other.callHistCount,
|
||||
eventHistCount + other.eventHistCount,
|
||||
eventLatestCount + other.eventLatestCount,
|
||||
updateHistCount + other.updateHistCount,
|
||||
itemCount + other.itemCount,
|
||||
listCount + other.listCount,
|
||||
assignUserCount + other.assignUserCount,
|
||||
assignCmpnCount + other.assignCmpnCount,
|
||||
resveCount + other.resveCount
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.kri.contact.server.persistence.repository;
|
||||
import com.kri.contact.server.common.enums.ListAsyncJobStatus;
|
||||
import com.kri.contact.server.common.enums.ListAsyncJobType;
|
||||
import com.kri.contact.server.dto.list.async.ListAsyncJobActivity;
|
||||
import com.kri.contact.server.dto.list.async.ListAsyncMutationCompletionDto;
|
||||
import com.kri.contact.server.persistence.entity.TListAsyncJobEntity;
|
||||
import jakarta.persistence.LockModeType;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -27,6 +28,18 @@ public interface ListAsyncJobRepository extends JpaRepository<TListAsyncJobEntit
|
||||
@Param("projectId") Long projectId, @Param("statuses") Collection<ListAsyncJobStatus> statuses,
|
||||
@Param("heldKeys") Collection<String> heldKeys);
|
||||
|
||||
@Query("""
|
||||
select new com.kri.contact.server.dto.list.async.ListAsyncMutationCompletionDto(
|
||||
count(j), max(j.finishedDt))
|
||||
from TListAsyncJobEntity j
|
||||
where j.prjctIdx = :projectId and j.jobType in :types and j.jobStatus in :statuses
|
||||
and j.finishedDt is not null and j.jobKey not in :heldKeys
|
||||
""")
|
||||
ListAsyncMutationCompletionDto summarizeFinishedMutations(
|
||||
@Param("projectId") Long projectId, @Param("types") Collection<ListAsyncJobType> types,
|
||||
@Param("statuses") Collection<ListAsyncJobStatus> statuses,
|
||||
@Param("heldKeys") Collection<String> heldKeys);
|
||||
|
||||
Optional<TListAsyncJobEntity> findFirstByPrjctIdxAndJobTypeInAndJobStatusInOrderByRegDtDescJobKeyDesc(
|
||||
Long projectId, Collection<ListAsyncJobType> types, Collection<ListAsyncJobStatus> statuses);
|
||||
|
||||
|
||||
@@ -601,12 +601,12 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
|
||||
for (int index = 0; index < conditions.size(); index++) {
|
||||
LastEventDateRangeDto condition = conditions.get(index);
|
||||
if (condition == null || condition.getResultCodeType() == null) {
|
||||
if (condition == null || condition.resultCodeType() == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
LocalDateTime startDate = condition.getStartDate();
|
||||
LocalDateTime endDate = condition.getEndDate();
|
||||
LocalDateTime startDate = condition.startDate();
|
||||
LocalDateTime endDate = condition.endDate();
|
||||
if (startDate == null && endDate == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -616,7 +616,7 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
endDate = swapped;
|
||||
}
|
||||
|
||||
ResultCodeType resultCodeType = condition.getResultCodeType();
|
||||
ResultCodeType resultCodeType = condition.resultCodeType();
|
||||
QTListEventLatestEntity latest = new QTListEventLatestEntity("latest_event_date_" + index);
|
||||
BooleanBuilder latestPredicate = new BooleanBuilder()
|
||||
.and(latest.prjctIdx.eq(prjctIdx))
|
||||
@@ -624,7 +624,7 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
.and(latest.eventTy.eq(resultCodeType.getCode()));
|
||||
|
||||
if (resultCodeType == ResultCodeType.SURVEY) {
|
||||
latestPredicate.and(latest.prjctSurveyIdx.eq(condition.getPrjctSurveyIdx()));
|
||||
latestPredicate.and(latest.prjctSurveyIdx.eq(condition.prjctSurveyIdx()));
|
||||
} else {
|
||||
latestPredicate.and(latest.prjctSurveyIdx.isNull());
|
||||
}
|
||||
@@ -654,16 +654,16 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
|
||||
for (ListSurveyResultFilterConditionDto condition : surveyResultConditions) {
|
||||
if (condition == null
|
||||
|| condition.getPrjctSurveyIdx() == null
|
||||
|| condition.getResultCodes() == null
|
||||
|| condition.getResultCodes().isEmpty()) {
|
||||
|| condition.prjctSurveyIdx() == null
|
||||
|| condition.resultCodes() == null
|
||||
|| condition.resultCodes().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean includeNoHistory = condition.getResultCodes().stream()
|
||||
boolean includeNoHistory = condition.resultCodes().stream()
|
||||
.filter(Objects::nonNull)
|
||||
.anyMatch(resultCode -> resultCode == NO_RESULT_HISTORY_CODE);
|
||||
List<Integer> existingHistoryResultCodes = condition.getResultCodes().stream()
|
||||
List<Integer> existingHistoryResultCodes = condition.resultCodes().stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(resultCode -> resultCode != NO_RESULT_HISTORY_CODE)
|
||||
.distinct()
|
||||
@@ -674,7 +674,7 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
|
||||
BooleanBuilder surveyPredicate = new BooleanBuilder();
|
||||
QTListEventLatestEntity latest = new QTListEventLatestEntity(
|
||||
"latest_survey_result_" + condition.getPrjctSurveyIdx()
|
||||
"latest_survey_result_" + condition.prjctSurveyIdx()
|
||||
);
|
||||
|
||||
if (!existingHistoryResultCodes.isEmpty()) {
|
||||
@@ -684,7 +684,7 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
latest.prjctIdx.eq(prjctIdx),
|
||||
latest.sid.eq(list.id.sid),
|
||||
latest.eventTy.eq(ResultCodeType.SURVEY.getCode()),
|
||||
latest.prjctSurveyIdx.eq(condition.getPrjctSurveyIdx()),
|
||||
latest.prjctSurveyIdx.eq(condition.prjctSurveyIdx()),
|
||||
latest.resultCd.in(existingHistoryResultCodes)
|
||||
)
|
||||
.exists());
|
||||
@@ -692,7 +692,7 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
|
||||
if (includeNoHistory) {
|
||||
QTListEventLatestEntity noHistoryLatest = new QTListEventLatestEntity(
|
||||
"no_history_survey_result_" + condition.getPrjctSurveyIdx()
|
||||
"no_history_survey_result_" + condition.prjctSurveyIdx()
|
||||
);
|
||||
surveyPredicate.or(JPAExpressions.selectOne()
|
||||
.from(noHistoryLatest)
|
||||
@@ -700,7 +700,7 @@ public class ListQueryRepositoryImpl implements ListQueryRepository {
|
||||
noHistoryLatest.prjctIdx.eq(prjctIdx),
|
||||
noHistoryLatest.sid.eq(list.id.sid),
|
||||
noHistoryLatest.eventTy.eq(ResultCodeType.SURVEY.getCode()),
|
||||
noHistoryLatest.prjctSurveyIdx.eq(condition.getPrjctSurveyIdx())
|
||||
noHistoryLatest.prjctSurveyIdx.eq(condition.prjctSurveyIdx())
|
||||
)
|
||||
.notExists());
|
||||
}
|
||||
|
||||
@@ -4,10 +4,14 @@ import com.kri.contact.server.persistence.entity.TPrjctMainTmplatEntity;
|
||||
import com.kri.contact.server.persistence.entity.id.TPrjctMainTmplatEntityId;
|
||||
import java.util.Optional;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
public interface ProjectMainTemplateRepository extends JpaRepository<TPrjctMainTmplatEntity, TPrjctMainTmplatEntityId> {
|
||||
|
||||
Optional<TPrjctMainTmplatEntity> findByIdPrjctIdxAndIdChnnlTy(Long prjctIdx, Short chnnlTy);
|
||||
|
||||
long deleteByIdPrjctIdxAndIdChnnlTy(Long prjctIdx, Short chnnlTy);
|
||||
|
||||
@Transactional
|
||||
long deleteByTmplatIdx(Long tmplatIdx);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.kri.contact.server.persistence.support;
|
||||
|
||||
import com.kri.common.feature.web.BusinessException;
|
||||
import com.kri.contact.server.common.enums.ListResetMode;
|
||||
import com.kri.contact.server.dto.list.ListResetScopeDto;
|
||||
import com.kri.contact.server.persistence.entity.TListResetLogEntity;
|
||||
import com.kri.contact.server.persistence.jdbc.ListResetJdbcSupport;
|
||||
import com.kri.contact.server.persistence.jdbc.ListResetJdbcSupport.DeleteCounts;
|
||||
@@ -20,17 +21,6 @@ public class ListResetPersistenceSupport {
|
||||
private final ListDeleteSessionContext deleteSessionContext;
|
||||
private final EntityManager entityManager;
|
||||
|
||||
public int resetWithAuditContext(
|
||||
Long prjctIdx,
|
||||
Collection<String> sids,
|
||||
ListResetMode mode,
|
||||
String listResetLogId,
|
||||
String delUser,
|
||||
int chunkSize
|
||||
) {
|
||||
return resetWithAuditContext(prjctIdx, sids, mode, listResetLogId, delUser, chunkSize, false);
|
||||
}
|
||||
|
||||
public int resetChunkWithAuditContext(Long projectId, Collection<String> sids, ListResetMode mode,
|
||||
String logId, String user, int chunkSize) {
|
||||
return resetWithAuditContext(projectId, sids, mode, logId, user, chunkSize, true);
|
||||
@@ -38,6 +28,16 @@ public class ListResetPersistenceSupport {
|
||||
|
||||
private int resetWithAuditContext(Long prjctIdx, Collection<String> sids, ListResetMode mode,
|
||||
String listResetLogId, String delUser, int chunkSize, boolean accumulate) {
|
||||
return resetWithAuditContext(prjctIdx, sids, mode, listResetLogId, delUser, chunkSize, accumulate, null);
|
||||
}
|
||||
|
||||
public int resetChunkWithAuditContext(Long projectId, Collection<String> sids, ListResetScopeDto scope,
|
||||
String logId, String user, int chunkSize) {
|
||||
return resetWithAuditContext(projectId, sids, scope.mode(), logId, user, chunkSize, true, scope);
|
||||
}
|
||||
|
||||
private int resetWithAuditContext(Long prjctIdx, Collection<String> sids, ListResetMode mode,
|
||||
String listResetLogId, String delUser, int chunkSize, boolean accumulate, ListResetScopeDto scope) {
|
||||
int resetCount = mode == ListResetMode.HIST ? sids.size() : 0;
|
||||
|
||||
try (var ignored = deleteSessionContext.openReset(listResetLogId, delUser)) {
|
||||
@@ -45,7 +45,13 @@ public class ListResetPersistenceSupport {
|
||||
entityManager.clear();
|
||||
|
||||
switch (mode) {
|
||||
case HIST -> listResetJdbcSupport.deleteHistories(prjctIdx, sids, chunkSize);
|
||||
case HIST -> {
|
||||
if (scope != null && scope.selective()) {
|
||||
listResetJdbcSupport.deleteSelectedHistories(prjctIdx, sids, scope, chunkSize);
|
||||
} else {
|
||||
listResetJdbcSupport.deleteHistories(prjctIdx, sids, chunkSize);
|
||||
}
|
||||
}
|
||||
case ALL -> {
|
||||
listResetJdbcSupport.deleteHistories(prjctIdx, sids, chunkSize);
|
||||
DeleteCounts counts = listResetJdbcSupport.deleteListData(prjctIdx, sids, true, true, chunkSize);
|
||||
@@ -62,7 +68,7 @@ public class ListResetPersistenceSupport {
|
||||
TListResetLogEntity log = listResetLogRepository.findById(listResetLogId)
|
||||
.orElseThrow(() -> BusinessException.internalError("List reset log not found."));
|
||||
if (!java.util.Objects.equals(log.getPrjctIdx(), prjctIdx) || !java.util.Objects.equals(log.getMode(), mode.getCode())) {
|
||||
throw new IllegalArgumentException("Reset log does not match project and mode");
|
||||
throw BusinessException.internalError("RESET_LOG_PROJECT_OR_MODE_MISMATCH", "Reset log does not match project and mode");
|
||||
}
|
||||
log.setListCnt(accumulate ? Math.addExact(log.getListCnt(), resetCount) : resetCount);
|
||||
listResetLogRepository.saveAndFlush(log);
|
||||
|
||||
@@ -81,7 +81,7 @@ public class AssignService {
|
||||
.toList();
|
||||
|
||||
long assignedCount = assignees.stream()
|
||||
.mapToLong(CompanyAssignSummaryItemDto::getAssignedCount)
|
||||
.mapToLong(CompanyAssignSummaryItemDto::assignedCount)
|
||||
.sum();
|
||||
validateSummaryCount(totalCount, assignedCount);
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@ public class AuthService {
|
||||
JwtUserClaimsDto claims;
|
||||
if (loginInfoResponse != null) {
|
||||
claims = JwtUserClaimsDto.builder()
|
||||
.userId(loginInfoResponse.getUserId())
|
||||
.userId(loginInfoResponse.userId())
|
||||
.userCmpn(DEFAULT_COMPANY_NAME)
|
||||
.userName(loginInfoResponse.getUserNm())
|
||||
.userTeam(loginInfoResponse.getUserTeam())
|
||||
.userRole(loginInfoResponse.getUserRole())
|
||||
.userName(loginInfoResponse.userNm())
|
||||
.userTeam(loginInfoResponse.userTeam())
|
||||
.userRole(loginInfoResponse.userRole())
|
||||
.build();
|
||||
} else {
|
||||
TUserEntity user = userService.getUser(request.getUserId(), request.getUserPw());
|
||||
TUserEntity user = userService.getUser(request.userId(), request.userPw());
|
||||
claims = JwtUserClaimsDto.builder()
|
||||
.userId(user.getUserId())
|
||||
.userCmpn(user.getUserCmpn())
|
||||
|
||||
@@ -33,9 +33,9 @@ public class CmpnService {
|
||||
|
||||
@Transactional
|
||||
public void createCmpn(CmpnInfoDto dto, String regUser, LocalDateTime regDt) {
|
||||
DataVerificationDto verification = verifyCmpnId(dto.getCmpnId());
|
||||
if (!verification.isSuccess()) {
|
||||
throw BusinessException.badRequest("WRONG_CMPN_DATA", verification.getErrMessage());
|
||||
DataVerificationDto verification = verifyCmpnId(dto.cmpnId());
|
||||
if (!verification.success()) {
|
||||
throw BusinessException.badRequest("WRONG_CMPN_DATA", verification.errMessage());
|
||||
}
|
||||
validateCmpnDto(dto);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class CmpnService {
|
||||
@Transactional
|
||||
public void updateCmpn(CmpnInfoDto dto, String modUser, LocalDateTime modDt) {
|
||||
validateCmpnDto(dto);
|
||||
TCmpnEntity entity = findCmpn(dto.getCmpnId());
|
||||
TCmpnEntity entity = findCmpn(dto.cmpnId());
|
||||
entity.updateFromDto(dto, modUser, modDt);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class CmpnService {
|
||||
}
|
||||
|
||||
private void validateCmpnDto(CmpnInfoDto dto) {
|
||||
if (dto.getCmpnAlias() == null || dto.getCmpnAlias().isBlank()) {
|
||||
if (dto.cmpnAlias() == null || dto.cmpnAlias().isBlank()) {
|
||||
throw BusinessException.badRequest("WRONG_CMPN_DATA", "회사 별칭이 비어 있습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user