|
|
@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
|
|
|
|
import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
|
|
|
|
import kr.xit.biz.common.ApiConstants;
|
|
|
|
import kr.xit.biz.common.ApiConstants;
|
|
|
|
|
|
|
|
import kr.xit.biz.common.ApiConstants.MappingSndngProcessStatus;
|
|
|
|
import kr.xit.biz.common.ApiConstants.SndngSeCode;
|
|
|
|
import kr.xit.biz.common.ApiConstants.SndngSeCode;
|
|
|
|
import kr.xit.biz.ens.mapper.IEnsBatchMapper;
|
|
|
|
import kr.xit.biz.ens.mapper.IEnsBatchMapper;
|
|
|
|
import kr.xit.biz.ens.model.EnsDTO;
|
|
|
|
import kr.xit.biz.ens.model.EnsDTO;
|
|
|
@ -53,6 +54,11 @@ public class EnsBatchExtractService extends AbstractService implements
|
|
|
|
|
|
|
|
|
|
|
|
private final IEnsBatchMapper mapper;
|
|
|
|
private final IEnsBatchMapper mapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 춘천 시스템 여부
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
private static final boolean IS_CCN = ApiConstants.PROFILE.matches(".*-ccn");
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------------------------------------------
|
|
|
|
// REQUIRES_NEW service method
|
|
|
|
// REQUIRES_NEW service method
|
|
|
|
//-----------------------------------------------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------------------------------------------
|
|
|
@ -174,13 +180,22 @@ public class EnsBatchExtractService extends AbstractService implements
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
public void updateErrorLog(final SndngMssageParam dto) {
|
|
|
|
public void updateErrorLog(final SndngMssageParam dto) {
|
|
|
|
|
|
|
|
final String status = dto.getNewSndngProcessSttus();
|
|
|
|
|
|
|
|
|
|
|
|
if ("SndngAcceptJob".equals(dto.getErrorCode())) {
|
|
|
|
if ("SndngAcceptJob".equals(dto.getErrorCode())) {
|
|
|
|
|
|
|
|
if(IS_CCN) dto.setNewSndngProcessSttus(MappingSndngProcessStatus.fromEns(status));
|
|
|
|
mapper.updateProcessSttusCntcSndngMst(dto);
|
|
|
|
mapper.updateProcessSttusCntcSndngMst(dto);
|
|
|
|
|
|
|
|
|
|
|
|
} else if ("SndngMakeJob".equals(dto.getErrorCode())) {
|
|
|
|
} else if ("SndngMakeJob".equals(dto.getErrorCode())) {
|
|
|
|
|
|
|
|
if(IS_CCN) dto.setNewSndngProcessSttus(MappingSndngProcessStatus.fromEns(status));
|
|
|
|
mapper.updateProcessSttusCntcSndngMst(dto);
|
|
|
|
mapper.updateProcessSttusCntcSndngMst(dto);
|
|
|
|
|
|
|
|
dto.setNewSndngProcessSttus(status);
|
|
|
|
mapper.updateProcessSttusUnitySndngMst(dto);
|
|
|
|
mapper.updateProcessSttusUnitySndngMst(dto);
|
|
|
|
|
|
|
|
|
|
|
|
} else if ("SndngSendBulksJob".equals(dto.getErrorCode())) {
|
|
|
|
} else if ("SndngSendBulksJob".equals(dto.getErrorCode())) {
|
|
|
|
|
|
|
|
if(IS_CCN) dto.setNewSndngProcessSttus(MappingSndngProcessStatus.fromEns(status));
|
|
|
|
mapper.updateProcessSttusCntcSndngMst(dto);
|
|
|
|
mapper.updateProcessSttusCntcSndngMst(dto);
|
|
|
|
|
|
|
|
dto.setNewSndngProcessSttus(status);
|
|
|
|
mapper.updateProcessSttusUnitySndngMst(dto);
|
|
|
|
mapper.updateProcessSttusUnitySndngMst(dto);
|
|
|
|
mapper.updateProcessSttusSndngMst(dto);
|
|
|
|
mapper.updateProcessSttusSndngMst(dto);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -210,9 +225,14 @@ public class EnsBatchExtractService extends AbstractService implements
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void updateMstTable(SndngMssageParam paramDTO, SndngSeCode seCode) {
|
|
|
|
private void updateMstTable(SndngMssageParam paramDTO, SndngSeCode seCode) {
|
|
|
|
|
|
|
|
final String status = paramDTO.getNewSndngProcessSttus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(IS_CCN) paramDTO.setNewSndngProcessSttus(MappingSndngProcessStatus.fromEns(status));
|
|
|
|
if(mapper.updateProcessSttusCntcSndngMst(paramDTO) != 1) {
|
|
|
|
if(mapper.updateProcessSttusCntcSndngMst(paramDTO) != 1) {
|
|
|
|
throw BizRuntimeException.create(String.format("[send-%s]연계 발송 마스터 상태변경 실패", seCode.getCode()));
|
|
|
|
throw BizRuntimeException.create(String.format("[send-%s]연계 발송 마스터 상태변경 실패", seCode.getCode()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paramDTO.setNewSndngProcessSttus(status);
|
|
|
|
if(mapper.updateProcessSttusUnitySndngMst(paramDTO) != 1) {
|
|
|
|
if(mapper.updateProcessSttusUnitySndngMst(paramDTO) != 1) {
|
|
|
|
throw BizRuntimeException.create(String.format("[send-%s]통합 발송 마스터 상태변경 실패", seCode.getCode()));
|
|
|
|
throw BizRuntimeException.create(String.format("[send-%s]통합 발송 마스터 상태변경 실패", seCode.getCode()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|