error : 치환문자 일 경우 치환 후 문자길이가 lms / sms 처럼 다를 때 그룹ID가 하나만 오는 경우 수정 완료
This commit is contained in:
parent
7166dc5aed
commit
9fcd61795b
@ -155,7 +155,7 @@ public class LogAspect {
|
|||||||
lettnApiSendMsgLogMapper.insert(apiSendMsgLogVO);
|
lettnApiSendMsgLogMapper.insert(apiSendMsgLogVO);
|
||||||
|
|
||||||
// 메세지 그룹 테이블에 발송 구분 업데이트
|
// 메세지 그룹 테이블에 발송 구분 업데이트
|
||||||
updateMsgGroupTbSendKind(apiSendMsgLogVO);
|
this.updateMsgGroupTbSendKind(apiSendMsgLogVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +204,7 @@ public class LogAspect {
|
|||||||
SendSucRestResponse sendSucRestResponse = (SendSucRestResponse) dataObject;
|
SendSucRestResponse sendSucRestResponse = (SendSucRestResponse) dataObject;
|
||||||
|
|
||||||
if("sendMsgData".equals(methodNm)){
|
if("sendMsgData".equals(methodNm)){
|
||||||
|
log.info(" + sendSucRestResponse.getMsgGroupId() :: [{}]", sendSucRestResponse.getMsgGroupId());
|
||||||
|
|
||||||
msgGroupId = sendSucRestResponse.getMsgGroupId();
|
msgGroupId = sendSucRestResponse.getMsgGroupId();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,10 @@ package com.itn.mjonApi.mjon.api.send.mapper.domain;
|
|||||||
import com.itn.mjonApi.cmn.msg.StatMsg;
|
import com.itn.mjonApi.cmn.msg.StatMsg;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -42,6 +45,7 @@ public class SendSucRestResponse {
|
|||||||
*/
|
*/
|
||||||
public static SendSucRestResponse convertMjonDataToApiResponse(MjonResponseVO mjonResponseVO) {
|
public static SendSucRestResponse convertMjonDataToApiResponse(MjonResponseVO mjonResponseVO) {
|
||||||
|
|
||||||
|
List<String> msgTypeList = getMsgType(mjonResponseVO.getMsgType());
|
||||||
|
|
||||||
return SendSucRestResponse.builder()
|
return SendSucRestResponse.builder()
|
||||||
.resultCode("0")
|
.resultCode("0")
|
||||||
@ -49,11 +53,31 @@ public class SendSucRestResponse {
|
|||||||
.successCnt(mjonResponseVO.getResultSts()) // 성공 건수
|
.successCnt(mjonResponseVO.getResultSts()) // 성공 건수
|
||||||
.blockCnt(mjonResponseVO.getResultBlockSts()) // 수신거부 건수
|
.blockCnt(mjonResponseVO.getResultBlockSts()) // 수신거부 건수
|
||||||
.failCnt("0")
|
.failCnt("0")
|
||||||
.msgType(StatMsg.valueOf("msgType"+mjonResponseVO.getMsgType()).getMsg())
|
.msgType(String.join(", ", msgTypeList))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* msgType이 여러개일때 List로 변환
|
||||||
|
* @param msgType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
private static List<String> getMsgType(String msgType) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
|
||||||
|
if(msgType.indexOf(",") > 0)
|
||||||
|
{
|
||||||
|
result = Arrays.stream(msgType.split(","))
|
||||||
|
.map(s -> StatMsg.valueOf("msgType"+s).getMsg())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}else{
|
||||||
|
result.add(StatMsg.valueOf("msgType"+ msgType).getMsg());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 1건~100건 까지 수신자별 메세지 보낸 후 성공 결과를 리턴한다.
|
* @description 1건~100건 까지 수신자별 메세지 보낸 후 성공 결과를 리턴한다.
|
||||||
* @param mjonResponseVOList
|
* @param mjonResponseVOList
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user