|
|
|
|
@ -184,6 +184,7 @@ public class MessageInterfaceController extends AbstractController {
|
|
|
|
|
List<MessageEntity> messageEntityList = new ArrayList<MessageEntity>();
|
|
|
|
|
List<Map<String,Object>> reqs = (List<Map<String,Object>>) apiSpec.get("reqs");
|
|
|
|
|
for(Map<String,Object> req : reqs) {
|
|
|
|
|
|
|
|
|
|
MessageEntity messageEntity = new MessageEntity();
|
|
|
|
|
messageEntity.setSubId(nuri2Id);
|
|
|
|
|
|
|
|
|
|
@ -224,24 +225,30 @@ public class MessageInterfaceController extends AbstractController {
|
|
|
|
|
|
|
|
|
|
altJsonComplete = kkoTemplate;
|
|
|
|
|
|
|
|
|
|
//변수매핑하기
|
|
|
|
|
for(HashMap arg : args) {
|
|
|
|
|
String argName = (String)arg.get("argName");
|
|
|
|
|
String argValue = (String)arg.get("argValue");
|
|
|
|
|
|
|
|
|
|
String replacedArgValue = "";
|
|
|
|
|
//탭문자 치환
|
|
|
|
|
replacedArgValue = argValue.replaceAll("\t", " ");
|
|
|
|
|
//역슬래시문자 치환
|
|
|
|
|
replacedArgValue = replacedArgValue.replace("\\", "\\\\");
|
|
|
|
|
//개행문자 치환
|
|
|
|
|
if(databaseId.equals("mariadb") || databaseId.equals("mysql")){
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Maria(replacedArgValue);
|
|
|
|
|
} else {
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Oracle(replacedArgValue);
|
|
|
|
|
try {
|
|
|
|
|
//변수매핑하기
|
|
|
|
|
for(HashMap arg : args) {
|
|
|
|
|
String argName = (String)arg.get("argName");
|
|
|
|
|
String argValue = (String)arg.get("argValue");
|
|
|
|
|
|
|
|
|
|
String replacedArgValue = "";
|
|
|
|
|
//탭문자 치환
|
|
|
|
|
replacedArgValue = argValue.replaceAll("\t", " ");
|
|
|
|
|
//역슬래시문자 치환
|
|
|
|
|
replacedArgValue = replacedArgValue.replace("\\", "\\\\");
|
|
|
|
|
//개행문자 치환
|
|
|
|
|
if(databaseId.equals("mariadb") || databaseId.equals("mysql")){
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Maria(replacedArgValue);
|
|
|
|
|
} else {
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Oracle(replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
altJsonComplete = altJsonComplete.replace("{{"+argName+"}}", replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
altJsonComplete = altJsonComplete.replace("{{"+argName+"}}", replacedArgValue);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
messageEntity.setFailRsn("알림톡 템플릿 변수 매핑 오류");
|
|
|
|
|
messageEntityList.add(messageEntity);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
able_kko = true;
|
|
|
|
|
@ -257,29 +264,47 @@ public class MessageInterfaceController extends AbstractController {
|
|
|
|
|
|
|
|
|
|
rcsJsonComplete = rcsTemplate;
|
|
|
|
|
|
|
|
|
|
//변수매핑하기
|
|
|
|
|
for(HashMap arg : args) {
|
|
|
|
|
String argName = (String)arg.get("argName");
|
|
|
|
|
String argValue = (String)arg.get("argValue");
|
|
|
|
|
String replacedArgValue = "";
|
|
|
|
|
|
|
|
|
|
//탭문자 치환
|
|
|
|
|
replacedArgValue = argValue.replaceAll("\t", " ");
|
|
|
|
|
//역슬래시문자 치환
|
|
|
|
|
replacedArgValue = replacedArgValue.replace("\\", "\\\\");
|
|
|
|
|
//개행문자 치환
|
|
|
|
|
if(databaseId.equals("mariadb") || databaseId.equals("mysql")){
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Maria(replacedArgValue);
|
|
|
|
|
} else {
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Oracle(replacedArgValue);
|
|
|
|
|
try {
|
|
|
|
|
//변수매핑하기
|
|
|
|
|
for(HashMap arg : args) {
|
|
|
|
|
String argName = (String)arg.get("argName");
|
|
|
|
|
String argValue = (String)arg.get("argValue");
|
|
|
|
|
String replacedArgValue = "";
|
|
|
|
|
|
|
|
|
|
//탭문자 치환
|
|
|
|
|
replacedArgValue = argValue.replaceAll("\t", " ");
|
|
|
|
|
//역슬래시문자 치환
|
|
|
|
|
replacedArgValue = replacedArgValue.replace("\\", "\\\\");
|
|
|
|
|
//개행문자 치환
|
|
|
|
|
if(databaseId.equals("mariadb") || databaseId.equals("mysql")){
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Maria(replacedArgValue);
|
|
|
|
|
} else {
|
|
|
|
|
replacedArgValue = forJsonText.replaceLineChangeForNuri2Oracle(replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rcsJsonComplete = rcsJsonComplete.replace("{{"+argName+"}}", replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rcsJsonComplete = rcsJsonComplete.replace("{{"+argName+"}}", replacedArgValue);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
messageEntity.setFailRsn("RCS 템플릿 변수 매핑 오류");
|
|
|
|
|
messageEntityList.add(messageEntity);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//description부 구하기
|
|
|
|
|
String description = forJsonText.getRcsDescription(rcsJsonComplete);
|
|
|
|
|
String description = "";
|
|
|
|
|
try {
|
|
|
|
|
description = forJsonText.getRcsDescription(rcsJsonComplete);
|
|
|
|
|
}catch(Exception e) {
|
|
|
|
|
messageEntity.setFailRsn("RCS JSON 파싱 오류");
|
|
|
|
|
messageEntityList.add(messageEntity);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if(description.equals("")) {
|
|
|
|
|
messageEntity.setFailRsn("RCS JSON 파싱 오류(본문내용없음)");
|
|
|
|
|
messageEntityList.add(messageEntity);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//description부 글자수 계산하기
|
|
|
|
|
int rcsCharCount = description.length();
|
|
|
|
|
|
|
|
|
|
@ -297,24 +322,30 @@ public class MessageInterfaceController extends AbstractController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xmsPlainComplete = xmsTemplate;
|
|
|
|
|
//변수매핑하기
|
|
|
|
|
for(HashMap arg : args) {
|
|
|
|
|
String argName = (String)arg.get("argName");
|
|
|
|
|
String argValue = (String)arg.get("argValue");
|
|
|
|
|
String replacedArgValue = "";
|
|
|
|
|
|
|
|
|
|
//탭문자 치환
|
|
|
|
|
replacedArgValue = argValue.replaceAll("\t", " ");
|
|
|
|
|
//개행문자 치환
|
|
|
|
|
if(databaseId.equals("mariadb") || databaseId.equals("mysql")){
|
|
|
|
|
replacedArgValue = forPlainText.replaceLineChangeForNuri2Maria(replacedArgValue);
|
|
|
|
|
} else {
|
|
|
|
|
replacedArgValue = forPlainText.replaceLineChangeForNuri2Oracle(replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xmsPlainComplete = xmsPlainComplete.replace("{{"+argName+"}}", replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
//변수매핑하기
|
|
|
|
|
for(HashMap arg : args) {
|
|
|
|
|
String argName = (String)arg.get("argName");
|
|
|
|
|
String argValue = (String)arg.get("argValue");
|
|
|
|
|
String replacedArgValue = "";
|
|
|
|
|
|
|
|
|
|
//탭문자 치환
|
|
|
|
|
replacedArgValue = argValue.replaceAll("\t", " ");
|
|
|
|
|
//개행문자 치환
|
|
|
|
|
if(databaseId.equals("mariadb") || databaseId.equals("mysql")){
|
|
|
|
|
replacedArgValue = forPlainText.replaceLineChangeForNuri2Maria(replacedArgValue);
|
|
|
|
|
} else {
|
|
|
|
|
replacedArgValue = forPlainText.replaceLineChangeForNuri2Oracle(replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xmsPlainComplete = xmsPlainComplete.replace("{{"+argName+"}}", replacedArgValue);
|
|
|
|
|
}
|
|
|
|
|
} catch(Exception e) {
|
|
|
|
|
messageEntity.setFailRsn("xMS 템플릿 변수 매핑 오류");
|
|
|
|
|
messageEntityList.add(messageEntity);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//글자수 계산
|
|
|
|
|
int xmsByteCount = forPlainText.countBytes(xmsPlainComplete,2,databaseId);
|
|
|
|
|
|