261019_01_ENH: 리스트 대량 작업 비동기 처리 및 프로젝트별 동시 실행 제어 적용, 미사용 코드 정
This commit is contained in:
@@ -345,7 +345,7 @@ public class MessageSendService {
|
||||
templateParams, surveyUrlByName);
|
||||
}
|
||||
|
||||
private String createBulkSendKey(
|
||||
public String createBulkSendKey(
|
||||
MessageSendBulkRequestDto request,
|
||||
RequestUserContext ctx,
|
||||
MessageContext messageContext,
|
||||
@@ -370,7 +370,7 @@ public class MessageSendService {
|
||||
};
|
||||
}
|
||||
|
||||
private NotiHubBulkSendResponseDto sendBulkChunk(
|
||||
public NotiHubBulkSendResponseDto sendBulkChunk(
|
||||
String bulkSendKey,
|
||||
List<NotiHubDestInfoDto> destInfos,
|
||||
ChannelType channelType
|
||||
@@ -521,7 +521,7 @@ public class MessageSendService {
|
||||
return value == null ? 0 : value;
|
||||
}
|
||||
|
||||
private record MessageContext(
|
||||
public record MessageContext(
|
||||
ProjectInfoDto project,
|
||||
NotiHubTemplateDto template,
|
||||
Map<Integer, ListHeaderDto> headerById,
|
||||
@@ -530,6 +530,23 @@ public class MessageSendService {
|
||||
Map<String, String> surveyUrlByName
|
||||
) {}
|
||||
|
||||
public MessageContext prepareAsync(Long projectId, MessageSendBulkRequestDto request) {
|
||||
validateDestinationHeaders(request.getDestHeaderIds());
|
||||
return createMessageContext(projectId, request.getTmplatIdx(), request.getDestHeaderIds());
|
||||
}
|
||||
|
||||
public List<NotiHubDestInfoDto> prepareAsyncRow(ListSearchService.DownloadListRow row,
|
||||
MessageSendBulkRequestDto request, MessageContext context, ChannelType channel) {
|
||||
return createDestInfos(List.of(row), request.getDestHeaderIds(), request.getDestNameHeaderId(),
|
||||
context, channel, new HashSet<>(), false);
|
||||
}
|
||||
|
||||
public boolean retainAsyncDestination(NotiHubDestInfoDto destination, ChannelType channel,
|
||||
Set<String> keys, boolean dedupe) {
|
||||
String value = channel == ChannelType.EMAIL ? destination.getDestEml() : destination.getDestTel();
|
||||
return !isDuplicateDestination(value, channel, keys, dedupe);
|
||||
}
|
||||
|
||||
private static class ListFilterDtoFactory {
|
||||
static com.kri.contact.server.dto.list.ListFilterDto onlySid(String sid) {
|
||||
return com.kri.contact.server.dto.list.ListFilterDto.onlyOneSid(sid);
|
||||
|
||||
Reference in New Issue
Block a user