fix: parameter profile set fix

dev
gitea-관리자 1 year ago
parent 9e3bc53efd
commit 64d760f107

@ -55,6 +55,7 @@ public class EnsDTO {
public static class SndngMssageParam implements Serializable {
private String signguCode;
private String ffnlgCode;
private String profile;
/**
* id

@ -77,6 +77,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
@Value("${contract.kakao.api.bulkstatus}")
private String apiBulkStatus;
private static final String profile = System.getProperty("spring.profiles.active");
private final ApiWebClientUtil apiWebClient;
private final IEnsBatchMapper mapper;
private final EgovPasswordEncoder encryptor;
@ -139,6 +141,7 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
for (EnsDTO.SndngMssageParam dto : list) {
dto.setSignguCode(reqDTO.getSignguCode());
dto.setFfnlgCode(reqDTO.getFfnlgCode());
dto.setProfile(profile);
final List<String> mstIdList = new ArrayList<>();
String mstId = "";
if (!Objects.equals(mstId, dto.getUnitySndngMastrId())) {
@ -224,6 +227,9 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
MDC.put(UNITY_SNDNG_MST_ID, dto.getUnitySndngMastrId());
MDC.put(SNDNG_PROCESS_STTUS, "make-fail1");
dto.setSignguCode(reqDTO.getSignguCode());
dto.setFfnlgCode(reqDTO.getFfnlgCode());
dto.setProfile(profile);
dto.setSndngProcessSttus(reqDTO.getSndngProcessSttus());
dto.setNewSndngProcessSttus(ApiConstants.SndngProcessStatus.MAKE_OK.getCode());
//FIXME: try1,try2,tr3이 있는 경우 try1 이전에 try2,3이 실행될 수 있는 경우???
@ -237,6 +243,10 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
MDC.put(UNITY_SNDNG_MST_ID, dto.getUnitySndngMastrId());
MDC.put(SNDNG_PROCESS_STTUS, "make-fail2");
dto.setSignguCode(reqDTO.getSignguCode());
dto.setFfnlgCode(reqDTO.getFfnlgCode());
dto.setProfile(profile);
//try2 발송 대상이 있는지 확인
final int sendCnt = mapper.selectSendOkTgts(dto);
@ -290,6 +300,8 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
for (EnsDTO.SndngMssageParam tgtDTO : tgtList) {
tgtDTO.setSignguCode(reqDTO.getSignguCode());
tgtDTO.setFfnlgCode(reqDTO.getFfnlgCode());
tgtDTO.setProfile(profile);
MDC.put(UNITY_SNDNG_MST_ID, tgtDTO.getUnitySndngMastrId());
MDC.put("sndngMastrId", tgtDTO.getSndngMastrId());
MDC.put(SNDNG_PROCESS_STTUS, "send-fail" + tgtDTO.getTrySeq());

Loading…
Cancel
Save