Compare commits
No commits in common. "master" and "5102_친구톡_발송속도_개선" have entirely different histories.
master
...
5102_친구톡_발
1
.claude/.gitignore
vendored
1
.claude/.gitignore
vendored
@ -1,2 +1 @@
|
||||
/settings.local.json
|
||||
/mcp_settings.json
|
||||
|
||||
BIN
.claude/etc1.png
BIN
.claude/etc1.png
Binary file not shown.
|
Before Width: | Height: | Size: 73 KiB |
BIN
.claude/etc2.png
BIN
.claude/etc2.png
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB |
8
.gitignore
vendored
8
.gitignore
vendored
@ -201,13 +201,5 @@ fabric.properties
|
||||
rebel.xml
|
||||
/mvnw
|
||||
/mvnw.cmd
|
||||
/.gemini
|
||||
/.gemini.zip
|
||||
/CLAUDE.md
|
||||
|
||||
<<<<<<< HEAD
|
||||
# Mac OS
|
||||
=======
|
||||
### Mac OS ###
|
||||
>>>>>>> refs/heads/5419_전화번호거짓표시50건이상
|
||||
.DS_Store
|
||||
11
pom.xml
11
pom.xml
@ -146,7 +146,7 @@
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.49</version>
|
||||
<version>5.1.31</version>
|
||||
</dependency>
|
||||
|
||||
<!-- oracle 10g driver -->
|
||||
@ -477,19 +477,12 @@
|
||||
</dependency>
|
||||
|
||||
<!-- kmc 본인인증 -->
|
||||
<!-- <dependency>
|
||||
<dependency>
|
||||
<groupId>kmc</groupId>
|
||||
<artifactId>ICERTSecu_JDK18</artifactId>
|
||||
<version>1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/ICERTSecu_JDK18.jar</systemPath>
|
||||
</dependency> -->
|
||||
|
||||
<!-- kmc 본인인증 ver 2 암호화 모듈 추가 버전 -->
|
||||
<dependency>
|
||||
<groupId>kmc</groupId>
|
||||
<artifactId>ICERTSecu</artifactId>
|
||||
<version>JDK18_v2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
@ -61,7 +61,6 @@ public class IPIgnoreInterceptorHandler extends HandlerInterceptorAdapter{
|
||||
v_ret = false;
|
||||
}
|
||||
|
||||
// lettnloginlog 테이블에 insert 패턴 추가 (/web/user/login/usrIdCheckAjax.do)
|
||||
}else if(request.getRequestURI().indexOf("ListAjax.do")>-1
|
||||
|| request.getRequestURI().indexOf("ViewAjax.do")>-1
|
||||
|| request.getRequestURI().indexOf("DataAjax.do")>-1
|
||||
@ -75,7 +74,6 @@ public class IPIgnoreInterceptorHandler extends HandlerInterceptorAdapter{
|
||||
|| request.getRequestURI().indexOf("MapUrl")>-1
|
||||
|| request.getRequestURI().indexOf("uss/ion/fms/FmsFileInsertAjax")>-1
|
||||
|| request.getRequestURI().indexOf("web/mjon/addr/sendExelFilePhoneNumAjax")>-1
|
||||
|| request.getRequestURI().indexOf("/web/user/login/usrIdCheckAjax.do")>-1
|
||||
|
||||
|
||||
|
||||
|
||||
@ -318,17 +318,4 @@ public final class MJUtil {
|
||||
return dupliBlockList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 사업자등록번호 대시('-') 추가
|
||||
* 대시 유무 상관없음
|
||||
* 유효성 맞지 않을시 변환안됨.
|
||||
*/
|
||||
public static String bizNoAddDash(String str) {
|
||||
if(str == null) {
|
||||
return str;
|
||||
}
|
||||
String regExp = "(\\d{3})(\\d{2})(\\d{5})$";
|
||||
String chgf = "$1-$2-$3";
|
||||
return str.replaceFirst(regExp, chgf);
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,8 +259,7 @@ public final class MsgSendUtils {
|
||||
String value = entry.getValue().apply(sendVO);
|
||||
if (smsTxt.contains(placeholder)) {
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
// statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "치환 문구중 " + placeholder + " 데이터가 없습니다.");
|
||||
StatusResponse.statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "치환 문구중 " + placeholder + " 데이터가 없습니다.", "STAT_1040");
|
||||
statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "치환 문구중 " + placeholder + " 데이터가 없습니다.");
|
||||
return false;
|
||||
}
|
||||
smsTxt = smsTxt.replace(placeholder, value);
|
||||
@ -290,8 +289,7 @@ public final class MsgSendUtils {
|
||||
if (!hasPerformedMsgType) {
|
||||
msgTypeResult = getMsgTypeWithByteValidation(sendVO, smsTxt);
|
||||
if ("INVALID".equals(msgTypeResult)) {
|
||||
// statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "문자 치환 후 전송 문자 길이를 초과하였습니다.");
|
||||
StatusResponse.statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "문자 치환 후 전송 문자 길이를 초과하였습니다.", "STAT_1050");
|
||||
statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "문자 치환 후 전송 문자 길이를 초과하였습니다.");
|
||||
return false;
|
||||
}
|
||||
hasPerformedMsgType = true;
|
||||
@ -308,8 +306,7 @@ public final class MsgSendUtils {
|
||||
// 메시지 타입 체크는 매번 수행
|
||||
msgTypeResult = getMsgTypeWithByteValidation(sendVO, smsTxt);
|
||||
if ("INVALID".equals(msgTypeResult)) {
|
||||
// statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "문자 치환 후 전송 문자 길이를 초과하였습니다.");
|
||||
StatusResponse.statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "문자 치환 후 전송 문자 길이를 초과하였습니다.", "STAT_1050");
|
||||
statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "문자 치환 후 전송 문자 길이를 초과하였습니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -542,7 +539,6 @@ public final class MsgSendUtils {
|
||||
statusResponse.setMessage(msg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static StatusResponse validateFilesForMessageSending(int fileCount, MjonMsgVO mjonMsgVO) {
|
||||
if (fileCount > 0) {
|
||||
|
||||
@ -34,11 +34,12 @@ public class CertPhoneWebController {
|
||||
|
||||
@RequestMapping(value = {"/web/cert/log/insertCertLog.do"})
|
||||
public ResponseEntity<StatusResponse> insertCertLog(HttpServletRequest request) throws Exception {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, certPhoneService.insertCertLog(request), LocalDateTime.now()));
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"/web/cert/log/kmcErrorPage.do"})
|
||||
public String kmcErrorPage() throws Exception {
|
||||
return "web/cop/kmc/certResultError";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -53,7 +53,6 @@ public class KakaoSendAdvcVO implements Serializable {
|
||||
|
||||
private String adFlag; //친구톡 광고성 정보 사용 유무(Y:사용 , N:미사용)
|
||||
|
||||
private String sendKind; //문자전송 타입(H:홈페이지, A:API)
|
||||
// =====
|
||||
// =====
|
||||
|
||||
@ -103,7 +102,6 @@ public class KakaoSendAdvcVO implements Serializable {
|
||||
"\n , subMsgType=[" + subMsgType + "]" +
|
||||
"\n , reqDate=[" + reqDate + "]" +
|
||||
"\n , jsonStr=[" + jsonStr + "]" +
|
||||
"\n , sendKind=[" + sendKind + "]" +
|
||||
"\n , ==== MJ_MSG_DATA INSERT DATA END =======" +
|
||||
"\n " +
|
||||
"\n , eachPrice=[" + eachPrice + "]" +
|
||||
|
||||
@ -112,9 +112,6 @@ public class KakaoSendUtil {
|
||||
// log.info(" + templateDetail :: [{}]", templateDetail);
|
||||
// templateDetail.getButtonList().forEach(t->log.info(" + ButtonList :: [{}]", t.toString()));
|
||||
|
||||
// API인지 확인하는 Boolean
|
||||
Boolean isApiData = "A".equals(kakaoVO.getSendKind());
|
||||
|
||||
Boolean hasContentReplacement = this.replBooleanStrChecker(templateContent);
|
||||
Boolean hasTitleReplacement = this.replBooleanStrChecker(templateTitle);
|
||||
Boolean hasButtonReplacement = this.needsButtonReplacement(templateDetail.getButtonList());
|
||||
@ -135,17 +132,8 @@ public class KakaoSendUtil {
|
||||
// 사용자 개인 단가 정보 불러오기
|
||||
MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(kakaoVO.getUserId());
|
||||
|
||||
kakaoVO.setAtSmishingYn(mberManageVO.getAtSmishingYn());
|
||||
|
||||
float shortPrice = getValidPrice(mberManageVO.getShortPrice(), sysJoinSetVO.getShortPrice());
|
||||
float longPrice = getValidPrice(mberManageVO.getLongPrice(), sysJoinSetVO.getLongPrice());
|
||||
float kakaoAtPrice = getValidPrice(mberManageVO.getKakaoAtPrice(), sysJoinSetVO.getKakaoAtPrice());
|
||||
|
||||
|
||||
String shortPStr = Float.toString(shortPrice);
|
||||
String mmsPStr = Float.toString(longPrice);
|
||||
String kakaoAtPStr = Float.toString(kakaoAtPrice);
|
||||
|
||||
|
||||
/** @MSGID KEY값 */
|
||||
List<String> idList = mjonCommon.getNextCustomMsgCId(kakaoVO.getVarListMap().size());
|
||||
@ -161,7 +149,6 @@ public class KakaoSendUtil {
|
||||
int counter = 0;
|
||||
/** @Map에 총 갯수가 수신자 갯수와 동일함 */
|
||||
List<Map<String, String>> varList = kakaoVO.getVarListMap();
|
||||
|
||||
for (int i = 0; i < varList.size(); i++) {
|
||||
// for(Map<String, String> variables : kakaoVO.getVarListMap()) {
|
||||
// 치환 데이터
|
||||
@ -170,12 +157,6 @@ public class KakaoSendUtil {
|
||||
|
||||
/** @공통 기본값 */
|
||||
KakaoSendAdvcVO sendVO = createATSendVO(kakaoVO);
|
||||
// 공통 가격 설정
|
||||
sendVO.setSmsPrice(shortPStr);
|
||||
sendVO.setMmsPrice(mmsPStr);
|
||||
sendVO.setKakaoAtPrice(kakaoAtPStr);
|
||||
|
||||
|
||||
String msgId = idList.get(i);
|
||||
sendVO.setMsgId(msgId);
|
||||
|
||||
@ -190,21 +171,12 @@ public class KakaoSendUtil {
|
||||
/** @Step1-3: 템플릿 치환데이터 설정 */
|
||||
String templateContentTemp = templateContent;
|
||||
String templateTitleTemp = templateTitle;
|
||||
|
||||
// api가 아니면
|
||||
if(!isApiData) {
|
||||
if (hasContentReplacement) {
|
||||
templateContentTemp = mjonCommon.ATReplaceTemplateVariables(templateContent, variables);
|
||||
if(hasTitleReplacement) {
|
||||
templateTitleTemp = mjonCommon.ATReplaceTemplateVariables(templateTitle, variables);
|
||||
}
|
||||
if (hasContentReplacement) {
|
||||
templateContentTemp = mjonCommon.ATReplaceTemplateVariables(templateContent, variables);
|
||||
if(hasTitleReplacement) {
|
||||
templateTitleTemp = mjonCommon.ATReplaceTemplateVariables(templateTitle, variables);
|
||||
}
|
||||
}else {
|
||||
templateContentTemp = variables.get("templateContent");
|
||||
templateTitleTemp = variables.get("templateTitle");
|
||||
}
|
||||
|
||||
|
||||
/** @버튼 치환 */ // 버튼 리스트가 있으면 치환 수행, 항상 sendVO에 설정
|
||||
List<KakaoButtonVO> buttonList = templateDetail.getButtonList();
|
||||
if(hasButtonReplacement) {
|
||||
@ -219,19 +191,44 @@ public class KakaoSendUtil {
|
||||
String subMsgTxtTemp = subMsgTxt;
|
||||
// Step 1-4: 실패 대체 문자 치환데이터 설정
|
||||
if("Y".equals(kakaoVO.getSubMsgSendYn())) { // 대체문자가 있나?
|
||||
// api가 아니면
|
||||
if(!isApiData) {
|
||||
if ("Y".equals(kakaoVO.getSubMsgTxtReplYn())) { // 치환데이터가 있나?
|
||||
subMsgTxtTemp = mjonCommon.ATReplaceTemplateVariables(subMsgTxt, variables);
|
||||
}
|
||||
}else {
|
||||
subMsgTxtTemp = variables.get("subMsgTxt");
|
||||
if ("Y".equals(kakaoVO.getSubMsgTxtReplYn())) { // 치환데이터가 있나?
|
||||
subMsgTxtTemp = mjonCommon.ATReplaceTemplateVariables(subMsgTxt, variables);
|
||||
}
|
||||
sendVO.setSubMsgTxt(subMsgTxtTemp);// 실패
|
||||
}
|
||||
sendVO.setSubMsgSendYn(kakaoVO.getSubMsgSendYn());
|
||||
|
||||
|
||||
/*
|
||||
log.info("kakaoSendAdvcVO Details: [callTo={}\n, templateContent=\n{}\n, subMsgTxt=\n{}]\n\n\n\n",
|
||||
kakaoSendAdvcVO.getCallTo(),
|
||||
kakaoSendAdvcVO.getTemplateContent(),
|
||||
kakaoSendAdvcVO.getSubMsgTxt()
|
||||
);
|
||||
*/
|
||||
|
||||
// Step1 END
|
||||
|
||||
|
||||
// step3
|
||||
// 바이트 수 체크 및 금액설정
|
||||
|
||||
|
||||
// 유효한 단가 계산
|
||||
float shortPrice = getValidPrice(mberManageVO.getShortPrice(), sysJoinSetVO.getShortPrice());
|
||||
float longPrice = getValidPrice(mberManageVO.getLongPrice(), sysJoinSetVO.getLongPrice());
|
||||
float kakaoAtPrice = getValidPrice(mberManageVO.getKakaoAtPrice(), sysJoinSetVO.getKakaoAtPrice());
|
||||
|
||||
|
||||
String shortPStr = Float.toString(shortPrice);
|
||||
String mmsPStr = Float.toString(longPrice);
|
||||
String kakaoAtPStr = Float.toString(kakaoAtPrice);
|
||||
|
||||
// 공통 가격 설정
|
||||
sendVO.setSmsPrice(shortPStr);
|
||||
sendVO.setMmsPrice(mmsPStr);
|
||||
sendVO.setKakaoAtPrice(kakaoAtPStr);
|
||||
|
||||
|
||||
if("Y".equals(kakaoVO.getSubMsgSendYn())) {
|
||||
int smsTxtByte = mjonCommon.getSmsTxtBytes(sendVO.getSubMsgTxt());
|
||||
@ -239,8 +236,7 @@ public class KakaoSendUtil {
|
||||
sendVO.setSubMsgType(sendType);
|
||||
|
||||
if ("INVALID".equals(sendType)) {
|
||||
// statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "전송 문자 길이를 초과하였습니다.");return kakaoSendAdvcListVO;
|
||||
StatusResponse.statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "전송 문자 길이를 초과하였습니다.", "STAT_1080");return kakaoSendAdvcListVO;
|
||||
statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "전송 문자 길이를 초과하였습니다.");return kakaoSendAdvcListVO;
|
||||
}
|
||||
|
||||
boolean isMms = "MMS".equals(sendType);
|
||||
@ -355,8 +351,7 @@ public class KakaoSendUtil {
|
||||
MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(kakaoVO.getUserId());
|
||||
// 시스템 기본 단가 정보 불러오기
|
||||
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
|
||||
|
||||
kakaoVO.setAtSmishingYn(mberManageVO.getAtSmishingYn());
|
||||
|
||||
|
||||
// 치환 문구가 있는지 확인
|
||||
Boolean replaceYN = MsgSendUtils.getReplaceYN(templateContent);
|
||||
@ -833,7 +828,7 @@ public class KakaoSendUtil {
|
||||
sendVO.setReqDate(DATE_FORMATTER.format(calendar.getTime()));
|
||||
|
||||
sendVO.setSenderKey(kakaoVO.getSenderKey());
|
||||
// sendVO.setTemplateCode(kakaoVO.getTemplateCode());
|
||||
sendVO.setTemplateCode(kakaoVO.getTemplateCode());
|
||||
sendVO.setUserId(kakaoVO.getUserId());
|
||||
sendVO.setCallFrom(kakaoVO.getCallFrom());
|
||||
sendVO.setSubMsgSendYn(kakaoVO.getSubMsgSendYn());
|
||||
@ -1887,15 +1882,12 @@ public class KakaoSendUtil {
|
||||
sendVO.setBefPoint(priceAndPoint.getBefPoint(sendVO.getUserId()));
|
||||
sendVO.setAdFlag(kakaoVO.getAdFlag());
|
||||
|
||||
sendVO.setSendKind(kakaoVO.getSendKind());
|
||||
|
||||
Float eachPrice = Float.parseFloat(sendVO.getEachPrice());
|
||||
|
||||
Float totPrice = eachPrice * instCnt;
|
||||
sendVO.setTotPrice(String.format("%.1f", totPrice));
|
||||
|
||||
// sendVO.setAtDelayYn(kakaoVO.getAtDelayYn());
|
||||
sendVO.setAtDelayYn(kakaoVO.getAtSmishingYn());
|
||||
sendVO.setAtDelayYn(kakaoVO.getAtDelayYn());
|
||||
sendVO.setBizKakaoResendOrgnlTxt(kakaoVO.getSubMsgTxt());
|
||||
sendVO.setBizKakaoResendType(sendVO.getSubMsgType());
|
||||
sendVO.setBizKakaoImageType(kakaoVO.getImageType());
|
||||
|
||||
@ -336,33 +336,29 @@ public class KakaoVO extends MjonMsgVO{
|
||||
|
||||
public String ftToString() {
|
||||
StringBuilder sb = new StringBuilder("KakaoFTSendVO[");
|
||||
sb.append("\n sendKind=[").append(getSendKind()).append("]");
|
||||
sb.append("\n , senderKey=[").append(senderKey).append("]");
|
||||
sb.append("\n senderKey=[").append(senderKey).append("]");
|
||||
sb.append("\n , imageFileName=[").append(imageFileName).append("]");
|
||||
sb.append("\n , imageType=[").append(imageType).append("]");
|
||||
sb.append("\n , atchFileId=[").append(atchFileId).append("]");
|
||||
// sb.append("\n , imgTitle=[").append(imgTitle).append("]");
|
||||
// sb.append("\n , imgLink=[").append(imgLink).append("]");
|
||||
sb.append("\n , imgTitle=[").append(imgTitle).append("]");
|
||||
sb.append("\n , imgLink=[").append(imgLink).append("]");
|
||||
sb.append("\n , templateContent=[").append(templateContent).append("]");
|
||||
sb.append("\n , templateImageUrl=[").append(templateImageUrl).append("]");
|
||||
// sb.append("\n , imgLink=[").append(imgLink).append("]");
|
||||
// sb.append("\n , smsTxtArea=[").append(getSubMsgTxt()).append("]");
|
||||
// sb.append("\n , subMsgSendYn=[").append(subMsgSendYn).append("]");
|
||||
// sb.append("\n , subMsgTxtReplYn=[").append(subMsgTxtReplYn).append("]");
|
||||
// sb.append("\n , subMsgType=[").append(subMsgType).append("]");
|
||||
sb.append("\n , subMsgTxt=[").append(subMsgTxt).append("]");
|
||||
sb.append("\n , smsTxtArea=[").append(getSubMsgTxt()).append("]");
|
||||
sb.append("\n , subMsgSendYn=[").append(subMsgSendYn).append("]");
|
||||
sb.append("\n , subMsgTxtReplYn=[").append(subMsgTxtReplYn).append("]");
|
||||
sb.append("\n , subMsgType=[").append(subMsgType).append("]");
|
||||
sb.append("\n , subMsgTxt=[").append(subMsgTxt).append("]");
|
||||
sb.append("\n , reserveYn=[").append(getReserveYn()).append("]");
|
||||
// sb.append("\n , menuTopTab=[").append(menuTopTab).append("]");
|
||||
// sb.append("\n , bizJsonYn=[").append(bizJsonYn).append("]");
|
||||
sb.append("\n , menuTopTab=[").append(menuTopTab).append("]");
|
||||
sb.append("\n , bizJsonYn=[").append(bizJsonYn).append("]");
|
||||
sb.append("\n , senderKey=[").append(senderKey).append("]");
|
||||
sb.append("\n , callFrom=[").append(getCallFrom()).append("]");
|
||||
// sb.append("\n , kakaoFtPrice=[").append(getEachPrice()).append("]");
|
||||
sb.append("\n , kakaoFtPrice=[").append(getEachPrice()).append("]");
|
||||
sb.append("\n , reqDate=[").append(getReqDate()).append("]");
|
||||
// sb.append("\n , spamStatus=[").append(getSpamStatus()).append("]");
|
||||
// sb.append("\n , txtReplYn=[").append(getTxtReplYn()).append("]");
|
||||
// sb.append("\n , atSmishingYn=[").append(getAtSmishingYn()).append("]");
|
||||
// sb.append("\n , atDelayYn=[").append(getAtDelayYn()).append("]");
|
||||
// sb.append("\n , filePath1=[").append(getFilePath1()).append("]");
|
||||
sb.append("\n , spamStatus=[").append(getSpamStatus()).append("]");
|
||||
sb.append("\n , txtReplYn=[").append(getTxtReplYn()).append("]");
|
||||
sb.append("\n , atSmishingYn=[").append(getAtSmishingYn()).append("]");
|
||||
sb.append("\n , atDelayYn=[").append(getAtDelayYn()).append("]");
|
||||
// sb.append("\n , tmpBtnSelect=[").append(getTmpBtnSelect()).append("]");
|
||||
StringBuilder btnListSb = new StringBuilder("[");
|
||||
if (buttonVOList != null && !buttonVOList.isEmpty()) {
|
||||
@ -392,7 +388,4 @@ public class KakaoVO extends MjonMsgVO{
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -19,7 +19,6 @@ import javax.imageio.ImageIO;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
@ -396,7 +395,6 @@ public class KakaoApiImageUpload {
|
||||
.addTextBody("senderKey", kakaoVO.getSenderKey())
|
||||
.addBinaryBody("image", new File(filePath), ContentType.MULTIPART_FORM_DATA, newName + "." + ext)
|
||||
.build();
|
||||
;
|
||||
|
||||
httpPost.setEntity(httpEntity);
|
||||
|
||||
@ -409,8 +407,7 @@ public class KakaoApiImageUpload {
|
||||
String result = EntityUtils.toString(response.getEntity(), "UTF-8");
|
||||
JSONParser parser = new JSONParser();
|
||||
JSONObject object = (JSONObject) parser.parse(result);
|
||||
log.info("object + :: [{}]", object.toJSONString());
|
||||
|
||||
|
||||
String code = object.get("code").toString();
|
||||
if ("200".equals(code)) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
|
||||
@ -148,8 +148,24 @@ public class KakaoApiProfile {
|
||||
kakaoReturnVO.setBizReturnMsg(msg);
|
||||
|
||||
if(code.equals("200")) {
|
||||
kakaoReturnVO.setSenderKey((String) ((JSONObject) object.get("data")).get("senderKey"));
|
||||
JSONObject tempCate = (JSONObject) object.get("data");
|
||||
String senderKey = tempCate.get("senderKey").toString();
|
||||
kakaoVO.setSenderKey(senderKey);
|
||||
int profileCnt = kakaoApiService.selectKakaoProfileCnt(kakaoVO);
|
||||
|
||||
//중복된 발신프로필이 없으면 추가 입력
|
||||
if(profileCnt == 0) {
|
||||
kakaoApiService.insertKakaoProfileInfo(kakaoVO);
|
||||
}else {//중복이 있는 경우 처리
|
||||
|
||||
kakaoReturnVO.setBizReturnCode("310");
|
||||
kakaoReturnVO.setBizReturnMsg("이미 등록되어 있는 발신프로필 입니다");
|
||||
|
||||
return kakaoReturnVO;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
kakaoReturnVO.setBizReturnCode(statusCode);
|
||||
|
||||
@ -4,7 +4,7 @@ import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import itn.let.kakao.kakaoComm.KakaoReturnVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoSendAdvcVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoVO;
|
||||
import itn.let.mail.service.StatusResponse;
|
||||
import itn.let.mjo.msgdata.service.MjonMsgReturnVO;
|
||||
@ -23,13 +23,12 @@ public interface KakaoAlimTalkService {
|
||||
//카카오 친구톡 발신
|
||||
public MjonMsgReturnVO insertKakaoFtSendAjax(KakaoVO kakaoVO) throws Exception;
|
||||
|
||||
//카카오 알림톡 전송 실패 환불리스트 조회
|
||||
public void selectKakaoAtSentRefundList() throws Exception;
|
||||
|
||||
//카카오 친구톡 전송 실패 환불리스트 조회
|
||||
public void selectKakaoFtSentRefundList() throws Exception;
|
||||
|
||||
StatusResponse insertKakaoAtSandAjax_advc(KakaoVO kakaoVO, HttpServletRequest request) throws Exception;
|
||||
|
||||
//카카오(알림톡, 친구톡 통합) 전송 실패 환불리스트 조회
|
||||
public List<KakaoVO> selectKakaoSentRefundListForSingle() throws Exception;
|
||||
|
||||
public void kakaoSingleRefund(KakaoVO kakaoVO) throws Exception;
|
||||
|
||||
//발신 프로필 등록 처리
|
||||
public KakaoReturnVO createKaKaoProfile(KakaoVO kakaoVO) throws Exception;
|
||||
}
|
||||
|
||||
@ -49,8 +49,13 @@ public class KakaoAlimTalkDAO extends EgovAbstractDAO {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<KakaoVO> selectKakaoSentRefundList() throws Exception{
|
||||
return (List<KakaoVO>) list("kakaoAlimTalkDAO.selectKakaoSentRefundList");
|
||||
public List<KakaoVO> selectKakaoAtSentRefundList() throws Exception{
|
||||
return (List<KakaoVO>) list("kakaoAlimTalkDAO.selectKakaoAtSentRefundList");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<KakaoVO> selectKakaoFtSentRefundList() throws Exception{
|
||||
return (List<KakaoVO>) list("kakaoAlimTalkDAO.selectKakaoFtSentRefundList");
|
||||
}
|
||||
|
||||
public KakaoVO selectKakaoAtUmid(KakaoVO kakaoVO) throws Exception{
|
||||
|
||||
@ -11,6 +11,8 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -25,13 +27,12 @@ import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||
import itn.com.cmm.LoginVO;
|
||||
import itn.com.cmm.MjonMsgSendVO;
|
||||
import itn.com.utl.fcc.service.EgovStringUtil;
|
||||
import itn.let.kakao.kakaoComm.BizKakaoPriceVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoReturnVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoSendAdvcVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoSendUtil;
|
||||
import itn.let.kakao.kakaoComm.KakaoVO;
|
||||
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
|
||||
import itn.let.kakao.user.kakaoAt.service.KakaoAlimTalkService;
|
||||
import itn.let.mail.service.StatusResponse;
|
||||
import itn.let.mjo.mjocommon.MjonCommon;
|
||||
@ -50,6 +51,7 @@ import itn.let.module.base.PriceAndPoint;
|
||||
import itn.let.sym.site.service.JoinSettingVO;
|
||||
import itn.let.sym.site.service.impl.SiteManagerDAO;
|
||||
import itn.let.uss.umt.service.EgovUserManageService;
|
||||
import itn.let.uss.umt.service.UserManageVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@ -86,9 +88,6 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
/** userManageService */
|
||||
@Resource(name = "userManageService")
|
||||
private EgovUserManageService userManageService;
|
||||
|
||||
@Resource(name = "kakaoApiService")
|
||||
private KakaoApiService kakaoApiService;
|
||||
|
||||
@Autowired
|
||||
private MjonPayDAO mjonPayDAO;
|
||||
@ -106,8 +105,6 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
final String RESEND_YN_YES = "Y";
|
||||
final String SMS_SUCCESS_CODE = "4100"; // SMS 성공 코드
|
||||
final String MMS_SUCCESS_CODE = "6600"; // MMS 성공 코드
|
||||
final String AT_MSG_TYPE = "8"; // MSG 타입 알림톡
|
||||
final String FT_MSG_TYPE = "9"; // MSG 타입 친구톡
|
||||
|
||||
//발신프로필 상태값 변경(삭제/복구 기능)
|
||||
@Override
|
||||
@ -796,82 +793,150 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
return returnVO;
|
||||
}
|
||||
|
||||
private void processKakaoSendCharge(KakaoVO kakaoVO) throws Exception {
|
||||
|
||||
/*
|
||||
* 카카오 알림톡 발송 실패에 따른 금액 환불 처리
|
||||
*
|
||||
* */
|
||||
@Override
|
||||
public void selectKakaoAtSentRefundList() throws Exception {
|
||||
|
||||
//1-1.카카오톡 발송 성공 + 대체문자 신청 O : 대체문자 금액 환불
|
||||
/**
|
||||
* 1. 카카오 AT 전송성공 확인
|
||||
* 2. 카카오 AT 전송실패, 대채문자 전송확인
|
||||
* 3. 카카오 AT 전송 실패 확인
|
||||
*/
|
||||
List<KakaoVO> kakaoAtSentRefundList = kakaoAlimTalkDAO.selectKakaoAtSentRefundList();
|
||||
|
||||
for(KakaoVO vo : kakaoAtSentRefundList) {
|
||||
System.out.println(vo.getMsgGroupId() +"________결과 : " +vo.getRsltCode() +" 대체문자 전송 : "+vo.getSubMsgSendYn());
|
||||
if(vo.getRsltCode().equals("7000")) {
|
||||
kakaoAlimTalkDAO.updateKakaoAtSend(vo);
|
||||
}else if(vo.getSubMsgSendYn().equals("Y")) {
|
||||
KakaoVO info = kakaoAlimTalkDAO.selectKakaoAtUmid(vo);
|
||||
|
||||
System.out.println("대체문자 전송 : " + info.getBizUmid());
|
||||
if (info.getBizUmid() != null) {
|
||||
kakaoAlimTalkDAO.updateKakaoAtSubMsgSend(vo);
|
||||
}else {
|
||||
kakaoAlimTalkDAO.updateKakaoAtNotSend(vo);
|
||||
}
|
||||
|
||||
}else {
|
||||
kakaoAlimTalkDAO.updateKakaoAtNotSend(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ 카카오 친구톡 환불
|
||||
*/
|
||||
@Override
|
||||
public void selectKakaoFtSentRefundList() throws Exception {
|
||||
|
||||
List<KakaoVO> kakaoFtSentRefundList = kakaoAlimTalkDAO.selectKakaoFtSentRefundList();
|
||||
|
||||
for(KakaoVO kakaoVO : kakaoFtSentRefundList) {
|
||||
System.out.println(kakaoVO.getMsgGroupId() +"________결과 : " +kakaoVO.getRsltCode() +" 대체문자 전송 : "+kakaoVO.getSubMsgSendYn());
|
||||
|
||||
if(KAKAO_SUCCESS_CODE.equals(kakaoVO.getRsltCode())) {//친구톡 발송 성공시
|
||||
|
||||
processFtSendCharge(kakaoVO);
|
||||
|
||||
}else if(RESEND_YN_YES.equals(kakaoVO.getSubMsgSendYn())) {
|
||||
//친구톡 발송 실패 했고, 대체문자 발송 했을 경우
|
||||
handleAlternativeMessageScenario(kakaoVO);
|
||||
|
||||
}else {
|
||||
handleRefund(kakaoVO, "카카오 친구톡 전송 실패로 인한 결재 금액 환불");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void processFtSendCharge(KakaoVO kakaoVO) throws Exception {
|
||||
|
||||
|
||||
if(RESEND_YN_YES.equals(kakaoVO.getSubMsgSendYn())) {
|
||||
|
||||
BizKakaoPriceVO bizKakaoPriceVO = mjonPayDAO.selectBizKakaoPrice(kakaoVO.getMsgGroupId());
|
||||
|
||||
BigDecimal sendPrice = null;
|
||||
|
||||
if(AT_MSG_TYPE.equals(kakaoVO.getMsgType())){
|
||||
sendPrice = new BigDecimal(bizKakaoPriceVO.getBizKakaoAtPrice());
|
||||
}else {
|
||||
if(StringUtils.isEmpty(kakaoVO.getBizKakaoImageType())){
|
||||
sendPrice = new BigDecimal(bizKakaoPriceVO.getBizKakaoFtPrice());
|
||||
}else if("I".equals(kakaoVO.getBizKakaoImageType())){
|
||||
sendPrice = new BigDecimal(bizKakaoPriceVO.getBizKakaoFtImgPrice());
|
||||
}else if("W".equals(kakaoVO.getBizKakaoImageType())){
|
||||
sendPrice = new BigDecimal(bizKakaoPriceVO.getBizKakaoFtWideImgPrice());
|
||||
}
|
||||
if(StringUtils.isEmpty(kakaoVO.getBizKakaoImageType())){
|
||||
sendPrice = new BigDecimal(bizKakaoPriceVO.getBizKakaoFtPrice());
|
||||
}else if("I".equals(kakaoVO.getBizKakaoImageType())){
|
||||
sendPrice = new BigDecimal(bizKakaoPriceVO.getBizKakaoFtImgPrice());
|
||||
}else if("W".equals(kakaoVO.getBizKakaoImageType())){
|
||||
sendPrice = new BigDecimal(bizKakaoPriceVO.getBizKakaoFtWideImgPrice());
|
||||
}
|
||||
|
||||
// 예시: 각 건당 가격이 이미 String 형태라면 변환
|
||||
BigDecimal eachPrice = new BigDecimal(kakaoVO.getEachPrice());
|
||||
|
||||
// 차이 계산
|
||||
BigDecimal diffPrice = eachPrice.subtract(sendPrice);
|
||||
|
||||
//대체문자 비용(eachPrace - sendPrice)
|
||||
|
||||
if (diffPrice.compareTo(BigDecimal.ZERO) > 0) {
|
||||
String result = diffPrice.toString();
|
||||
kakaoVO.setEachPrice(result);
|
||||
handleRefund(kakaoVO, "카카오 " + kakaoVO.getMsgTypeTxt() + " 발송 성공 후 대체문자 금액 환불");
|
||||
|
||||
handleRefund(kakaoVO, "카카오 친구톡 전송으로 인한 결재 차액 환불");
|
||||
}
|
||||
|
||||
}else {
|
||||
mjonMsgDAO.updateRefundY(kakaoVO);
|
||||
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
//1-2.카카오톡 발송 성공 + 대체문자 신청 X : 금액 환불 X
|
||||
}
|
||||
|
||||
private void handleAlternativeMessageScenario(KakaoVO kakaoVO) throws Exception {
|
||||
KakaoVO bizLogVO = kakaoAlimTalkDAO.selectBizLog(kakaoVO.getBizUmid());
|
||||
log.info("대체문자 전송 UMID: {}", kakaoVO.getBizUmid());
|
||||
|
||||
//2-1.카카오톡 발송 실패 + 대체문자 발송 성공 : 금액 환불 X
|
||||
// 대체문자가 성공적으로 발송되었는지 확인 (SMS 또는 MMS 성공)
|
||||
boolean isAlternativeMessageSuccessful = false;
|
||||
if (bizLogVO != null && StringUtils.isNotEmpty(bizLogVO.getBizLogCallStatus())) {
|
||||
if (SMS_SUCCESS_CODE.equals(bizLogVO.getBizLogCallStatus())
|
||||
|| MMS_SUCCESS_CODE.equals(bizLogVO.getBizLogCallStatus())) {
|
||||
isAlternativeMessageSuccessful = true;
|
||||
}
|
||||
log.info("bizLogVO.getBizLogCallStatus() :: [{}]", bizLogVO.getBizLogCallStatus());
|
||||
log.info("isAlternativeMessageSuccessful :: [{}]", isAlternativeMessageSuccessful);
|
||||
}
|
||||
|
||||
log.info("bizLogVO.getBizLogCallStatus() :: [{}]", bizLogVO.getBizLogCallStatus());
|
||||
log.info("isAlternativeMessageSuccessful :: [{}]", isAlternativeMessageSuccessful);
|
||||
|
||||
//2-2.카카오톡 발송 실패 + 대체문자 발송 실패 : 전액 환불
|
||||
if (!isAlternativeMessageSuccessful) {
|
||||
handleRefund(kakaoVO, "카카오 " + kakaoVO.getMsgTypeTxt() + " 전송 실패로 인한 결제 금액 환불");
|
||||
}
|
||||
// 대체문자 성공이면 환불 완료처리면 한다.
|
||||
if (isAlternativeMessageSuccessful) {
|
||||
mjonMsgDAO.updateRefundY(kakaoVO);
|
||||
} else {
|
||||
// 대체문자 발송 실패 된 경우 (친구톡 비용 환불 필요)
|
||||
handleRefund(kakaoVO, "카카오 친구톡 전송 실패로 인한 결재 금액 환불");
|
||||
}
|
||||
}
|
||||
|
||||
private void handleRefund(KakaoVO vo, String msg) throws Exception {
|
||||
// mj_cash 테이블에 환불 내역 추가 및 회원 금액 업데이트
|
||||
// eachPrice는 환불될 금액이므로 양수여야 합니다.
|
||||
priceAndPoint.insertCashAndPointNoUpdate(
|
||||
priceAndPoint.insertCashAndPoint(
|
||||
vo.getUserId(),
|
||||
Float.parseFloat(vo.getEachPrice()), // 환불 금액은 양수
|
||||
msg,
|
||||
vo.getMsgGroupId(),
|
||||
vo.getUserData()
|
||||
);
|
||||
|
||||
// 해당 row 환불 처리 (mj_msg_data.REFUND_YN = 'Y')
|
||||
mjonMsgDAO.updateRefundY(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatusResponse insertKakaoAtSandAjax_advc(KakaoVO kakaoVO, HttpServletRequest request) throws Exception {
|
||||
|
||||
log.info(" :: [{}]", kakaoVO.toString());
|
||||
// log.info(" :: [{}]", kakaoVO.toString());
|
||||
|
||||
|
||||
// 측정할 메소드 호출 전 시간 기록
|
||||
@ -879,25 +944,17 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
// KakaoSendAdvcVO
|
||||
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
Map<String, Object> apiReturnMap = new HashMap<>();
|
||||
|
||||
String userId = "";
|
||||
if("A".equals(kakaoVO.getSendKind()))
|
||||
{
|
||||
userId = kakaoVO.getMberId();
|
||||
}else {
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()
|
||||
? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
|
||||
: null;
|
||||
userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if (userId.equals("")) {
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
||||
}
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()
|
||||
? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
|
||||
: null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if (userId.equals("")) {
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
||||
}
|
||||
|
||||
kakaoVO.setUserId(userId);
|
||||
kakaoVO.setUserId(userId);
|
||||
|
||||
/**
|
||||
* 회원 정지된 상태이면 문자 발송이 안되도록 처리함 현재 로그인 세션도 만료 처리함
|
||||
@ -907,7 +964,7 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
request.getSession().invalidate();
|
||||
// UNAUTHORIZED : 인증되지 않은 사용자가 접근하려고 할 때
|
||||
return new StatusResponse(HttpStatus.UNAUTHORIZED,
|
||||
"현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 알림톡을 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.", "STAT_1070");
|
||||
"현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 알림톡을 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.");
|
||||
}
|
||||
|
||||
|
||||
@ -932,7 +989,7 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
/** @전송금액 확인 --------------------------------------------------*/
|
||||
if (!kakaoSendUtil.isCashSufficient(userId, kakaoSendAdvcListVO)) {
|
||||
log.error("Insufficient balance for message sending.");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다.", "STAT_1060");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다.");
|
||||
}
|
||||
|
||||
|
||||
@ -949,8 +1006,6 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
// 임시
|
||||
List<String> nextMsgGroupIdA = new ArrayList<>();
|
||||
// 대안: entrySet() 직접 사용
|
||||
String apiMsgGroupId = "";
|
||||
String apiMsgType = "";
|
||||
for (Map.Entry<String, List<KakaoSendAdvcVO>> entry : priceGroupedMessages.entrySet()) {
|
||||
// entry 사용
|
||||
|
||||
@ -960,29 +1015,6 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
groupedMsgList.forEach(t -> t.setMsgGroupId(nextMsgGroupId));
|
||||
|
||||
|
||||
// api 전달 값
|
||||
apiMsgGroupId = StringUtils.isNotEmpty(apiMsgGroupId)
|
||||
? apiMsgGroupId + "," + nextMsgGroupId
|
||||
: nextMsgGroupId;
|
||||
|
||||
apiMsgType = StringUtils.isNotEmpty(apiMsgType)
|
||||
? apiMsgType + "," + kakaoSendAdvcListVO.get(0).getMsgType()
|
||||
: kakaoSendAdvcListVO.get(0).getMsgType();
|
||||
|
||||
|
||||
|
||||
groupedMsgList.stream().forEach(t-> log.info("t.toString() [{}]", t.toString()));
|
||||
|
||||
//
|
||||
// if(1==1) {
|
||||
//
|
||||
// // 강제로 예외 발생
|
||||
// throw new RuntimeException("강제 예외 발생 테스트");
|
||||
// }
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
// 발송 데이터 삽입
|
||||
int instCnt = kakaoSendUtil.insertKakaoData_advc(groupedMsgList);
|
||||
// int instCnt = 6;
|
||||
@ -993,8 +1025,6 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
KakaoSendAdvcVO sendVO = groupedMsgList.get(0);
|
||||
|
||||
// log.info(" ++ kakaoVO.getAtSmishingYn() :: [{}]", kakaoVO.getAtSmishingYn());
|
||||
// log.info(" ++ kakaoVO.getAtDelayYn() :: [{}]", kakaoVO.getAtDelayYn());
|
||||
/** @groupData 테이블 insert */
|
||||
kakaoSendUtil.insertKakaoGroupDataTb_advc(instCnt, kakaoVO, sendVO);
|
||||
|
||||
@ -1040,14 +1070,7 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
}
|
||||
|
||||
apiReturnMap.put("resultSts", instTotalCnt);
|
||||
// 그룹 ID
|
||||
apiReturnMap.put("msgGroupId", apiMsgGroupId);
|
||||
// 메세지 타입
|
||||
apiReturnMap.put("msgType", apiMsgType);
|
||||
|
||||
returnMap.put("resultSts", instTotalCnt);
|
||||
|
||||
returnMap.put("reserYn", kakaoVO.getReserveYn());
|
||||
returnMap.put("groupIds", nextMsgGroupIdA);
|
||||
|
||||
@ -1077,210 +1100,62 @@ public class KakaoAlimTalkServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
statusResponse.setStatus(HttpStatus.OK);
|
||||
statusResponse.setObject(returnMap);
|
||||
apiReturnMap.put("result", HttpStatus.OK);
|
||||
apiReturnMap.put("message", "전송이 완료되었습니다.");
|
||||
statusResponse.setApiReturn(apiReturnMap);
|
||||
|
||||
return statusResponse;
|
||||
}
|
||||
@Override
|
||||
public List<KakaoVO> selectKakaoSentRefundListForSingle() throws Exception{
|
||||
return kakaoAlimTalkDAO.selectKakaoSentRefundList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kakaoSingleRefund(KakaoVO kakaoVO) throws Exception {
|
||||
|
||||
System.out.println(kakaoVO.getMsgGroupId() +"________결과 : " +kakaoVO.getRsltCode() +" 대체문자 전송 : "+kakaoVO.getSubMsgSendYn());
|
||||
kakaoVO.setMsgTypeTxt(AT_MSG_TYPE.equals(kakaoVO.getMsgType()) ? "알림톡" : "친구톡");
|
||||
|
||||
if(KAKAO_SUCCESS_CODE.equals(kakaoVO.getRsltCode())) {
|
||||
//1.카카오톡 발송 성공
|
||||
processKakaoSendCharge(kakaoVO);
|
||||
|
||||
}else if(RESEND_YN_YES.equals(kakaoVO.getSubMsgSendYn())) {//카카오톡 발송 실패, 대체문자 발송 신청 O
|
||||
//2.카카오톡 발송 실패 + 대체문자 신청 O
|
||||
handleAlternativeMessageScenario(kakaoVO);
|
||||
|
||||
}else {
|
||||
//3.카카오톡 발송 실패 + 대체문자 신청 X : 전액 환불
|
||||
handleRefund(kakaoVO, "카카오 " + kakaoVO.getMsgTypeTxt() + " 전송 실패로 인한 결제 금액 환불");
|
||||
}
|
||||
|
||||
//모든 유형 환불 완료 처리
|
||||
mjonMsgDAO.updateRefundY(kakaoVO);
|
||||
}
|
||||
|
||||
private void insertKakaoAtDataJsonInfo_advc(List<KakaoSendAdvcVO> kakaoSendAdvcListVO) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
// 측정할 메소드 호출 전 시간 기록
|
||||
List<KakaoSendAdvcVO> jsonInfoData = new ArrayList<>(kakaoSendAdvcListVO);
|
||||
jsonInfoData.removeIf(t -> StringUtils.isBlank(t.getJsonStr()));
|
||||
log.info(" + jsonInfoData Insert :: [{}]", jsonInfoData.size());
|
||||
if(jsonInfoData.size() > 0) {
|
||||
kakaoAlimTalkDAO.insertKakaoAtDataJsonInfo_advc(jsonInfoData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void insertKakaoGroupDataTb_advc(int instCnt, KakaoVO kakaoVO, KakaoSendAdvcVO sendVO) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
// log.info(" + insertKakaoGroupDataTb_advc kakaoVO :: \n[{}]", kakaoVO.toString());;
|
||||
// log.info(" + insertKakaoGroupDataTb_advc kakaoSendAdvcVOList :: \n[{}]", sendVO.toString());
|
||||
|
||||
sendVO.setMsgGroupCnt(Integer.toString(instCnt));
|
||||
sendVO.setReserveYn(kakaoVO.getReserveYn());
|
||||
sendVO.setBefCash(priceAndPoint.getBefCash(sendVO.getUserId()));
|
||||
sendVO.setBefPoint(priceAndPoint.getBefPoint(sendVO.getUserId()));
|
||||
|
||||
Float eachPrice = Float.parseFloat(sendVO.getEachPrice());
|
||||
|
||||
Float totPrice = eachPrice * instCnt;
|
||||
sendVO.setTotPrice(String.format("%.1f", totPrice));
|
||||
|
||||
sendVO.setAtDelayYn(StringUtils.isEmpty(kakaoVO.getAtSmishingYn()) ? "N" : kakaoVO.getAtSmishingYn());
|
||||
sendVO.setSendKind(StringUtils.isEmpty(kakaoVO.getSendKind()) ? "H" : kakaoVO.getSendKind());
|
||||
sendVO.setBizKakaoResendOrgnlTxt(kakaoVO.getSubMsgTxt());
|
||||
sendVO.setBizKakaoResendType(sendVO.getSubMsgType());
|
||||
|
||||
kakaoAlimTalkDAO.insertKakaoGroupDataTb_advc(sendVO);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @methodName : insertKakaoData_advc
|
||||
* @author : 이호영
|
||||
* @date : 2025. 3. 20.
|
||||
* @description : 카카오 batch 발송 => mj_msg_data
|
||||
* @return : int
|
||||
* @param kakaoSendAdvcVOList
|
||||
* @param parentLoopCount
|
||||
* @param isJsonNotEmpty
|
||||
* @param isJsonNameAllSame
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
private int insertKakaoData_advc(List<KakaoSendAdvcVO> kakaoSendAdvcVOList) {
|
||||
|
||||
|
||||
// 시작 시간 측정
|
||||
long totalStartTime = System.currentTimeMillis();
|
||||
|
||||
int totalSize = kakaoSendAdvcVOList.size(); // 총 데이터 개수
|
||||
// Batch 크기 설정 (고정값)
|
||||
// int batchSize = 10000; 465
|
||||
int batchSize = 50000; // 9분 18초
|
||||
|
||||
log.info("총 데이터 개수 :: [{}] ", totalSize);
|
||||
log.info("설정된 Batch 크기 :: [{}] ", batchSize);
|
||||
|
||||
// 총 insert 카운트
|
||||
int instCnt = 0;
|
||||
int batchCount = 0;
|
||||
|
||||
// 각 배치별 실행 시간 기록
|
||||
List<Double> batchExecutionTimes = new ArrayList<>();
|
||||
|
||||
|
||||
// 첫 번째 배치에서만 삽입했는지 추적하는 플래그
|
||||
for (int i = 0; i < totalSize; i += batchSize) {
|
||||
// Batch 시작 시간 측정
|
||||
long batchStartTime = System.currentTimeMillis();
|
||||
|
||||
|
||||
// Batch 리스트 생성
|
||||
List<KakaoSendAdvcVO> batchList = kakaoSendAdvcVOList.subList(i, Math.min(i + batchSize, totalSize));
|
||||
System.out.println("Batch 시작 인덱스: " + i);
|
||||
|
||||
// mj_msg_data 테이블 insert
|
||||
int insertedCount = kakaoAlimTalkDAO.insertKakaoAtDataInfo_advc(batchList);
|
||||
|
||||
/** @kakaoSendUtil.populateSendLists
|
||||
* 하단에서
|
||||
* getJsonStr 데이터 처리 후 활용
|
||||
* */
|
||||
instCnt += insertedCount;
|
||||
|
||||
// Batch 종료 시간 측정 및 실행 시간 계산
|
||||
long batchEndTime = System.currentTimeMillis();
|
||||
double batchExecutionTimeInSeconds = (batchEndTime - batchStartTime) / 1000.0;
|
||||
|
||||
// 실행 시간 기록
|
||||
batchExecutionTimes.add(batchExecutionTimeInSeconds);
|
||||
batchCount++;
|
||||
}
|
||||
|
||||
// 종료 시간 측정
|
||||
long totalEndTime = System.currentTimeMillis();
|
||||
|
||||
// 총 실행 시간 계산 (밀리초 -> 초로 변환)
|
||||
double totalExecutionTimeInSeconds = (totalEndTime - totalStartTime) / 1000.0;
|
||||
|
||||
// 실행 시간 출력
|
||||
log.info("총 배치 실행 횟수 :: [{}] ", batchCount);
|
||||
log.info("batchSize :: [{}] ", batchSize);
|
||||
log.info("총 실행 시간 :: [{}] ", totalExecutionTimeInSeconds + "초");
|
||||
log.info("총 삽입 건수 :: [{}] ", instCnt);
|
||||
|
||||
// 각 배치별 실행 시간 출력
|
||||
for (int k = 0; k < batchExecutionTimes.size(); k++) {
|
||||
System.out.println("배치 " + (k + 1) + " 실행 시간 :: " + batchExecutionTimes.get(k) + "초");
|
||||
}
|
||||
|
||||
return instCnt;
|
||||
|
||||
}
|
||||
|
||||
// 보유 금액이 충분한지 확인하는 메서드
|
||||
private boolean isCashSufficient(String userId, List<KakaoSendAdvcVO> kakaoSendAdvcListVO) throws Exception {
|
||||
|
||||
|
||||
String userMoney = priceAndPoint.getBefCash(userId);
|
||||
// 쉼표 제거
|
||||
userMoney = userMoney.replace(",", "");
|
||||
|
||||
// 사용자 보유 금액 BigDecimal 변환 (HALF_EVEN 적용)
|
||||
BigDecimal befCash = new BigDecimal(userMoney).setScale(2, RoundingMode.HALF_EVEN);
|
||||
|
||||
// 총 메시지 금액 계산 (HALF_EVEN 적용)
|
||||
BigDecimal totalEachPrice = kakaoSendAdvcListVO.stream()
|
||||
.map(msg -> new BigDecimal(String.valueOf(msg.getEachPrice()))) // 변환 오류 방지
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
.setScale(2, RoundingMode.HALF_EVEN); // 일관성 유지
|
||||
|
||||
// 비교 수행
|
||||
return befCash.compareTo(totalEachPrice) >= 0;
|
||||
}
|
||||
// // 보유 금액이 충분한지 확인하는 메서드
|
||||
// private boolean isCashSufficient(String userId, List<KakaoSendAdvcVO> kakaoSendAdvcListVO) throws Exception {
|
||||
//
|
||||
//
|
||||
// String userMoney = priceAndPoint.getBefCash(userId);
|
||||
// // 쉼표 제거
|
||||
// userMoney = userMoney.replace(",", "");
|
||||
//
|
||||
// // 사용자 보유 금액 BigDecimal 변환 (HALF_EVEN 적용)
|
||||
// BigDecimal befCash = new BigDecimal(userMoney).setScale(2, RoundingMode.HALF_EVEN);
|
||||
//
|
||||
// // 총 메시지 금액 계산 (HALF_EVEN 적용)
|
||||
// BigDecimal totalEachPrice = kakaoSendAdvcListVO.stream()
|
||||
// .map(msg -> new BigDecimal(String.valueOf(msg.getEachPrice()))) // 변환 오류 방지
|
||||
// .reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||
// .setScale(2, RoundingMode.HALF_EVEN); // 일관성 유지
|
||||
//
|
||||
// // 비교 수행
|
||||
// return befCash.compareTo(totalEachPrice) >= 0;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public KakaoReturnVO createKaKaoProfile(KakaoVO kakaoVO) throws Exception {
|
||||
KakaoReturnVO returnVO = new KakaoReturnVO();
|
||||
|
||||
/* senderKey 사용 우무 */
|
||||
int profileCnt = kakaoApiService.selectKakaoProfileCnt(kakaoVO);
|
||||
if(profileCnt > 0) {
|
||||
returnVO.setBizReturnMsg("이미 등록된 발신프로필입니다. 동일 채널ID는 중복 등록이 불가합니다.");
|
||||
}else {
|
||||
List<KakaoVO> delProfileList = new ArrayList<KakaoVO>();
|
||||
delProfileList = selectDeleteProfileInfo(kakaoVO);
|
||||
|
||||
if(delProfileList.size() != 0) {
|
||||
kakaoVO.setProfileId(delProfileList.get(0).getProfileId());
|
||||
kakaoVO.setDeleteYn("N");
|
||||
updateKakaoProfileStatus(kakaoVO);
|
||||
returnVO.setBizReturnMsg("삭제 발신프로필의 복구가 완료 되었습니다.");
|
||||
}else {
|
||||
kakaoApiService.insertKakaoProfileInfo(kakaoVO);
|
||||
returnVO.setBizReturnMsg("발신프로필의 등록이 완료 되었습니다.");
|
||||
}
|
||||
|
||||
}
|
||||
return returnVO;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -96,10 +96,7 @@ public class KakaoAlimTalkController {
|
||||
|
||||
KakaoReturnVO tmpProfileVO = kakaoApiProfile.kakaoApiProfileList(kakaoProfileVO);
|
||||
|
||||
/* API를 통하여 정상적으로 조회된 프로필만 add 처리 */
|
||||
if("200".equals(tmpProfileVO.getBizReturnCode())) {
|
||||
resultApiProfileList.add(tmpProfileVO);
|
||||
}
|
||||
resultApiProfileList.add(tmpProfileVO);
|
||||
|
||||
}
|
||||
|
||||
@ -140,8 +137,21 @@ public class KakaoAlimTalkController {
|
||||
|
||||
KakaoReturnVO kakaoInfo = kakaoApiProfile.kakaoApiProfileToken(kakaoVO); //발신프로필 인증 토큰 요청하기
|
||||
|
||||
String bizReturnCd = kakaoInfo.getBizReturnCode();
|
||||
String bizReturnMsg = kakaoInfo.getBizReturnMsg();
|
||||
|
||||
List<KakaoVO> delProfileList = new ArrayList<KakaoVO>();
|
||||
if(bizReturnCd.equals("310") && bizReturnMsg.equals("이미 등록되어 있는 발신프로필 입니다")) {
|
||||
|
||||
kakaoVO.setUserId(userId);
|
||||
delProfileList = kakaoAlimTalkService.selectDeleteProfileInfo(kakaoVO);
|
||||
|
||||
}
|
||||
|
||||
int listSize = delProfileList.size();
|
||||
modelAndView.addObject("kakaoInfo", kakaoInfo);
|
||||
modelAndView.addObject("result", "success");
|
||||
modelAndView.addObject("delInfoCnt", listSize);
|
||||
|
||||
}catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
@ -259,14 +269,68 @@ public class KakaoAlimTalkController {
|
||||
kakaoVO.setLastUpdusrId(userId);
|
||||
KakaoReturnVO kakaoInfo = kakaoApiProfile.kakaoApiProfileCreate(kakaoVO);
|
||||
|
||||
if("200".equals(kakaoInfo.getBizReturnCode())) {
|
||||
kakaoVO.setSenderKey(kakaoInfo.getSenderKey());
|
||||
KakaoReturnVO internalReuslt = kakaoAlimTalkService.createKaKaoProfile(kakaoVO);
|
||||
kakaoInfo.setBizReturnMsg(internalReuslt.getBizReturnMsg());
|
||||
String bizReturnCd = kakaoInfo.getBizReturnCode();
|
||||
String bizReturnMsg = kakaoInfo.getBizReturnMsg();
|
||||
|
||||
System.out.println(bizReturnCd);
|
||||
System.out.println(bizReturnMsg);
|
||||
|
||||
/*
|
||||
* 기존에 등록된 발신프로필이라고 결과가 오는 경우 데이터베이스에서 삭제 기록을 조회해 본다.
|
||||
* 삭제 기록이 있는 경우 복구를 해주고(deleteYn 값을 'N'으로 변경)
|
||||
* 기록이 없는 경우 타 사이트에 등록되었을 수 있음.
|
||||
*
|
||||
* */
|
||||
|
||||
List<KakaoVO> delProfileList = new ArrayList<KakaoVO>();
|
||||
if((bizReturnCd.equals("509") && bizReturnMsg.equals("이미 사용중인 카카오톡 채널입니다.")) || (bizReturnCd.equals("310") && bizReturnMsg.equals("이미 등록되어 있는 발신프로필 입니다"))) {
|
||||
|
||||
delProfileList = kakaoAlimTalkService.selectDeleteProfileInfo(kakaoVO);
|
||||
|
||||
}
|
||||
|
||||
//삭제처리된 발신프로필이 있는 경우
|
||||
if(delProfileList != null && delProfileList.size() > 0) {
|
||||
|
||||
int resultCnt = 0;
|
||||
for(int i=0; i< delProfileList.size(); i++) {
|
||||
|
||||
KakaoVO tmpKakaoVO = new KakaoVO();
|
||||
tmpKakaoVO.setUserId(userId);
|
||||
tmpKakaoVO.setProfileId(delProfileList.get(i).getProfileId());
|
||||
tmpKakaoVO.setDeleteYn("N");
|
||||
|
||||
int count = kakaoAlimTalkService.updateKakaoProfileStatus(tmpKakaoVO);
|
||||
|
||||
resultCnt = resultCnt + count;
|
||||
|
||||
}
|
||||
|
||||
KakaoReturnVO kakaoReturnVO = new KakaoReturnVO();
|
||||
if(resultCnt > 0) {
|
||||
|
||||
kakaoReturnVO.setBizReturnCode("200");
|
||||
kakaoReturnVO.setBizReturnMsg("삭제 발신프로필의 복구가 완료 되었습니다.");
|
||||
modelAndView.addObject("kakaoInfo", kakaoReturnVO);
|
||||
modelAndView.addObject("result", "success");
|
||||
|
||||
}else {
|
||||
|
||||
kakaoReturnVO.setBizReturnCode("200");
|
||||
kakaoReturnVO.setBizReturnMsg("삭제 발신프로필의 복구에 오류가 발생하였습니다.");
|
||||
modelAndView.addObject("kakaoInfo", kakaoReturnVO);
|
||||
modelAndView.addObject("result", "zeroUpdate");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}else {//삭제된 내역이 없는 경우 타 사이트에 발신프로필이 등록되어 있을 수 있다.
|
||||
|
||||
modelAndView.addObject("kakaoInfo", kakaoInfo);
|
||||
modelAndView.addObject("result", "success");
|
||||
|
||||
}
|
||||
|
||||
modelAndView.addObject("kakaoInfo", kakaoInfo);
|
||||
modelAndView.addObject("result", "success");
|
||||
|
||||
}
|
||||
}catch(Exception ex){
|
||||
|
||||
@ -9,11 +9,9 @@ import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -63,6 +61,7 @@ import itn.com.cmm.util.MJUtil;
|
||||
import itn.com.cmm.util.StringUtil;
|
||||
import itn.com.utl.fcc.service.EgovStringUtil;
|
||||
import itn.let.kakao.kakaoComm.KakaoReturnVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoSendAdvcVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoSendUtil;
|
||||
import itn.let.kakao.kakaoComm.KakaoVO;
|
||||
import itn.let.kakao.kakaoComm.kakaoApi.KakaoApiJsonSave;
|
||||
@ -80,9 +79,6 @@ import itn.let.mjo.msgdata.service.MjonMsgReturnVO;
|
||||
import itn.let.mjo.msgholiday.service.MsgAlarmSetVO;
|
||||
import itn.let.mjo.msgholiday.service.MsgHolidayService;
|
||||
import itn.let.mjo.msgholiday.service.MsgHolidayVO;
|
||||
import itn.let.mjo.pay.service.MjonPayService;
|
||||
import itn.let.mjo.pay.service.MjonPayVO;
|
||||
import itn.let.org.web.OrgChartManageController;
|
||||
import itn.let.sym.site.service.EgovSiteManagerService;
|
||||
import itn.let.sym.site.service.JoinSettingVO;
|
||||
import itn.let.uss.umt.service.EgovUserManageService;
|
||||
@ -106,8 +102,6 @@ import itn.let.uss.umt.service.UserManageVO;
|
||||
@Controller
|
||||
public class KakaoAlimTalkSendController {
|
||||
|
||||
private final OrgChartManageController orgChartManageController;
|
||||
|
||||
@Resource(name = "egovMjonMsgGroupIdGnrService")
|
||||
private EgovIdGnrService idgenMjonMsgGroupId;
|
||||
|
||||
@ -155,13 +149,6 @@ public class KakaoAlimTalkSendController {
|
||||
|
||||
@Autowired
|
||||
private MjonCommon mjonCommon;
|
||||
|
||||
@Resource(name = "mjonPayService")
|
||||
private MjonPayService mjonPayService;
|
||||
|
||||
KakaoAlimTalkSendController(OrgChartManageController orgChartManageController) {
|
||||
this.orgChartManageController = orgChartManageController;
|
||||
}
|
||||
|
||||
@RequestMapping(value= {"/web/mjon/alimtalk/kakaoAlimtalkMsgDataView.do"})
|
||||
public String KakaoAlimtalkMsgDataView(ModelMap model
|
||||
@ -841,13 +828,13 @@ public class KakaoAlimTalkSendController {
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
try {
|
||||
// LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
// String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
// if(userId == "") {
|
||||
// modelAndView.addObject("result", "notLogin");
|
||||
// return modelAndView;
|
||||
// }else {
|
||||
if(userId == "") {
|
||||
modelAndView.addObject("result", "notLogin");
|
||||
return modelAndView;
|
||||
}else {
|
||||
|
||||
KakaoReturnVO kakaoTemplateTempList = kakaoApiTemplate.selectKakaoApiTemplate(kakaoVO);
|
||||
|
||||
@ -863,7 +850,7 @@ public class KakaoAlimTalkSendController {
|
||||
|
||||
modelAndView.addObject("kakaoTemplateList", kakaoTemplateTempList);
|
||||
modelAndView.addObject("result", "success");
|
||||
// }
|
||||
}
|
||||
}catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.select"));
|
||||
@ -1553,55 +1540,4 @@ public class KakaoAlimTalkSendController {
|
||||
|
||||
return "web/kakao/msgdata/at/KakaoAlimtalkMsgDataView_tmp";
|
||||
}
|
||||
|
||||
public void kakaoRefundSingleTransaction() throws Exception{
|
||||
System.out.println("=============카카오 환불 싱글 트랜잭션 수행 =============");
|
||||
|
||||
/* 회원 money 업데이트 처리 트랜잭션 분리를 위하여 impl이 아닌 현재 위치에서 반복문 실행 */
|
||||
System.out.println("=============SchedulerUtil=====runKakaoOneTime =============>");
|
||||
List<KakaoVO> kakaoRefundList = kakaoAlimTalkService.selectKakaoSentRefundListForSingle();
|
||||
Set<String> targetIdSet = new HashSet<>();
|
||||
|
||||
for(KakaoVO kakaoVO : kakaoRefundList) {
|
||||
try {
|
||||
kakaoAlimTalkService.kakaoSingleRefund(kakaoVO);
|
||||
targetIdSet.add(kakaoVO.getUserId());
|
||||
} catch (Exception e) {
|
||||
String msg = "[문자온] 환불 실패 - " + kakaoVO.getMsgId() +"("+ kakaoVO.getUserId() + ")";
|
||||
mjonCommon.sendSimpleSlackMsg(msg);;
|
||||
}
|
||||
}
|
||||
|
||||
MjonPayVO mjonPayVO = new MjonPayVO();
|
||||
for(String userId : targetIdSet) {
|
||||
try {
|
||||
mjonPayVO.setUserId(userId);
|
||||
mjonPayService.updateMemberCash(mjonPayVO); //회원정보 업데이트
|
||||
} catch(Exception e) {
|
||||
String msg = "[문자온] 환불 후 잔액 갱신 실패 - " + userId;
|
||||
mjonCommon.sendSimpleSlackMsg(msg);;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @Method Name : kakaoMsgSendRefundTestAjax
|
||||
* @작성일 : 2025. 8. 6.
|
||||
* @작성자 : 이지우
|
||||
* @Method 설명 : 카카오 친구톡 전송 환불 스케줄러 서비스 테스트
|
||||
*/
|
||||
@RequestMapping(value= {"/web/mjon/kakao/alimtalk/kakaoMsgSendRefundTestAjax.do"})
|
||||
public ModelAndView kakaoMsgSendRefundTestAjax(ModelMap model
|
||||
, HttpServletRequest request
|
||||
, @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
this.kakaoRefundSingleTransaction();
|
||||
|
||||
modelAndView.addObject("result", "success");
|
||||
return modelAndView;
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,9 +305,6 @@ public class KakaoAlimTalkTemplateController {
|
||||
|
||||
KakaoReturnVO kakaoTemplateInfo =kakaoApiTemplate.selectKakaoApiTemplateDetail(kakaoVO);
|
||||
|
||||
System.out.println("kakaoTemplateInfo :; "+ kakaoTemplateInfo);
|
||||
|
||||
|
||||
String kakaoButtonTypeDs = "";
|
||||
for(int i=0; i < kakaoTemplateInfo.getButtonList().size(); i++) {
|
||||
String buttonType = kakaoTemplateInfo.getButtonList().get(i).getLinkType();
|
||||
|
||||
@ -11,7 +11,6 @@ import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -76,37 +75,25 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
public StatusResponse insertKakaoFtSandAjax_advc(KakaoVO kakaoVO, HttpServletRequest request) throws Exception {
|
||||
StatusResponse statusResponse = new StatusResponse();
|
||||
|
||||
log.info(" + kakaoVO.toString() :: [{}]", kakaoVO.toString());
|
||||
// log.info(" + kakaoVO.toString() :: [{}]", kakaoVO.toString());
|
||||
|
||||
log.info(" + kakaoVO.toString() :: [{}]", kakaoVO.ftToString());
|
||||
// log.info(" + kakaoVO.toString() :: [{}]", kakaoVO.ftToString());
|
||||
|
||||
|
||||
// if(1==1) {
|
||||
// throw new RuntimeException("강제로 발생시킨 예외");
|
||||
// }
|
||||
|
||||
// 측정할 메소드 호출 전 시간 기록
|
||||
Instant start = Instant.now();
|
||||
// KakaoSendAdvcVO
|
||||
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
Map<String, Object> apiReturnMap = new HashMap<>();
|
||||
|
||||
String userId = "";
|
||||
if("A".equals(kakaoVO.getSendKind()))
|
||||
{
|
||||
userId = kakaoVO.getMberId();
|
||||
}else {
|
||||
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()
|
||||
? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
|
||||
: null;
|
||||
userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if (userId.equals("")) {
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
||||
}
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()
|
||||
? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
|
||||
: null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if (userId.equals("")) {
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
||||
}
|
||||
|
||||
kakaoVO.setUserId(userId);
|
||||
@ -119,7 +106,7 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
request.getSession().invalidate();
|
||||
// UNAUTHORIZED : 인증되지 않은 사용자가 접근하려고 할 때
|
||||
return new StatusResponse(HttpStatus.UNAUTHORIZED,
|
||||
"현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 친구톡을 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.", "STAT_1070");
|
||||
"현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 친구톡을 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.");
|
||||
}
|
||||
|
||||
|
||||
@ -129,7 +116,7 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
if(kakaoSendUtil.isRestrictedFriendTalkTime(kakaoSendUtil.resolveBaseDate(kakaoVO))) {
|
||||
// UNAUTHORIZED : 인증되지 않은 사용자가 접근하려고 할 때
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST,
|
||||
"친구톡은 20시 50분부터 익일 08시까지 발송이 제한됩니다.","STAT_2080");
|
||||
"친구톡은 20시 50분부터 익일 08시까지 발송이 제한됩니다.");
|
||||
}
|
||||
|
||||
|
||||
@ -152,11 +139,12 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
return statusResponse;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/** @전송금액 확인 --------------------------------------------------*/
|
||||
if (!kakaoSendUtil.isCashSufficient(userId, kakaoSendAdvcListVO)) {
|
||||
log.error("Insufficient balance for message sending.");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다.", "STAT_1060");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다.");
|
||||
}
|
||||
|
||||
|
||||
@ -174,8 +162,6 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
// 임시
|
||||
List<String> nextMsgGroupIdA = new ArrayList<>();
|
||||
// 대안: entrySet() 직접 사용
|
||||
String apiMsgGroupId = "";
|
||||
String apiMsgType = "";
|
||||
for (Map.Entry<String, List<KakaoSendAdvcVO>> entry : priceGroupedMessages.entrySet()) {
|
||||
// entry 사용
|
||||
|
||||
@ -183,15 +169,7 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
|
||||
String nextMsgGroupId = idgenMjonMsgGroupId.getNextStringId();
|
||||
groupedMsgList.forEach(t -> t.setMsgGroupId(nextMsgGroupId));
|
||||
|
||||
// api 전달 값
|
||||
apiMsgGroupId = StringUtils.isNotEmpty(apiMsgGroupId)
|
||||
? apiMsgGroupId + "," + nextMsgGroupId
|
||||
: nextMsgGroupId;
|
||||
|
||||
apiMsgType = StringUtils.isNotEmpty(apiMsgType)
|
||||
? apiMsgType + "," + kakaoSendAdvcListVO.get(0).getMsgType()
|
||||
: kakaoSendAdvcListVO.get(0).getMsgType();
|
||||
|
||||
// 발송 데이터 삽입
|
||||
int instCnt = kakaoSendUtil.insertKakaoData_advc(groupedMsgList);
|
||||
@ -246,12 +224,6 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
|
||||
}
|
||||
|
||||
apiReturnMap.put("resultSts", instTotalCnt);
|
||||
// 그룹 ID
|
||||
apiReturnMap.put("msgGroupId", apiMsgGroupId);
|
||||
// 메세지 타입
|
||||
apiReturnMap.put("msgType", apiMsgType);
|
||||
|
||||
returnMap.put("resultSts", instTotalCnt);
|
||||
returnMap.put("reserYn", kakaoVO.getReserveYn());
|
||||
returnMap.put("groupIds", nextMsgGroupIdA);
|
||||
@ -282,9 +254,6 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
|
||||
|
||||
statusResponse.setStatus(HttpStatus.OK);
|
||||
statusResponse.setObject(returnMap);
|
||||
apiReturnMap.put("result", HttpStatus.OK);
|
||||
apiReturnMap.put("message", "전송이 완료되었습니다.");
|
||||
statusResponse.setApiReturn(apiReturnMap);
|
||||
|
||||
return statusResponse;
|
||||
}
|
||||
|
||||
@ -711,6 +711,27 @@ public class KakaoFriendsTalkSendController {
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Method Name : kakaoFriendsTalkMsgSendRefundTestAjax
|
||||
* @작성일 : 2024. 1. 18.
|
||||
* @작성자 : 우영두
|
||||
* @Method 설명 : 카카오 친구톡 전송 환불 스케줄러 서비스 테스트
|
||||
*/
|
||||
@RequestMapping(value= {"/web/mjon/kakao/friendstalk/kakaoFriendsTalkMsgSendRefundTestAjax.do"})
|
||||
public ModelAndView kakaoFriendsTalkMsgSendRefundTestAjax(ModelMap model
|
||||
, HttpServletRequest request
|
||||
, @ModelAttribute("kakaoVO") KakaoVO kakaoVO) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
kakaoAlimTalkService.selectKakaoFtSentRefundList();
|
||||
|
||||
modelAndView.addObject("result", "success");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Method Name : kakaoFriendsTalkMsgSendRefundTestAjax
|
||||
* @작성일 : 2024. 1. 18.
|
||||
|
||||
@ -199,23 +199,19 @@ public class KakaoFriendsTalkTemplateController {
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
try {
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if(!"A".equals(kakaoVO.getSendKind())) {
|
||||
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if(StringUtils.isEmpty(userId)) {
|
||||
return ResponseEntity.ok(
|
||||
new StatusResponse(HttpStatus.UNAUTHORIZED
|
||||
, "로그인을 하셔야 이용 가능합니다."
|
||||
, LocalDateTime.now()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(userId)) { //KISA 보안취약점 조치 (2018-12-10, 이정은)
|
||||
return ResponseEntity.ok(
|
||||
new StatusResponse(HttpStatus.UNAUTHORIZED
|
||||
, "로그인을 하셔야 이용 가능합니다."
|
||||
, LocalDateTime.now()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
||||
/* if (!files.isEmpty()){
|
||||
|
||||
@ -34,7 +34,6 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import itn.com.cmm.util.StringUtil;
|
||||
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoATVO;
|
||||
import itn.let.kakao.user.sent.service.KakaoSentDetailVO;
|
||||
import itn.let.kakao.user.sent.service.KakaoSentService;
|
||||
@ -142,12 +141,6 @@ public class KakaoSentServiceImpl extends EgovAbstractServiceImpl implements Ka
|
||||
|
||||
List<KakaoSentVO> resultList = new ArrayList<KakaoSentVO>();
|
||||
|
||||
|
||||
//수신번호 검색 시 번호 포멧 통일
|
||||
if("4".equals(kakaoSentVO.getSearchCondition()) && StringUtil.isNotEmpty(kakaoSentVO.getSearchKeyword())) {
|
||||
kakaoSentVO.setSearchKeyword(kakaoSentVO.getSearchKeyword().trim().replace("-", ""));
|
||||
}
|
||||
|
||||
resultList = kakaoSentDAO.selectAllKakaoSentList_advc(kakaoSentVO);
|
||||
|
||||
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
@ -660,7 +653,7 @@ public class KakaoSentServiceImpl extends EgovAbstractServiceImpl implements Ka
|
||||
data[i][1] = sdf.format(vo.getReqdate());
|
||||
|
||||
//구분
|
||||
data[i][2] = "A".equals(vo.getSendKind()) ? "API" : "WEB";
|
||||
data[i][2] = "H".equals(vo.getSendKind()) ? "WEB" : "API";
|
||||
|
||||
//채널ID
|
||||
data[i][3] = vo.getYellowId();
|
||||
|
||||
@ -272,25 +272,6 @@ public class KakaoSentController {
|
||||
|
||||
model.addAttribute("kakaoTemplateInfo", kakaoTemplateInfo);
|
||||
|
||||
if(StringUtils.isNotEmpty( mjonKakaoATResultVO.getFilePath1() )) {
|
||||
List<FileInfoVO> fileInfos = new ArrayList<>();
|
||||
|
||||
|
||||
// 확장자 제외한 파일명
|
||||
String fileId = FilenameUtils.getBaseName(mjonKakaoATResultVO.getFilePath1());
|
||||
|
||||
// 파일 정보 조회
|
||||
MjonMsgSentVO info = mjonMsgSentDAO.selectFileInfo(fileId);
|
||||
|
||||
// FileInfo 객체 생성 및 추가
|
||||
FileInfoVO fileInfo = new FileInfoVO();
|
||||
fileInfo.setAtchFileId(info.getAtchFileId());
|
||||
fileInfo.setFileSn(info.getFileSn());
|
||||
|
||||
fileInfos.add(fileInfo);
|
||||
model.addAttribute("fileInfos", fileInfos);
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
model.addAttribute("kakaoTemplateInfo", "");
|
||||
@ -1128,6 +1109,6 @@ public class KakaoSentController {
|
||||
e.printStackTrace();
|
||||
// TODO: handle exception
|
||||
}
|
||||
return "web/kakao/sent/KakaoSentDetailPhoneAjax";
|
||||
return "web/kakao/sent/KakaoSentDetailPopAjax";
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,29 +188,6 @@ public class KakaoStepInfoController {
|
||||
return "/web/kakao/intrd/KakaoAllimtalkIntro";
|
||||
}
|
||||
|
||||
/**
|
||||
* @Method Name : kakaotalkIntrdView
|
||||
* @Project : mjon
|
||||
* @Date : 2025. 8. 21
|
||||
* @작성자 : 원영현
|
||||
|
||||
* @프로그램 설명 :카카오 알림톡, 친구토 통합 소개페이지
|
||||
*/
|
||||
@RequestMapping(value= {"/web/mjon/kakao/alimtalk/kakaotalkIntrdView.do"})
|
||||
public String kakaotalkIntrdView(HttpServletRequest request,
|
||||
@ModelAttribute("searchVO") BoardMasterVO boardMasterVO, ModelMap model , BoardVO boardVO ,
|
||||
RedirectAttributes redirectAttributes) throws Exception {
|
||||
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
if(userId == "") {
|
||||
return "redirect:/web/user/login/login.do";
|
||||
}
|
||||
model.addAttribute("loginVO", loginVO);
|
||||
|
||||
return "/web/kakao/intrd/KakaotalkIntro";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* XSS 방지 처리.
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package itn.let.mail.service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
@ -60,8 +58,6 @@ public class StatusResponse {
|
||||
|
||||
private Object object;
|
||||
|
||||
private Object apiReturn;
|
||||
|
||||
private String messageTemp;
|
||||
|
||||
private LocalDateTime timestamp;
|
||||
@ -96,47 +92,13 @@ public class StatusResponse {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
public StatusResponse(HttpStatus status, String message, Object object) {
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
this.object = object;
|
||||
}
|
||||
public StatusResponse(HttpStatus status, String message
|
||||
, Object object
|
||||
, Object apiReturn
|
||||
) {
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
this.object = object;
|
||||
this.apiReturn = apiReturn;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @methodName : statusResponseSet
|
||||
* @author : 이호영
|
||||
* @date : 2025. 6. 24.
|
||||
* @description :
|
||||
* @return : StatusResponse
|
||||
* @param statusResponse
|
||||
* @param httpStatus
|
||||
* @param msg
|
||||
* @param statCode - statCode는 API RETURN를 위한 코드
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public static StatusResponse statusResponseSet(StatusResponse statusResponse, HttpStatus httpStatus, String msg, String statCode ) {
|
||||
statusResponse.setStatus(httpStatus);
|
||||
statusResponse.setMessage(msg);
|
||||
|
||||
Map<String, Object> apiReturnMap = new HashMap<>();
|
||||
apiReturnMap.put("statCode", statCode);
|
||||
apiReturnMap.put("result", httpStatus.toString());
|
||||
statusResponse.setApiReturn(apiReturnMap);
|
||||
|
||||
return statusResponse;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ public class AddrGroupController {
|
||||
private EgovMberManageService mberManageService;
|
||||
|
||||
@Resource(name = "KmcCertChecker")
|
||||
private KmcCertChecker kmcCertChecker;
|
||||
private KmcCertChecker kmcCertCheck;
|
||||
|
||||
/**
|
||||
* 주소록 그룹 리스트
|
||||
@ -954,7 +954,7 @@ public class AddrGroupController {
|
||||
mberCertPhoneVO.setTrUrl("/web/cop/kmc/authRequestAddrSubmitAjax.do");
|
||||
mberCertPhoneVO.setPlusInfo(mberManageVO.getMberId());
|
||||
|
||||
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request);
|
||||
AuthCertVO certVO = kmcCertCheck.authCertCheck(mberCertPhoneVO, request);
|
||||
|
||||
modelAndView.addObject("tr_cert", certVO.getTr_cert());
|
||||
modelAndView.addObject("tr_url", certVO.getTr_url());
|
||||
@ -979,16 +979,241 @@ public class AddrGroupController {
|
||||
*/
|
||||
|
||||
@RequestMapping("/web/cop/kmc/authRequestAddrSubmitAjax.do")
|
||||
public String authRequestFindIdPwAjax(
|
||||
HttpServletRequest request
|
||||
, HttpServletResponse response
|
||||
, ModelMap model
|
||||
, @RequestParam Map<String, Object> commandMap
|
||||
, @ModelAttribute("searchVO") KmcVO kmcVO
|
||||
, RedirectAttributes redirectAttributes
|
||||
) throws Exception {
|
||||
public String authRequestFindIdPwAjax(HttpServletRequest request, ModelMap model,
|
||||
@RequestParam Map<String, Object> commandMap, @ModelAttribute("searchVO") KmcVO kmcVO,
|
||||
RedirectAttributes redirectAttributes) throws Exception {
|
||||
|
||||
kmcVO = kmcCertChecker.authCertResult(request, response, model);
|
||||
String errMessage = ""; // 에러메세지
|
||||
|
||||
String rec_cert = ""; // 결과값(암호화)
|
||||
String certNum = ""; // certNum
|
||||
|
||||
rec_cert = request.getParameter("rec_cert").trim();
|
||||
certNum = request.getParameter("certNum").trim();
|
||||
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
kmcVO.setCertNum(certNum);
|
||||
// 파라미터 유효성 검증
|
||||
if (rec_cert.length() == 0 || certNum.length() == 0) {
|
||||
errMessage = "비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
// 변수선언
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
String k_certNum = ""; // 파라미터로 수신한 요청번호
|
||||
k_certNum = certNum;
|
||||
String date = ""; // 요청일시
|
||||
String CI = ""; // 연계정보(CI)
|
||||
String DI = ""; // 중복가입확인정보(DI)
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사
|
||||
String birthDay = ""; // 생년월일
|
||||
String gender = ""; // 성별
|
||||
String nation = ""; // 내국인
|
||||
String name = ""; // 성명
|
||||
String M_name = ""; // 미성년자 성명
|
||||
String M_birthDay = ""; // 미성년자 생년월일
|
||||
String M_Gender = ""; // 미성년자 성별
|
||||
String M_nation = ""; // 미성년자 내외국인
|
||||
String result = ""; // 결과값
|
||||
|
||||
String certMet = ""; // 인증방법
|
||||
String ip = ""; // ip주소
|
||||
String plusInfo = "";
|
||||
|
||||
String encPara = "";
|
||||
String encMsg1 = "";
|
||||
String encMsg2 = "";
|
||||
String msgChk = "";
|
||||
|
||||
com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager();
|
||||
|
||||
// 02. 1차 복호화
|
||||
// 수신된 certNum를 이용하여 복호화
|
||||
rec_cert = seed.getDec(rec_cert, k_certNum);
|
||||
|
||||
// 03. 1차 파싱
|
||||
int inf1 = rec_cert.indexOf("/", 0);
|
||||
int inf2 = rec_cert.indexOf("/", inf1 + 1);
|
||||
|
||||
encPara = rec_cert.substring(0, inf1); // 암호화된 통합 파라미터
|
||||
encMsg1 = rec_cert.substring(inf1 + 1, inf2); // 암호화된 통합 파라미터의 Hash값
|
||||
|
||||
// 04. 위변조 검증
|
||||
encMsg2 = seed.getMsg(encPara);
|
||||
kmcVO.setEncMsg2(encMsg2);
|
||||
if (encMsg2.equals(encMsg1)) {
|
||||
msgChk = "Y";
|
||||
}
|
||||
|
||||
if (!"Y".equals(msgChk)) {
|
||||
errMessage = "비정상접근입니다.";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
// 05. 2차 복호화
|
||||
rec_cert = seed.getDec(encPara, k_certNum);
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
// 06. 2차 파싱
|
||||
int info1 = rec_cert.indexOf("/", 0);
|
||||
int info2 = rec_cert.indexOf("/", info1 + 1);
|
||||
int info3 = rec_cert.indexOf("/", info2 + 1);
|
||||
int info4 = rec_cert.indexOf("/", info3 + 1);
|
||||
int info5 = rec_cert.indexOf("/", info4 + 1);
|
||||
int info6 = rec_cert.indexOf("/", info5 + 1);
|
||||
int info7 = rec_cert.indexOf("/", info6 + 1);
|
||||
int info8 = rec_cert.indexOf("/", info7 + 1);
|
||||
int info9 = rec_cert.indexOf("/", info8 + 1);
|
||||
int info10 = rec_cert.indexOf("/", info9 + 1);
|
||||
int info11 = rec_cert.indexOf("/", info10 + 1);
|
||||
int info12 = rec_cert.indexOf("/", info11 + 1);
|
||||
int info13 = rec_cert.indexOf("/", info12 + 1);
|
||||
int info14 = rec_cert.indexOf("/", info13 + 1);
|
||||
int info15 = rec_cert.indexOf("/", info14 + 1);
|
||||
int info16 = rec_cert.indexOf("/", info15 + 1);
|
||||
int info17 = rec_cert.indexOf("/", info16 + 1);
|
||||
int info18 = rec_cert.indexOf("/", info17 + 1);
|
||||
|
||||
certNum = rec_cert.substring(0, info1);
|
||||
kmcVO.setCertNum(certNum);
|
||||
date = rec_cert.substring(info1 + 1, info2);
|
||||
kmcVO.setDate(date);
|
||||
CI = rec_cert.substring(info2 + 1, info3);
|
||||
kmcVO.setCI(CI);
|
||||
phoneNo = rec_cert.substring(info3 + 1, info4);
|
||||
kmcVO.setPhoneNo(phoneNo);
|
||||
phoneCorp = rec_cert.substring(info4 + 1, info5);
|
||||
kmcVO.setPhoneCorp(phoneCorp);
|
||||
birthDay = rec_cert.substring(info5 + 1, info6);
|
||||
kmcVO.setBirthDay(birthDay);
|
||||
gender = rec_cert.substring(info6 + 1, info7);
|
||||
kmcVO.setGender(gender);
|
||||
nation = rec_cert.substring(info7 + 1, info8);
|
||||
kmcVO.setNation(nation);
|
||||
name = rec_cert.substring(info8 + 1, info9);
|
||||
kmcVO.setName(name);
|
||||
result = rec_cert.substring(info9 + 1, info10);
|
||||
kmcVO.setResult(result);
|
||||
certMet = rec_cert.substring(info10 + 1, info11);
|
||||
kmcVO.setCertMet(certMet);
|
||||
ip = rec_cert.substring(info11 + 1, info12);
|
||||
kmcVO.setIp(ip);
|
||||
M_name = rec_cert.substring(info12 + 1, info13);
|
||||
kmcVO.setMName(M_name);
|
||||
M_birthDay = rec_cert.substring(info13 + 1, info14);
|
||||
kmcVO.setMBirthDay(M_birthDay);
|
||||
M_Gender = rec_cert.substring(info14 + 1, info15);
|
||||
kmcVO.setMGender(M_Gender);
|
||||
M_nation = rec_cert.substring(info15 + 1, info16);
|
||||
kmcVO.setMNation(M_nation);
|
||||
plusInfo = rec_cert.substring(info16 + 1, info17);
|
||||
kmcVO.setPlusInfo(plusInfo);
|
||||
DI = rec_cert.substring(info17 + 1, info18);
|
||||
kmcVO.setDI(DI);
|
||||
|
||||
// 07. CI, DI 복호화
|
||||
CI = seed.getDec(CI, k_certNum);
|
||||
kmcVO.setCI(CI);
|
||||
DI = seed.getDec(DI, k_certNum);
|
||||
kmcVO.setDI(DI);
|
||||
|
||||
if ("Y".equals(result)) {
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------
|
||||
String regex = "";
|
||||
if (certNum.length() == 0 || certNum.length() > 40) {
|
||||
errMessage = "요청번호 비정상.";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (date.length() != 14 || !paramChk(regex, date)) {
|
||||
errMessage = "요청일시";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (certMet.length() != 1 || !paramChk(regex, certMet)) {
|
||||
errMessage = "본인인증방법 비정상" + certMet;
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if ((phoneNo.length() != 10 && phoneNo.length() != 11) || !paramChk(regex, phoneNo)) {
|
||||
errMessage = "휴대폰번호 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (phoneCorp.length() != 3 || !paramChk(regex, phoneCorp)) {
|
||||
errMessage = "이동통신사 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (birthDay.length() != 8 || !paramChk(regex, birthDay)) {
|
||||
errMessage = "생년월일 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (gender.length() != 1 || !paramChk(regex, gender)) {
|
||||
errMessage = "성별 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (nation.length() != 1 || !paramChk(regex, nation)) {
|
||||
errMessage = "내/외국인 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-<2D>R.,-]*";
|
||||
if (name.length() > 60 || !paramChk(regex, name)) {
|
||||
errMessage = "성명 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (result.length() != 1 || !paramChk(regex, result)) {
|
||||
errMessage = "결과값 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-?.,-]*";
|
||||
if (M_name.length() != 0) {
|
||||
if (M_name.length() > 60 || !paramChk(regex, M_name)) {
|
||||
errMessage = "미성년자 성명 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_birthDay.length() != 0) {
|
||||
if (M_birthDay.length() != 8 || !paramChk(regex, M_birthDay)) {
|
||||
errMessage = "미성년자 생년월일 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_Gender.length() != 0) {
|
||||
if (M_Gender.length() != 1 || !paramChk(regex, M_Gender)) {
|
||||
errMessage = "미성년자 성별 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_nation.length() != 0) {
|
||||
if (M_nation.length() != 1 || !paramChk(regex, M_nation)) {
|
||||
errMessage = "미성년자 내/외국인 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
|
||||
// KMC 본인인증 로그
|
||||
AuthCertVO certVO = new AuthCertVO();
|
||||
|
||||
@ -28,7 +28,5 @@ public interface ApiCallInfoMngService {
|
||||
|
||||
//api key & api info 모두 실제 삭제
|
||||
void deleteApiKeyInfoReal(ApiKeyVO apiKeyVO) throws Exception;
|
||||
|
||||
void udpateApiKeyInfoReal(ApiKeyVO apiKeyVO) throws Exception;
|
||||
|
||||
}
|
||||
@ -43,8 +43,4 @@ public class ApiCallInfoMngDAO extends EgovComAbstractDAO{
|
||||
public void deleteApiCallInfoAll(ApiKeyVO apiKeyVO) throws Exception{
|
||||
update("ApiCallInfoMngDAO.deleteApiCallInfoAll", apiKeyVO);
|
||||
}
|
||||
|
||||
public void updateApiCallInfoAll(ApiKeyVO apiKeyVO) throws Exception{
|
||||
update("ApiCallInfoMngDAO.updateApiCallInfoAll", apiKeyVO);
|
||||
}
|
||||
}
|
||||
@ -65,15 +65,5 @@ public class ApiCallInfoMngServiceImpl extends EgovAbstractServiceImpl implement
|
||||
apiKeyMngDAO.deleteApiKeyReal(apiKeyVO);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void udpateApiKeyInfoReal(ApiKeyVO apiKeyVO) throws Exception {
|
||||
apiKeyVO.setUseYn("N");
|
||||
apiCallInfoMngDAO.updateApiCallInfoAll(apiKeyVO);
|
||||
|
||||
//api key 삭제
|
||||
apiKeyMngDAO.deleteApiKey(apiKeyVO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -48,6 +48,10 @@ public class ApiKeyMngDAO extends EgovComAbstractDAO{
|
||||
return update("ApiKeyMngDAO.insertApiKey", apiKeyVO);
|
||||
}
|
||||
|
||||
public void deleteApiKeyReal(ApiKeyVO apiKeyVO) throws Exception{
|
||||
update("ApiKeyMngDAO.deleteApiKeyReal", apiKeyVO);
|
||||
}
|
||||
|
||||
public List<ApiKeyVO> selectApiKeyApplyStatus(ApiKeyVO apiKeyVO){
|
||||
return (List<ApiKeyVO>) list("ApiKeyMngDAO.selectApiKeyApplyStatus", apiKeyVO);
|
||||
}
|
||||
@ -56,8 +60,4 @@ public class ApiKeyMngDAO extends EgovComAbstractDAO{
|
||||
return (int) select("ApiKeyMngDAO.selectMberApiKeyChk", apiKeyVO);
|
||||
}
|
||||
|
||||
public void deleteApiKeyReal(ApiKeyVO apiKeyVO) throws Exception{
|
||||
update("ApiKeyMngDAO.deleteApiKeyReal", apiKeyVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -471,10 +471,8 @@ public class ApiKeyMngController {
|
||||
ApiKeyVO apiKeyVO = new ApiKeyVO();
|
||||
apiKeyVO.setMberId(userId);
|
||||
apiKeyVO.setAccessNo(p_accessNo);
|
||||
|
||||
// 2025.06.02 update로 수정
|
||||
// apiCallInfoMngService.deleteApiKeyInfoReal(apiKeyVO);
|
||||
apiCallInfoMngService.udpateApiKeyInfoReal(apiKeyVO);
|
||||
|
||||
apiCallInfoMngService.deleteApiKeyInfoReal(apiKeyVO);
|
||||
|
||||
modelAndView.addObject("message", "삭제 완료되었습니다.");
|
||||
modelAndView.addObject("result", "success");
|
||||
|
||||
@ -38,5 +38,5 @@ public class MjonEventVO {
|
||||
private String point; //사용자 포인트 정보
|
||||
private String userId; //사용자 아이디
|
||||
private String frstRegisterId; //등록자 아이디
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -3,8 +3,6 @@ package itn.let.mjo.mjocommon;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -18,8 +16,10 @@ import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.mysql.jdbc.StringUtils;
|
||||
|
||||
import egovframework.com.idgen.CustomIdGnrService;
|
||||
import egovframework.rte.fdl.cmmn.exception.FdlException;
|
||||
@ -27,22 +27,17 @@ import itn.com.cmm.MjonMsgSendVO;
|
||||
import itn.com.cmm.OptimalMsgResultDTO;
|
||||
import itn.com.cmm.util.MsgSendUtils;
|
||||
import itn.com.cmm.util.SlackMessageFormatUtil;
|
||||
import itn.com.cmm.util.StringUtil;
|
||||
import itn.let.kakao.kakaoComm.KakaoSendAdvcVO;
|
||||
import itn.let.kakao.kakaoComm.KakaoVO;
|
||||
import itn.let.mail.service.StatusResponse;
|
||||
import itn.let.mjo.event.service.MjonEventService;
|
||||
import itn.let.mjo.event.service.MjonEventVO;
|
||||
import itn.let.mjo.msg.service.MjonMsgVO;
|
||||
import itn.let.mjo.msg.service.impl.MjonMsgDAO;
|
||||
import itn.let.mjo.msgdata.service.MjonMsgDataService;
|
||||
import itn.let.mjo.msgdata.service.MjonMsgReturnVO;
|
||||
import itn.let.mjo.msgholiday.service.MsgAlarmSetVO;
|
||||
import itn.let.mjo.msgholiday.service.MsgHolidayService;
|
||||
import itn.let.mjo.msgholiday.service.MsgHolidayVO;
|
||||
import itn.let.sym.site.service.EgovSiteManagerService;
|
||||
import itn.let.sym.site.service.JoinSettingVO;
|
||||
import itn.let.uat.uia.web.SendLogVO;
|
||||
import itn.let.uss.umt.service.EgovUserManageService;
|
||||
import itn.let.uss.umt.service.UserManageVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -75,12 +70,6 @@ public class MjonCommon {
|
||||
|
||||
@Resource(name = "egovMjonMsgIdCGnrService")
|
||||
private CustomIdGnrService idgenMsgCId;
|
||||
|
||||
@Resource(name = "mjonMsgDAO")
|
||||
private MjonMsgDAO mjonMsgDAO;
|
||||
|
||||
@Resource(name = "MjonMsgDataService")
|
||||
private MjonMsgDataService mjonMsgDataService;
|
||||
|
||||
|
||||
|
||||
@ -795,120 +784,8 @@ private int parseIntOrDefault(String value, int defaultValue) {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void sendMessagesIfOverFifty(int cnt, String callTo) throws Exception {
|
||||
if(
|
||||
cnt >= 50 //50건 이상일 경우만 발송
|
||||
&& StringUtil.isNotEmpty(callTo) // null, "" 체크
|
||||
&& callTo.startsWith("010") // 010으로 시작하는 휴대폰번호일 경우
|
||||
&& "Y".equals(selectSmsNotiIfOverFiftySetting()) // 안내문자 발송 on 인경우만
|
||||
&& !sysMsgTodaySendYn(callTo) // 금일 1회 이상 보낸 이력없을 경우만 발송
|
||||
) {
|
||||
|
||||
//50건이상 발송 안내문자 구분값 = 01
|
||||
String sendMsgType = "01";
|
||||
String today = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
String contents = "[인터넷 대량문자발송안내] 문자온에서 "+ callTo + " 번호로 " + today + "에 인터넷 대량 문자(50통 이상)가 발송되었습니다."
|
||||
+ "\n※ 번호도용이 의심되는 경우, 이용 중인 이동통신사의 휴대전화 번호도용 문자차단 부가서비스(무료)에 가입하여 피해를 예방할 수 있습니다.";
|
||||
this.sendSysMsg(
|
||||
"15518011"
|
||||
, callTo
|
||||
, contents
|
||||
, sendMsgType
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method Name : sendSysMsg
|
||||
* Description : 관리자 안내 문자 공통
|
||||
*
|
||||
* @param callFrom : 발신번호
|
||||
* @param callTo : 수신번호
|
||||
* @param contents : 내용
|
||||
* @param sendMsgType : 발신내용 타입 - 01: 대량문자발송안내
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @return MjonMsgReturnVO 설명
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public MjonMsgReturnVO sendSysMsg(
|
||||
String callFrom
|
||||
, String callTo
|
||||
, String contents
|
||||
, String sendMsgType
|
||||
) throws Exception {
|
||||
|
||||
//결과 vo
|
||||
MjonMsgReturnVO returnVO = new MjonMsgReturnVO();
|
||||
|
||||
MjonMsgVO mjonMsgVO = new MjonMsgVO();
|
||||
mjonMsgVO.setSmsTxt(contents);
|
||||
mjonMsgVO.setReserveYn("N");
|
||||
// 시스템 문자발송 번호
|
||||
// mjonMsgVO.setCallFrom("15518011");
|
||||
mjonMsgVO.setCallFrom(callFrom);
|
||||
mjonMsgVO.setCallTo(callTo);
|
||||
|
||||
mjonMsgVO.setUserId("system");
|
||||
|
||||
/*
|
||||
* 본문길이에 따른 단문/장문 구분
|
||||
* 단문 4
|
||||
* 장문 6
|
||||
* 2000자 이상 invalid
|
||||
*/
|
||||
String msgType = MsgSendUtils.getMsgTypeWithByteValidation(new MjonMsgSendVO(), contents);//
|
||||
mjonMsgVO.setMsgType(msgType);
|
||||
|
||||
// MsgDiv - S: 단문, L: 장문, P: 그림
|
||||
if("4".equalsIgnoreCase(msgType)) {
|
||||
mjonMsgVO.setMsgDiv("S");
|
||||
}else if("6".equalsIgnoreCase(msgType)) {
|
||||
mjonMsgVO.setMsgDiv("L");
|
||||
}
|
||||
else { // invalid
|
||||
returnVO.setMsgGroupId("");
|
||||
returnVO.setSendMsgCnt("0"); // 발송 건수 저장
|
||||
returnVO.setSendMsgBlockCnt("0"); // 수신차단 건수 저장
|
||||
return returnVO;
|
||||
}
|
||||
|
||||
// 문자타입별 대표전송사 정보
|
||||
MjonMsgVO mjonMsgVO2 = new MjonMsgVO();
|
||||
mjonMsgVO2 = mjonMsgDAO.selectRepMsgAgetnInfo(mjonMsgVO);
|
||||
// 전송사 구분 코드 - 01 : 아이하트, 02 : 현대 퓨쳐넷, 03 : 아이엠오, 04 : 다우기술
|
||||
mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택
|
||||
// 전송금액
|
||||
mjonMsgVO.setTotPrice(mjonMsgVO2.getAgentPrice().toString()); //총금액
|
||||
mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액
|
||||
|
||||
returnVO = mjonMsgDataService.insertSysMsgDataInfo(mjonMsgVO);
|
||||
|
||||
// 시스템 발송 로그
|
||||
SendLogVO sendLogVO = new SendLogVO();
|
||||
// SendType 1:문자로 발송 2:이메일로 발송
|
||||
sendLogVO.setSendId(returnVO.getMsgGroupId());
|
||||
sendLogVO.setSendType("1");
|
||||
sendLogVO.setFrstSendInfo(mjonMsgVO.getCallFrom());
|
||||
sendLogVO.setReceive(mjonMsgVO.getCallTo());
|
||||
sendLogVO.setContents(contents);
|
||||
sendLogVO.setSendMsgType(sendMsgType);
|
||||
|
||||
mjonMsgDataService.insertSysMsgLog(sendLogVO);
|
||||
|
||||
return returnVO;
|
||||
}
|
||||
|
||||
private Boolean sysMsgTodaySendYn(String callTo) throws Exception {
|
||||
SendLogVO sendLogVO = new SendLogVO();
|
||||
sendLogVO.setReceive(callTo);
|
||||
|
||||
return mjonMsgDataService.selectSysMsgTodaySendYn(sendLogVO);
|
||||
}
|
||||
|
||||
private String selectSmsNotiIfOverFiftySetting() throws Exception {
|
||||
JoinSettingVO joinSettingVO = egovSiteManagerService.selectAdminNotiDetail();
|
||||
return joinSettingVO.getSmsNotiIfOverFifty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Getter
|
||||
@ -20,7 +19,6 @@ import lombok.ToString;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
public class MjonMsgVO extends ComDefaultVO{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -95,7 +93,6 @@ public class MjonMsgVO extends ComDefaultVO{
|
||||
private String reserveYn ; //예약문자 여부
|
||||
private String reserveCYn ; //예약문자 취소 여부
|
||||
private String cancelDate; //예약 취소 일자
|
||||
private String msgResult; //문자 발송결과 10:성공 20:실패 30:대체문자 대기 40:대체문자 성공 50:대체문자 실패
|
||||
|
||||
|
||||
private String sendRate; // 전송 배분률
|
||||
@ -319,8 +316,5 @@ public class MjonMsgVO extends ComDefaultVO{
|
||||
private String detailType;
|
||||
|
||||
private List<MjonMsgSendVO> mjonMsgSendVOList = new ArrayList<>();
|
||||
|
||||
private String cmId; //다우기술 cmId
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -211,9 +211,9 @@ public class MjonMsgCampainDataController {
|
||||
|
||||
// 외부에서 선거발송 페이지로 들어오는걸 막음
|
||||
// 20250102 이호영
|
||||
/*if (!"localhost".equals(hostName) && !"119.193.215.98".equals(hostName)) {
|
||||
if (!"localhost".equals(hostName) && !"119.193.215.98".equals(hostName)) {
|
||||
return "redirect:/web/mjon/msgdata/selectMsgDataView.do";
|
||||
}*/
|
||||
}
|
||||
|
||||
String categoryType = cateCode.getCateType();
|
||||
|
||||
|
||||
@ -200,17 +200,9 @@ public class MjonMsgCampainTWDataController {
|
||||
|
||||
// 외부에서 선거발송 페이지로 들어오는걸 막음
|
||||
// 20250102 이호영
|
||||
System.out.println("hostName :: "+ hostName);
|
||||
System.out.println("hostName :: "+ hostName);
|
||||
System.out.println("hostName :: "+ hostName);
|
||||
System.out.println("hhhhhhhh hostName :: "+ hostName);
|
||||
System.out.println("hostName :: "+ hostName);
|
||||
System.out.println("hostName :: "+ hostName);
|
||||
// if (!"localhost".equals(hostName)
|
||||
// && !"119.193.215.98".equals(hostName))
|
||||
// {
|
||||
// return "redirect:/web/mjon/msgdata/selectMsgDataView.do";
|
||||
// }
|
||||
if (!"localhost".equals(hostName)) {
|
||||
return "redirect:/web/mjon/msgdata/selectMsgDataView.do";
|
||||
}
|
||||
|
||||
String categoryType = cateCode.getCateType();
|
||||
|
||||
|
||||
@ -190,7 +190,7 @@ public interface MjonMsgDataService {
|
||||
|
||||
public MjonMsgReturnVO sendSysMsgData(MjonMsgVO mjonMsgVO, HttpServletRequest request) throws Exception;
|
||||
|
||||
public Boolean selectSysMsgTodaySendYn(SendLogVO sendLogVO) throws Exception;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -403,10 +403,6 @@ public class MjonMsgDataDAO extends EgovAbstractDAO {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Boolean selectSysMsgTodaySendYn(SendLogVO sendLogVO) throws Exception{
|
||||
return (Boolean) select("mjonMsgDataDAO.selectSysMsgTodaySendYn",sendLogVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 다량 데이터를 Batch 처리로 MJ_MSG_DATA 테이블에 INSERT
|
||||
@ -467,23 +463,6 @@ public class MjonMsgDataDAO extends EgovAbstractDAO {
|
||||
}
|
||||
|
||||
|
||||
//대체문자 대기 목록 조회
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<MjonMsgVO> selectBizResendLogList()throws Exception{
|
||||
|
||||
return (List<MjonMsgVO>) list("mjonMsgDataDAO.selectBizResendLogList");
|
||||
}
|
||||
//대체문자 결과 반영
|
||||
public int updateResendResult(MjonMsgVO mjonMsgVO)throws Exception{
|
||||
|
||||
return update("mjonMsgDataDAO.updateResendResult", mjonMsgVO);
|
||||
}
|
||||
//대체문자 로그 삭제
|
||||
public int deleteBizResendLog(MjonMsgVO mjonMsgVO)throws Exception{
|
||||
|
||||
return delete("mjonMsgDataDAO.deleteBizResendLog", mjonMsgVO);
|
||||
}
|
||||
|
||||
|
||||
public Timestamp convertToTimestamp(String reqDate) {
|
||||
try {
|
||||
|
||||
@ -3946,39 +3946,26 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
@Override
|
||||
public StatusResponse sendMsgData_advc(MjonMsgVO mjonMsgVO, HttpServletRequest request) throws Exception {
|
||||
|
||||
// log.info("mjonMsgVO [{}]", mjonMsgVO.getMjonMsgSendVOList().get(0).getPhone());
|
||||
log.info("mjonMsgVO [{}]", mjonMsgVO.getMjonMsgSendVOList().get(0).getPhone());
|
||||
log.info(" :: sendMsgData_advc :: ");
|
||||
log.info(" + mjonMsgVO.toString() :: [{}]", mjonMsgVO.toString());
|
||||
|
||||
StatusResponse statusResponse = new StatusResponse();
|
||||
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
Map<String, Object> apiReturnMap = new HashMap<>();
|
||||
|
||||
String userId = "";
|
||||
if("A".equals(mjonMsgVO.getSendKind()))
|
||||
{
|
||||
userId = mjonMsgVO.getMberId();
|
||||
}else {
|
||||
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()
|
||||
? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
|
||||
: null;
|
||||
userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if (userId.equals("")) {
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
||||
}
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()
|
||||
? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
|
||||
: null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if (userId.equals("")) {
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용이 가능합니다.");
|
||||
}
|
||||
|
||||
mjonMsgVO.setUserId(userId);
|
||||
|
||||
mjonMsgVO.setUserId(userId);
|
||||
|
||||
// 발신번호가 등록된 유효한 번호인지 확인
|
||||
int sendCallFromCnt = mjonMsgDAO.selectCallFromNumberChk(mjonMsgVO);
|
||||
if (sendCallFromCnt < 1) {
|
||||
// return new StatusResponse(HttpStatus.BAD_REQUEST, "등록된 발신번호를 찾을 수 없습니다.");
|
||||
return StatusResponse.statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "등록된 발신번호를 찾을 수 없습니다.", "STAT_1010");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "등록된 발신번호를 찾을 수 없습니다.");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3988,10 +3975,8 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
if (!mberSttus) {
|
||||
request.getSession().invalidate();
|
||||
// UNAUTHORIZED : 인증되지 않은 사용자가 접근하려고 할 때
|
||||
// return new StatusResponse(HttpStatus.UNAUTHORIZED,
|
||||
// "현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 문자를 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.");
|
||||
return StatusResponse.statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 문자를 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다."
|
||||
, "STAT_1070");
|
||||
return new StatusResponse(HttpStatus.UNAUTHORIZED,
|
||||
"현재 고객님께서는 문자온 서비스 이용이 정지된 상태로 문자를 발송하실 수 없습니다. 이용정지 해제를 원하시면 고객센터로 연락주시기 바랍니다.");
|
||||
}
|
||||
|
||||
String smsTxt = mjonMsgVO.getSmsTxtArea();
|
||||
@ -4005,9 +3990,9 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
|
||||
log.debug(" :: smsTxt :: [{}]", smsTxt);
|
||||
|
||||
StatusResponse statusResponse = new StatusResponse();
|
||||
|
||||
// 화면에서 저장한 이미지 가져오기
|
||||
// API는 이미지가 없어서 해당 없음
|
||||
mjonMsgVO = setImagesSetting(mjonMsgVO, statusResponse);
|
||||
|
||||
if (mjonMsgVO == null) {
|
||||
@ -4029,10 +4014,9 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
int deletedCount = initialSize - finalSize;
|
||||
// 수신거부 목록
|
||||
returnMap.put("resultBlockSts", deletedCount);
|
||||
apiReturnMap.put("resultBlockSts", deletedCount);
|
||||
|
||||
if (mjonMsgSendVOList.size() < 1) {
|
||||
return StatusResponse.statusResponseSet(statusResponse, HttpStatus.BAD_REQUEST, "수신거부와 매칭되는 번호 제거 후 \n발송 가능한 수신목록이 존재하지 않습니다.", "STAT_1021");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "수신거부와 매칭되는 번호 제거 후 \n발송 가능한 수신목록이 존재하지 않습니다.");
|
||||
}
|
||||
|
||||
// 전용 전송사 코드 및 대표 전송사 조회
|
||||
@ -4139,7 +4123,7 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
* */
|
||||
if (!isCashSufficient(mjonMsgVO, mjonMsgSendVOList)) {
|
||||
log.error("Insufficient balance for message sending.");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다.", "STAT_1060");
|
||||
return new StatusResponse(HttpStatus.BAD_REQUEST, "문자 발송에 필요한 보유 잔액이 부족 합니다.");
|
||||
}
|
||||
|
||||
System.out.println("==================== insert 시작 ====================");
|
||||
@ -4154,24 +4138,13 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
// instTotalCnt : 화면에서 보여줄 총 발송건수
|
||||
int instTotalCnt = 0;
|
||||
// Step 2: 그룹화 된 데이터를 그룹별로 insert 처리
|
||||
String apiMsgGroupId = "";
|
||||
String apiMsgType = "";
|
||||
for (Map.Entry<String, List<MjonMsgSendVO>> entry : priceGroupedMessages.entrySet()) {
|
||||
List<MjonMsgSendVO> groupedMsgList = entry.getValue(); // 해당 가격의 메시지 리스트
|
||||
|
||||
// msgGroupId 생성
|
||||
String nextMsgGroupId = idgenMjonMsgGroupId.getNextStringId();
|
||||
groupedMsgList.forEach(t -> t.setMsgGroupId(nextMsgGroupId));
|
||||
|
||||
// api 전달 값
|
||||
apiMsgGroupId = StringUtils.isNotEmpty(apiMsgGroupId)
|
||||
? apiMsgGroupId + "," + nextMsgGroupId
|
||||
: nextMsgGroupId;
|
||||
|
||||
apiMsgType = StringUtils.isNotEmpty(apiMsgType)
|
||||
? apiMsgType + "," + mjonMsgSendVOList.get(0).getMsgType()
|
||||
: mjonMsgSendVOList.get(0).getMsgType();
|
||||
|
||||
|
||||
// 발송 데이터 삽입
|
||||
int instCnt = this.insertMsgData_advc(groupedMsgList);
|
||||
|
||||
@ -4202,38 +4175,17 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
// returnMap.put("resultSts", instCnt);
|
||||
|
||||
log.debug("가격 [{}]의 총 갯수: [{}]", entry.getKey(), groupedMsgList.size());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 그룹 ID
|
||||
apiReturnMap.put("msgGroupId", apiMsgGroupId);
|
||||
// 메세지 타입
|
||||
apiReturnMap.put("msgType", apiMsgType);
|
||||
// 총 발송 건수
|
||||
returnMap.put("resultSts", instTotalCnt);
|
||||
apiReturnMap.put("resultSts", instTotalCnt);
|
||||
|
||||
|
||||
// db insert 성능 개선중 하나에 방법
|
||||
// 분할 최대건수가 되면 디비에 입력하기
|
||||
// 여러시도 했지만 일단 보류
|
||||
// 무시해도 됨
|
||||
// int instCnt = mjonMsgDataDAO.insertMsgDataInfo_advc(mjonMsgSendVOList);
|
||||
// int instCnt = mjonMsgDataDAO.insertMsgDataInfo_jdbc_advc(mjonMsgSendVOList);
|
||||
|
||||
|
||||
//50건이상 문자발송 시 안내메시지 전송
|
||||
try {
|
||||
if(
|
||||
"p".equals(userInfo.getDept()) // 개인회원일 경우에만 발송
|
||||
) {
|
||||
mjonCommon.sendMessagesIfOverFifty(instTotalCnt, mjonMsgVO.getCallFrom());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("sendMessagesIfOverFifty method exception.");
|
||||
}
|
||||
// 총 발송 건수
|
||||
returnMap.put("resultSts", instTotalCnt);
|
||||
|
||||
// TEST발송 시 발송 후 캐시가 있어야함.
|
||||
returnMap.put("afterCash", priceAndPoint.getBefCash(userId));
|
||||
@ -4253,10 +4205,6 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
|
||||
statusResponse.setStatus(HttpStatus.OK);
|
||||
statusResponse.setObject(returnMap);
|
||||
|
||||
apiReturnMap.put("result", HttpStatus.OK);
|
||||
apiReturnMap.put("message", "문자 전송이 완료되었습니다.");
|
||||
statusResponse.setApiReturn(apiReturnMap);
|
||||
return statusResponse;
|
||||
|
||||
}
|
||||
@ -4404,9 +4352,7 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
int fileCount = 0;
|
||||
// 장문 메시지일 경우 + 그림 이미지가 첨부된 경우
|
||||
//
|
||||
log.info(" + mjonMsgVO.getMsgType() :: [{}]", mjonMsgVO.getMsgType());
|
||||
log.info(" + mjonMsgVO.getImgFilePathAdvc() :: [{}]", mjonMsgVO.getImgFilePathAdvc());
|
||||
if ("6".equals(mjonMsgVO.getMsgType()) && mjonMsgVO.getImgFilePathAdvc() != null
|
||||
if (mjonMsgVO.getMsgType().equals("6") && mjonMsgVO.getImgFilePathAdvc() != null
|
||||
&& mjonMsgVO.getImgFileIdAdvc() != null) {
|
||||
|
||||
// 그림 이미지가 첨부된 경우
|
||||
@ -5202,9 +5148,4 @@ public class MjonMsgDataServiceImpl extends EgovAbstractServiceImpl implements M
|
||||
return returnVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean selectSysMsgTodaySendYn(SendLogVO sendLogVO) throws Exception{
|
||||
return mjonMsgDataDAO.selectSysMsgTodaySendYn(sendLogVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6543,4 +6543,5 @@ public class MjonMsgDataController {
|
||||
|
||||
return "web/msgdata/MsgSentListAjax";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -34,7 +34,6 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import itn.com.cmm.util.StringUtil;
|
||||
import itn.com.cmm.util.StringUtil2;
|
||||
import itn.let.cmm.vo.FileInfoVO;
|
||||
import itn.let.fax.addr.service.FaxAddrGroupVO;
|
||||
@ -127,11 +126,6 @@ public class MjonMsgSentServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
Map<String, Object> resultMap = new HashMap<String, Object>();
|
||||
|
||||
//수신번호 검색 시 번호 포멧 통일
|
||||
if("4".equals(mjonMsgSentVO.getSearchCondition()) && StringUtil.isNotEmpty(mjonMsgSentVO.getSearchKeyword())) {
|
||||
mjonMsgSentVO.setSearchKeyword(mjonMsgSentVO.getSearchKeyword().trim().replace("-", ""));
|
||||
}
|
||||
|
||||
// 목록
|
||||
List<MjonMsgSentVO> resultList = mjonMsgSentDAO.selectAllMsgSentList_advc(mjonMsgSentVO);
|
||||
|
||||
@ -644,7 +638,7 @@ public class MjonMsgSentServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
// log.info("엑셀에 넣을 데이터: [{}]", data[i][1]);
|
||||
|
||||
data[i][2] = "A".equals(vo.getSendKind()) ? "API" : "WEB";
|
||||
data[i][2] = "H".equals(vo.getSendKind()) ? "WEB" : "API";
|
||||
|
||||
String msgType="단문";
|
||||
if ("6".equals(vo.getMsgType())) {
|
||||
|
||||
@ -18,10 +18,10 @@ public class KmcVO extends ComDefaultVO{
|
||||
private String gender = ""; // 성별
|
||||
private String nation = ""; // 내국인
|
||||
private String name = ""; // 성명
|
||||
// private String MName = ""; // 미성년자 성명
|
||||
// private String MBirthDay = ""; // 미성년자 생년월일
|
||||
// private String MGender = ""; // 미성년자 성별
|
||||
// private String MNation = ""; // 미성년자 내외국인
|
||||
private String MName = ""; // 미성년자 성명
|
||||
private String MBirthDay = ""; // 미성년자 생년월일
|
||||
private String MGender = ""; // 미성년자 성별
|
||||
private String MNation = ""; // 미성년자 내외국인
|
||||
private String result = ""; // 결과값
|
||||
|
||||
private String certMet = ""; // 인증방법
|
||||
@ -41,11 +41,6 @@ public class KmcVO extends ComDefaultVO{
|
||||
private String idx = ""; //본인인증 로그 idx
|
||||
private String dnChk = ""; //본인명의 DN 체크
|
||||
|
||||
private String reserve1 = "";
|
||||
private String reserve2 = "";
|
||||
private String reserve3 = "";
|
||||
private String reserve4 = "";
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
@ -182,6 +177,30 @@ public class KmcVO extends ComDefaultVO{
|
||||
public void setCertNum(String certNum) {
|
||||
this.certNum = certNum;
|
||||
}
|
||||
public String getMName() {
|
||||
return MName;
|
||||
}
|
||||
public void setMName(String mName) {
|
||||
MName = mName;
|
||||
}
|
||||
public String getMBirthDay() {
|
||||
return MBirthDay;
|
||||
}
|
||||
public void setMBirthDay(String mBirthDay) {
|
||||
MBirthDay = mBirthDay;
|
||||
}
|
||||
public String getMGender() {
|
||||
return MGender;
|
||||
}
|
||||
public void setMGender(String mGender) {
|
||||
MGender = mGender;
|
||||
}
|
||||
public String getMNation() {
|
||||
return MNation;
|
||||
}
|
||||
public void setMNation(String mNation) {
|
||||
MNation = mNation;
|
||||
}
|
||||
public String getRecCert() {
|
||||
return recCert;
|
||||
}
|
||||
@ -206,30 +225,7 @@ public class KmcVO extends ComDefaultVO{
|
||||
public void setCertType(String certType) {
|
||||
this.certType = certType;
|
||||
}
|
||||
public String getReserve1() {
|
||||
return reserve1;
|
||||
}
|
||||
public void setReserve1(String reserve1) {
|
||||
this.reserve1 = reserve1;
|
||||
}
|
||||
public String getReserve2() {
|
||||
return reserve2;
|
||||
}
|
||||
public void setReserve2(String reserve2) {
|
||||
this.reserve2 = reserve2;
|
||||
}
|
||||
public String getReserve3() {
|
||||
return reserve3;
|
||||
}
|
||||
public void setReserve3(String reserve3) {
|
||||
this.reserve3 = reserve3;
|
||||
}
|
||||
public String getReserve4() {
|
||||
return reserve4;
|
||||
}
|
||||
public void setReserve4(String reserve4) {
|
||||
this.reserve4 = reserve4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
package itn.let.mjo.pay.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import itn.let.mjo.msg.service.MjonMsgVO;
|
||||
|
||||
public interface MjonPayService {
|
||||
|
||||
List<MjonPayVO> selectPayList(MjonPayVO mjonPayVO) throws Exception;
|
||||
@ -143,11 +140,4 @@ public interface MjonPayService {
|
||||
//누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액)
|
||||
public String selectTotSumPaymentAfterPay(String userId) throws Exception;
|
||||
|
||||
Map<String, Object> payUserSWList(MjonPayVO mjonPayVO) throws Exception;
|
||||
|
||||
Map<String, Object> payUserSWListAjax(MjonMsgVO mjonMsgVO) throws Exception;
|
||||
|
||||
//거래명세서 상세 조회
|
||||
MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@ -241,11 +241,5 @@ public class MjonPayVO extends ComDefaultVO{
|
||||
|
||||
private String totChgPay; // 간편결제분류
|
||||
|
||||
// 거래명세서 내용
|
||||
private String bizNo; // 사업자등록번호
|
||||
private String managerNm; // 담당자명
|
||||
private String prePaymentYn; // 선불결제여부 N:후불제고객
|
||||
private String dept; // 회원종류 p:개인 c:기업
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -358,8 +358,5 @@ public class MjonPayDAO extends EgovAbstractDAO {
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception{
|
||||
return (MjonPayVO)select("mjonPayDAO.selectPayDetail", mjonPayVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,16 +7,11 @@ import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.MessageDigest;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@ -30,15 +25,11 @@ import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
|
||||
import itn.com.cmm.LoginVO;
|
||||
import itn.com.cmm.util.DateUtils;
|
||||
import itn.com.cmm.util.MJUtil;
|
||||
import itn.com.cmm.util.PayUtils;
|
||||
import itn.com.utl.fcc.service.EgovStringUtil;
|
||||
import itn.let.mjo.event.service.MjonEventVO;
|
||||
import itn.let.mjo.event.service.impl.MjonEventDAO;
|
||||
import itn.let.mjo.msg.service.MjonMsgVO;
|
||||
import itn.let.mjo.msgcampain.service.MjonCandidateVO;
|
||||
import itn.let.mjo.msgcampain.service.impl.MjonCandidateDAO;
|
||||
import itn.let.mjo.msgdata.service.MjonMsgDataService;
|
||||
import itn.let.mjo.msgdata.service.impl.MjonMsgDataDAO;
|
||||
import itn.let.mjo.pay.service.MjonPayService;
|
||||
@ -103,10 +94,6 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
|
||||
@Resource(name = "mberGrdService")
|
||||
MberGrdService mberGrdService;
|
||||
|
||||
@Resource(name="mjonCandidateDAO")
|
||||
private MjonCandidateDAO mjonCandidateDAO;
|
||||
|
||||
|
||||
@Override
|
||||
public List<MjonPayVO> selectPayList(MjonPayVO mjonPayVO) throws Exception {
|
||||
return mjonPayDAO.selectPayList(mjonPayVO);
|
||||
@ -2852,144 +2839,6 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> payUserSWList(MjonPayVO mjonPayVO) throws Exception{
|
||||
|
||||
|
||||
String userId = mjonPayVO.getUserId();
|
||||
|
||||
|
||||
// 총 사용금액
|
||||
List<MjonPayVO> usedCashTotList = mjonPayDAO.selectUsedCashWithKakaoTotCnt(mjonPayVO);
|
||||
|
||||
// 사용가능한 금액
|
||||
// mberManageVO.prePaymentYn 선불 후불 회원 구분으로 인해 select함
|
||||
MberManageVO mberManageVO = mjonMsgDataDAO.selectMberManageInfo(userId);
|
||||
// 선거 후보자 정보 조회
|
||||
MjonCandidateVO mjonCandidateVO = new MjonCandidateVO();
|
||||
if("p".equals(mberManageVO.getDept())) { //개인회원 선거 후보자 정보 불러오기
|
||||
mjonCandidateVO = mjonCandidateDAO.selectCandidateDataInfo(userId);
|
||||
if(mjonCandidateVO != null) {
|
||||
mjonCandidateVO.setRegidentNo1(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo1()));
|
||||
mjonCandidateVO.setRegidentNo2(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo2()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 후불제 회원 관련 사용 요금 내역 정보 조회하기
|
||||
* 20231228 우영두 추가
|
||||
* 누적사용금액, 누적 납부금액, 당월 납부 예상금액 정보 조회
|
||||
*
|
||||
* */
|
||||
//누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-"로 사용된 금액만 합산)
|
||||
String totSumCashAfterPay = mjonPayDAO.selectTotalSumCashForAfterPay(userId);
|
||||
|
||||
//누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용)
|
||||
String totSumPointAfterPay = mjonPayDAO.selectTotalSumPointForAfterPay(userId);
|
||||
|
||||
//누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액)
|
||||
String totSumPaymentAfterPay = mjonPayDAO.selectTotSumPaymentAfterPay(userId);
|
||||
|
||||
//누적 납부 포인트 조회 ( 누적 납부금액 합산에 대한 2% 포인트 정보 계산)
|
||||
float p_i_re_point = 0;
|
||||
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
|
||||
if (sysJoinSetVO != null) {
|
||||
p_i_re_point = sysJoinSetVO.getPointPer();
|
||||
}
|
||||
int paymentPointAfterPay = Math.round((Float.parseFloat(totSumPaymentAfterPay) * p_i_re_point / 100));
|
||||
|
||||
//당월 납부 예상금액 (누적 사용금액 합산 - 누적 납부금액 합산 정보 계산)
|
||||
float unPaymentAfterPay = Float.parseFloat(totSumCashAfterPay) - Float.parseFloat(totSumPaymentAfterPay);
|
||||
|
||||
//당월 납부 예상 포인트 (당월 납부 예상 금액에 대한 2% 포인트 정보 계산)
|
||||
int unPaymentPointAfterPay = Math.round((unPaymentAfterPay * p_i_re_point / 100));
|
||||
|
||||
/*
|
||||
* 2024.02.06 후불제 회원 중 협의단가를 사용하는 회원은 포인트 적립이 되지 않아야함.
|
||||
* 후불제 협의 단가 여부 체크
|
||||
* 모든 협의 단가 금액을 합산하여 0보다 크면 협의단가 있음.
|
||||
* */
|
||||
float shortPrice = mberManageVO.getShortPrice();
|
||||
float longPrice = mberManageVO.getLongPrice();
|
||||
float picturePrice = mberManageVO.getPicturePrice() + mberManageVO.getPicture2Price() + mberManageVO.getPicture3Price();
|
||||
float kakaoAtPrice = mberManageVO.getKakaoAtPrice();
|
||||
float kakaoFtPrice = mberManageVO.getKakaoFtPrice();
|
||||
float totPrice = shortPrice + longPrice + picturePrice + kakaoAtPrice + kakaoFtPrice;
|
||||
String negoPriceYn = "N";
|
||||
|
||||
if(totPrice > 0) {
|
||||
negoPriceYn = "Y";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Map<String, Object> returnData = new HashMap<>();
|
||||
|
||||
|
||||
returnData.put("usedCashTotList", usedCashTotList);
|
||||
returnData.put("mberManageVO", mberManageVO);
|
||||
returnData.put("mjonCandidateVO", mjonCandidateVO);
|
||||
returnData.put("totSumCashAfterPay", totSumCashAfterPay);
|
||||
returnData.put("totSumPointAfterPay", totSumPointAfterPay);
|
||||
returnData.put("totSumPaymentAfterPay", totSumPaymentAfterPay);
|
||||
returnData.put("sumPaymentPointAfterPay", paymentPointAfterPay);
|
||||
returnData.put("unPaymentAfterPay", unPaymentAfterPay);
|
||||
returnData.put("unPaymentPointAfterPay", unPaymentPointAfterPay);
|
||||
returnData.put("negoPriceYn", negoPriceYn);
|
||||
// 초기 날짜 셋팅
|
||||
returnData.put("startDate", DateUtils.getDateMonthsAgo(1));
|
||||
returnData.put("endDate", DateUtils.getCurrentDate());
|
||||
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
return returnData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> payUserSWListAjax(MjonMsgVO mjonMsgVO) throws Exception{
|
||||
|
||||
if("".equals(mjonMsgVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
||||
mjonMsgVO.setSearchSortCnd("regDate");
|
||||
mjonMsgVO.setSearchSortOrd("desc");
|
||||
}
|
||||
|
||||
Map<String, Object> returnData = new HashMap<>();
|
||||
|
||||
// 검색 데이터가 없거나
|
||||
// 시작일자가 종료일자보다 이후이거나
|
||||
// 총 기간이 365일이 넘으면 현재일부터 365일 전 날짜를 넣어서 검색
|
||||
if(!DateUtils.dateChkAndValueChk(mjonMsgVO.getStartDate(),mjonMsgVO.getEndDate(), 12 )) {
|
||||
|
||||
mjonMsgVO.setStartDate(DateUtils.getDateMonthsAgo(12));
|
||||
mjonMsgVO.setEndDate(DateUtils.getCurrentDate());
|
||||
|
||||
};
|
||||
|
||||
|
||||
List<MjonMsgVO> payUserSWList = mjonMsgDataDAO.selectPayUserSWList(mjonMsgVO);
|
||||
returnData.put("payUserSWList", payUserSWList);
|
||||
returnData.put("totCnt", payUserSWList.size()> 0 ? payUserSWList.get(0).getTotCnt() : 0);
|
||||
returnData.put("totSuccSendPrice", payUserSWList.size() > 0 ? PayUtils.getTrimToFirstDecimal(payUserSWList.get(0).getTotSuccSendPrice()) : 0);
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MjonPayVO selectPayDetail(MjonPayVO mjonPayVO) throws Exception {
|
||||
|
||||
MjonPayVO result = mjonPayDAO.selectPayDetail(mjonPayVO);
|
||||
/* 후불제 고객의 사용기한 조회(결제일의 전달 1일 ~ 말일) */
|
||||
if("N".equals(result.getPrePaymentYn())) {
|
||||
String regDateStr = result.getRegDate();
|
||||
LocalDateTime regDate = Timestamp.valueOf(regDateStr).toLocalDateTime();
|
||||
|
||||
LocalDate lastMonth = regDate.toLocalDate().withDayOfMonth(1).minusMonths(1);
|
||||
LocalDate startDate = lastMonth.withDayOfMonth(1);
|
||||
LocalDate endDate = lastMonth.withDayOfMonth(lastMonth.lengthOfMonth());
|
||||
|
||||
result.setStartDate(startDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
result.setEndDate(endDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +91,6 @@ import itn.let.sym.grd.service.MberGrdVO;
|
||||
import itn.let.sym.site.service.EgovSiteManagerService;
|
||||
import itn.let.sym.site.service.JoinSettingVO;
|
||||
import itn.let.uat.uia.service.AuthCertVO;
|
||||
import itn.let.uat.uia.web.KmcCertChecker;
|
||||
import itn.let.uss.umt.service.EgovMberManageService;
|
||||
import itn.let.uss.umt.service.EgovUserManageService;
|
||||
import itn.let.uss.umt.service.MberManageVO;
|
||||
@ -166,10 +165,7 @@ public class MjonPayController {
|
||||
EgovSiteManagerService egovSiteManagerService;
|
||||
|
||||
@Resource(name = "mberGrdService")
|
||||
MberGrdService mberGrdService;
|
||||
|
||||
@Resource(name = "KmcCertChecker")
|
||||
KmcCertChecker kmcCertChecker;
|
||||
MberGrdService mberGrdService;
|
||||
|
||||
//배열 정의{"컬럼순차번호, 컬럼이름, 컬럼내용, 컬럼이름에 붙여야할 내용(엑셀코드양식다운로드시 필요)"}
|
||||
private String[][] sendPayExcelValue ={
|
||||
@ -934,7 +930,7 @@ public class MjonPayController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원가입 본인인증
|
||||
* 나이스페이(PG사 전송화면)
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
@ -945,10 +941,270 @@ public class MjonPayController {
|
||||
ModelMap model , @RequestParam Map<String, Object> commandMap,
|
||||
@ModelAttribute("searchVO") KmcVO kmcVO) throws Exception {
|
||||
|
||||
//kmc 본인인증 결과처리
|
||||
kmcVO = kmcCertChecker.authCertResult(request, response, model);
|
||||
//kmc 본인인증 로그 처리
|
||||
AuthCertVO certVO = kmcCertChecker.insertCertLog(kmcVO, "KMC_회원가입 인증");
|
||||
//크롬 SameSite정책 방지 - 도메인이 다른 타사로 이동 시 크롬 정책에 의해 세션 유실이 일어나는 경우가 있는데, 이를 방지하기 위해 samesite 보안을 none처리
|
||||
response.setHeader("Set-Cookie", "mberSession=mberSession; Secure; SameSite=None");
|
||||
|
||||
System.out.println("++++++++++++ 세션체크 ::: "+ session.getAttribute("mberSession"));
|
||||
|
||||
String errMessage = ""; //에러메세지
|
||||
|
||||
String rec_cert = ""; // 결과값(암호화)
|
||||
String certNum = ""; // certNum
|
||||
|
||||
rec_cert = request.getParameter("rec_cert").trim();
|
||||
certNum = request.getParameter("certNum").trim();
|
||||
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
kmcVO.setCertNum(certNum);
|
||||
// 파라미터 유효성 검증
|
||||
if( rec_cert.length() == 0 || certNum.length() == 0 ){
|
||||
errMessage = "비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
|
||||
// 변수선언 --------------------------------------------------------------------------------------------------------
|
||||
String k_certNum = ""; // 파라미터로 수신한 요청번호
|
||||
k_certNum = certNum;
|
||||
String date = ""; // 요청일시
|
||||
String CI = ""; // 연계정보(CI)
|
||||
String DI = ""; // 중복가입확인정보(DI)
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사
|
||||
String birthDay = ""; // 생년월일
|
||||
String gender = ""; // 성별
|
||||
String nation = ""; // 내국인
|
||||
String name = ""; // 성명
|
||||
String M_name = ""; // 미성년자 성명
|
||||
String M_birthDay = ""; // 미성년자 생년월일
|
||||
String M_Gender = ""; // 미성년자 성별
|
||||
String M_nation = ""; // 미성년자 내외국인
|
||||
String result = ""; // 결과값
|
||||
|
||||
String certMet = ""; // 인증방법
|
||||
String ip = ""; // ip주소
|
||||
String plusInfo = "";
|
||||
|
||||
String encPara = "";
|
||||
String encMsg1 = "";
|
||||
String encMsg2 = "";
|
||||
String msgChk = "";
|
||||
|
||||
com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager();
|
||||
|
||||
//02. 1차 복호화
|
||||
//수신된 certNum를 이용하여 복호화
|
||||
rec_cert = seed.getDec(rec_cert, k_certNum);
|
||||
|
||||
//03. 1차 파싱
|
||||
int inf1 = rec_cert.indexOf("/",0);
|
||||
int inf2 = rec_cert.indexOf("/",inf1+1);
|
||||
|
||||
encPara = rec_cert.substring(0,inf1); //암호화된 통합 파라미터
|
||||
encMsg1 = rec_cert.substring(inf1+1,inf2); //암호화된 통합 파라미터의 Hash값
|
||||
|
||||
//04. 위변조 검증
|
||||
encMsg2 = seed.getMsg(encPara);
|
||||
kmcVO.setEncMsg2(encMsg2);
|
||||
if(encMsg2.equals(encMsg1)){
|
||||
msgChk="Y";
|
||||
}
|
||||
|
||||
if(!"Y".equals(msgChk)) {
|
||||
errMessage = "비정상접근입니다.";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
//05. 2차 복호화
|
||||
rec_cert = seed.getDec(encPara, k_certNum);
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
//06. 2차 파싱
|
||||
int info1 = rec_cert.indexOf("/",0);
|
||||
int info2 = rec_cert.indexOf("/",info1+1);
|
||||
int info3 = rec_cert.indexOf("/",info2+1);
|
||||
int info4 = rec_cert.indexOf("/",info3+1);
|
||||
int info5 = rec_cert.indexOf("/",info4+1);
|
||||
int info6 = rec_cert.indexOf("/",info5+1);
|
||||
int info7 = rec_cert.indexOf("/",info6+1);
|
||||
int info8 = rec_cert.indexOf("/",info7+1);
|
||||
int info9 = rec_cert.indexOf("/",info8+1);
|
||||
int info10 = rec_cert.indexOf("/",info9+1);
|
||||
int info11 = rec_cert.indexOf("/",info10+1);
|
||||
int info12 = rec_cert.indexOf("/",info11+1);
|
||||
int info13 = rec_cert.indexOf("/",info12+1);
|
||||
int info14 = rec_cert.indexOf("/",info13+1);
|
||||
int info15 = rec_cert.indexOf("/",info14+1);
|
||||
int info16 = rec_cert.indexOf("/",info15+1);
|
||||
int info17 = rec_cert.indexOf("/",info16+1);
|
||||
int info18 = rec_cert.indexOf("/",info17+1);
|
||||
|
||||
certNum = rec_cert.substring(0,info1); kmcVO.setCertNum(certNum);
|
||||
date = rec_cert.substring(info1+1,info2); kmcVO.setDate(date);
|
||||
CI = rec_cert.substring(info2+1,info3); kmcVO.setCI(CI);
|
||||
phoneNo = rec_cert.substring(info3+1,info4); kmcVO.setPhoneNo(phoneNo);
|
||||
phoneCorp = rec_cert.substring(info4+1,info5); kmcVO.setPhoneCorp(phoneCorp);
|
||||
birthDay = rec_cert.substring(info5+1,info6); kmcVO.setBirthDay(birthDay);
|
||||
gender = rec_cert.substring(info6+1,info7); kmcVO.setGender(gender);
|
||||
nation = rec_cert.substring(info7+1,info8); kmcVO.setNation(nation);
|
||||
name = rec_cert.substring(info8+1,info9); kmcVO.setName(name);
|
||||
result = rec_cert.substring(info9+1,info10); kmcVO.setResult(result);
|
||||
certMet = rec_cert.substring(info10+1,info11); kmcVO.setCertMet(certMet);
|
||||
ip = rec_cert.substring(info11+1,info12); kmcVO.setIp(ip);
|
||||
M_name = rec_cert.substring(info12+1,info13); kmcVO.setMName(M_name);
|
||||
M_birthDay = rec_cert.substring(info13+1,info14); kmcVO.setMBirthDay(M_birthDay);
|
||||
M_Gender = rec_cert.substring(info14+1,info15); kmcVO.setMGender(M_Gender);
|
||||
M_nation = rec_cert.substring(info15+1,info16); kmcVO.setMNation(M_nation);
|
||||
plusInfo = rec_cert.substring(info16+1,info17); kmcVO.setPlusInfo(plusInfo);
|
||||
DI = rec_cert.substring(info17+1,info18); kmcVO.setDI(DI);
|
||||
|
||||
//07. CI, DI 복호화
|
||||
CI = seed.getDec(CI, k_certNum); kmcVO.setCI(CI);
|
||||
DI = seed.getDec(DI, k_certNum); kmcVO.setDI(DI);
|
||||
|
||||
if("Y".equals(result)) {
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
String regex = "";
|
||||
if( certNum.length() == 0 || certNum.length() > 40){
|
||||
errMessage = "요청번호 비정상.";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( date.length() != 14 || !paramChk(regex, date) ){
|
||||
errMessage = "요청일시";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if( certMet.length() != 1 || !paramChk(regex, certMet) ){
|
||||
errMessage = "본인인증방법 비정상" + certMet;
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( (phoneNo.length() != 10 && phoneNo.length() != 11) || !paramChk(regex, phoneNo) ){
|
||||
errMessage = "휴대폰번호 비정상" ;
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if( phoneCorp.length() != 3 || !paramChk(regex, phoneCorp) ){
|
||||
errMessage = "이동통신사 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( birthDay.length() != 8 || !paramChk(regex, birthDay) ){
|
||||
errMessage = "생년월일 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( gender.length() != 1 || !paramChk(regex, gender) ){
|
||||
errMessage = "성별 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( nation.length() != 1 || !paramChk(regex, nation) ){
|
||||
errMessage = "내/외국인 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-<2D>R.,-]*";
|
||||
if( name.length() > 60 || !paramChk(regex, name) ){
|
||||
errMessage = "성명 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if( result.length() != 1 || !paramChk(regex, result) ){
|
||||
errMessage = "결과값 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-?.,-]*";
|
||||
if( M_name.length() != 0 ){
|
||||
if( M_name.length() > 60 || !paramChk(regex, M_name) ){
|
||||
errMessage = "미성년자 성명 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( M_birthDay.length() != 0 ){
|
||||
if( M_birthDay.length() != 8 || !paramChk(regex, M_birthDay) ){
|
||||
errMessage = "미성년자 생년월일 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( M_Gender.length() != 0 ){
|
||||
if( M_Gender.length() != 1 || !paramChk(regex, M_Gender) ){
|
||||
errMessage = "미성년자 성별 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if( M_nation.length() != 0 ){
|
||||
if( M_nation.length() != 1 || !paramChk(regex, M_nation) ){
|
||||
errMessage = "미성년자 내/외국인 비정상";
|
||||
return returnPage(model , errMessage , kmcVO) ;
|
||||
}
|
||||
}
|
||||
|
||||
//본인인증 결과 내용 저장하기.
|
||||
/*System.out.println("+++++++++++++ getCertNum ::: "+kmcVO.getCertNum());
|
||||
System.out.println("+++++++++++++ getDate ::: "+kmcVO.getDate());
|
||||
System.out.println("+++++++++++++ getDI ::: "+kmcVO.getDI());
|
||||
System.out.println("+++++++++++++ getPhoneNo ::: "+kmcVO.getPhoneNo());
|
||||
System.out.println("+++++++++++++ getNation ::: "+kmcVO.getNation());
|
||||
System.out.println("+++++++++++++ getName ::: "+kmcVO.getName());
|
||||
System.out.println("+++++++++++++ getResult ::: "+kmcVO.getResult());
|
||||
System.out.println("+++++++++++++ getCertMet ::: "+kmcVO.getCertMet());
|
||||
System.out.println("+++++++++++++ getIp ::: "+kmcVO.getIp());*/
|
||||
|
||||
//KMC 본인인증 정보를 세션에 담아준다.
|
||||
/*AuthCertVO certVO = new AuthCertVO();
|
||||
certVO.setCertNum(kmcVO.getCertNum());
|
||||
certVO.setCertDate(kmcVO.getDate());
|
||||
certVO.setCertDi(kmcVO.getDI());
|
||||
certVO.setCertPhone(kmcVO.getPhoneNo());
|
||||
certVO.setCertNation(kmcVO.getNation());
|
||||
certVO.setCertName(kmcVO.getName());
|
||||
certVO.setCertResult(kmcVO.getResult());
|
||||
certVO.setCertType("KMC문자인증");
|
||||
certVO.setCertIpaddr(kmcVO.getIp());
|
||||
certVO.setBirthDay(kmcVO.getBirthDay());
|
||||
certVO.setSexdstnCode(kmcVO.getGender());*/
|
||||
|
||||
/*request.getSession().setAttribute("AuthKmcCertVO", certVO);*/
|
||||
|
||||
/*System.out.println("++++++++++++ 세션체크22 ::: "+(MberManageVO) session.getAttribute("mberSession"));*/
|
||||
|
||||
//KMC 본인인증 로그 insert
|
||||
AuthCertVO certVO = new AuthCertVO();
|
||||
certVO.setMberId(kmcVO.getPlusInfo());
|
||||
certVO.setCertNum(kmcVO.getCertNum());
|
||||
certVO.setCertDate(kmcVO.getDate());
|
||||
certVO.setCertDi(kmcVO.getDI());
|
||||
certVO.setCertPhone(kmcVO.getPhoneNo());
|
||||
certVO.setCertNation(kmcVO.getNation());
|
||||
certVO.setCertName(kmcVO.getName());
|
||||
certVO.setCertResult(kmcVO.getResult());
|
||||
certVO.setCertType("KMC_회원가입 인증");
|
||||
certVO.setCertIpaddr(kmcVO.getIp());
|
||||
certVO.setBirthDay(kmcVO.getBirthDay());
|
||||
certVO.setSexdstnCode(kmcVO.getGender());
|
||||
|
||||
//디비 테이블에 저장하기
|
||||
mberManageService.insertCertInfoLog(certVO);
|
||||
|
||||
kmcVO.setIdx(certVO.getIdx()); //본인인증 로그 Idx - 로그 insert 후 idx selectKey
|
||||
model.addAttribute("kmcVO", kmcVO);
|
||||
@ -2347,16 +2603,15 @@ public class MjonPayController {
|
||||
* 2023.12.22 우영두
|
||||
* @param mjonMsgVO
|
||||
* @param model
|
||||
* @return "/web/member/pay/payUserSWList.do"
|
||||
* @return "/web/member/pay/PayUserSWList.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value= {"/web/member/pay/payUserSWList.do"})
|
||||
public String payUserSWList(@ModelAttribute("mjonMsgVO") MjonMsgVO mjonMsgVO,
|
||||
@RequestMapping(value= {"/web/member/pay/PayUserSWList.do"})
|
||||
public String PayUserSWList(@ModelAttribute("mjonMsgVO") MjonMsgVO mjonMsgVO,
|
||||
MjonPayVO mjonPayVO,
|
||||
MberManageVO mberManageVO, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request,
|
||||
ModelMap model) throws Exception{
|
||||
|
||||
|
||||
/*LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();*/
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
@ -2366,26 +2621,117 @@ public class MjonPayController {
|
||||
return "redirect:/web/user/login/login.do";
|
||||
}
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
mjonPayVO.setUserId(userId);
|
||||
mjonMsgVO.setUserId(userId);
|
||||
/*
|
||||
{ // 충전캐시
|
||||
String sumPayMoney = mjonPayService.selectAgentSumPayMoney(userId);
|
||||
model.addAttribute("sumPayMoney", sumPayMoney);
|
||||
}
|
||||
|
||||
{ // 충전포인트
|
||||
String sumPoint = mjonPayService.selectSumPoint(userId);
|
||||
model.addAttribute("sumPoint", sumPoint);
|
||||
}
|
||||
*/
|
||||
|
||||
{ // 총 사용금액
|
||||
mjonPayVO.setUserId(userId);
|
||||
List<MjonPayVO> usedCashTotList = mjonPayService.selectUsedCashWithKakaoTotCnt(mjonPayVO);
|
||||
model.addAttribute("usedCashTotList", usedCashTotList);
|
||||
}
|
||||
{ // 사용가능한 금액
|
||||
// mberManageVO.prePaymentYn 선불 후불 회원 구분으로 인해 select함
|
||||
mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
|
||||
model.addAttribute("mberManageVO", mberManageVO);
|
||||
}
|
||||
/*
|
||||
{ // 발송건수
|
||||
mjonMsgVO.setReserveYn("N");
|
||||
List<MjonMsgVO> sendTotList = mjonMsgService.selectWithKakaoSendTotCnt(mjonMsgVO);
|
||||
model.addAttribute("sendTotList", sendTotList);
|
||||
}
|
||||
|
||||
{ // 예약건수
|
||||
mjonMsgVO.setReserveYn("Y");
|
||||
List<MjonMsgVO> reservToList = mjonMsgService.selectWithKakaoSendTotCnt(mjonMsgVO);
|
||||
model.addAttribute("reservToList", reservToList);
|
||||
}
|
||||
*/
|
||||
{// 선거 후보자 정보 조회
|
||||
MjonCandidateVO mjonCandidateVO = new MjonCandidateVO();
|
||||
if("p".equals(mberManageVO.getDept())) { //개인회원 선거 후보자 정보 불러오기
|
||||
mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId);
|
||||
if(mjonCandidateVO != null) {
|
||||
mjonCandidateVO.setRegidentNo1(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo1()));
|
||||
mjonCandidateVO.setRegidentNo2(egovCryptoUtil.decrypt(mjonCandidateVO.getRegidentNo2()));
|
||||
}
|
||||
}
|
||||
model.addAttribute("mjonCandidateVO", mjonCandidateVO);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
/**
|
||||
* 후불제 회원 관련 사용 요금 내역 정보 조회하기
|
||||
* 20231228 우영두 추가
|
||||
* 누적사용금액, 누적 납부금액, 당월 납부 예상금액 정보 조회
|
||||
*
|
||||
* */
|
||||
|
||||
//누적 사용금액 조회 (캐시 테이블에서 현재까지 사용된 금액 합산 - 캐시 테이블에서 "-"로 사용된 금액만 합산)
|
||||
String totSumCashAfterPay = mjonPayService.selectTotalSumCashForAfterPay(userId);
|
||||
model.addAttribute("totSumCashAfterPay", totSumCashAfterPay);
|
||||
|
||||
//누적 사용 포인트 조회 (포인트 테이블에서 현재까지 사용된 포인트 합산 - 회원 포인트 정보 업데이트시 사용되는 쿼리 이용)
|
||||
String totSumPointAfterPay = mjonPayService.selectTotalSumPointForAfterPay(userId);
|
||||
model.addAttribute("totSumPointAfterPay", totSumPointAfterPay);
|
||||
|
||||
//누적 납부금액 조회 (후불회원이 사용금액을 실 납부한 금액 합산 - 미납 금액 제외한 총 합산 금액)
|
||||
String totSumPaymentAfterPay = mjonPayService.selectTotSumPaymentAfterPay(userId);
|
||||
model.addAttribute("totSumPaymentAfterPay", totSumPaymentAfterPay);
|
||||
|
||||
//누적 납부 포인트 조회 ( 누적 납부금액 합산에 대한 2% 포인트 정보 계산)
|
||||
float p_i_re_point = 0;
|
||||
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
|
||||
if (sysJoinSetVO != null) {
|
||||
p_i_re_point = sysJoinSetVO.getPointPer();
|
||||
}
|
||||
int paymentPointAfterPay = Math.round((Float.parseFloat(totSumPaymentAfterPay) * p_i_re_point / 100));
|
||||
model.addAttribute("sumPaymentPointAfterPay", paymentPointAfterPay);
|
||||
|
||||
//당월 납부 예상금액 (누적 사용금액 합산 - 누적 납부금액 합산 정보 계산)
|
||||
|
||||
float unPaymentAfterPay = Float.parseFloat(totSumCashAfterPay) - Float.parseFloat(totSumPaymentAfterPay);
|
||||
model.addAttribute("unPaymentAfterPay", unPaymentAfterPay);
|
||||
|
||||
//당월 납부 예상 포인트 (당월 납부 예상 금액에 대한 2% 포인트 정보 계산)
|
||||
int unPaymentPointAfterPay = Math.round((unPaymentAfterPay * p_i_re_point / 100));
|
||||
model.addAttribute("unPaymentPointAfterPay", unPaymentPointAfterPay);
|
||||
|
||||
/*
|
||||
* 2024.02.06 후불제 회원 중 협의단가를 사용하는 회원은 포인트 적립이 되지 않아야함.
|
||||
* 후불제 협의 단가 여부 체크
|
||||
* 모든 협의 단가 금액을 합산하여 0보다 크면 협의단가 있음.
|
||||
* */
|
||||
float shortPrice = mberManageVO.getShortPrice();
|
||||
float longPrice = mberManageVO.getLongPrice();
|
||||
float picturePrice = mberManageVO.getPicturePrice() + mberManageVO.getPicture2Price() + mberManageVO.getPicture3Price();
|
||||
float kakaoAtPrice = mberManageVO.getKakaoAtPrice();
|
||||
float kakaoFtPrice = mberManageVO.getKakaoFtPrice();
|
||||
float totPrice = shortPrice + longPrice + picturePrice + kakaoAtPrice + kakaoFtPrice;
|
||||
String negoPriceYn = "N";
|
||||
|
||||
// // 비즈니스 로직 부분
|
||||
Map<String, Object> resultMap = mjonPayService.payUserSWList(mjonPayVO);
|
||||
|
||||
|
||||
model.addAttribute("usedCashTotList", resultMap.get("usedCashTotList"));
|
||||
model.addAttribute("mjonCandidateVO", resultMap.get("mjonCandidateVO"));
|
||||
model.addAttribute("mberManageVO", resultMap.get("mberManageVO"));
|
||||
model.addAttribute("totSumCashAfterPay", resultMap.get("totSumCashAfterPay"));
|
||||
model.addAttribute("totSumPointAfterPay", resultMap.get("totSumPointAfterPay"));
|
||||
model.addAttribute("totSumPaymentAfterPay", resultMap.get("totSumPaymentAfterPay"));
|
||||
model.addAttribute("sumPaymentPointAfterPay", resultMap.get("sumPaymentPointAfterPay"));
|
||||
model.addAttribute("unPaymentAfterPay", resultMap.get("unPaymentAfterPay"));
|
||||
model.addAttribute("unPaymentPointAfterPay", resultMap.get("unPaymentPointAfterPay"));
|
||||
model.addAttribute("negoPriceYn", resultMap.get("negoPriceYn"));
|
||||
model.addAttribute("startDate", resultMap.get("startDate"));
|
||||
model.addAttribute("endDate", resultMap.get("endDate"));
|
||||
|
||||
if(totPrice > 0) {
|
||||
negoPriceYn = "Y";
|
||||
}
|
||||
model.addAttribute("negoPriceYn", negoPriceYn);
|
||||
|
||||
}
|
||||
{
|
||||
// 초기 날짜 셋팅
|
||||
model.addAttribute("startDate", DateUtils.getDateMonthsAgo(12));
|
||||
model.addAttribute("endDate", DateUtils.getCurrentDate());
|
||||
}
|
||||
|
||||
return "/web/pay/PayUserSWList";
|
||||
}
|
||||
@ -2403,8 +2749,8 @@ public class MjonPayController {
|
||||
* @return "/web/member/pay/PayUserSWListAjax.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value= {"/web/member/pay/payUserSWListAjax.do"})
|
||||
public String payUserSWListAjax(@ModelAttribute("searchVO") MjonMsgVO mjonMsgVO,
|
||||
@RequestMapping(value= {"/web/member/pay/PayUserSWListAjax.do"})
|
||||
public String PayUserSWListAjax(@ModelAttribute("searchVO") MjonMsgVO mjonMsgVO,
|
||||
HttpServletRequest request,
|
||||
ModelMap model) throws Exception{
|
||||
|
||||
@ -2428,12 +2774,29 @@ public class MjonPayController {
|
||||
mjonMsgVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
mjonMsgVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
Map<String, Object> resultMap = mjonPayService.payUserSWListAjax(mjonMsgVO);
|
||||
if("".equals(mjonMsgVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
||||
mjonMsgVO.setSearchSortCnd("regDate");
|
||||
mjonMsgVO.setSearchSortOrd("desc");
|
||||
}
|
||||
|
||||
paginationInfo.setTotalRecordCount((int)resultMap.get("totCnt"));
|
||||
// 검색 데이터가 없거나
|
||||
// 시작일자가 종료일자보다 이후이거나
|
||||
// 총 기간이 365일이 넘으면 현재일부터 365일 전 날짜를 넣어서 검색
|
||||
if(!DateUtils.dateChkAndValueChk(mjonMsgVO.getStartDate(),mjonMsgVO.getEndDate(), 12 )) {
|
||||
|
||||
mjonMsgVO.setStartDate(DateUtils.getDateMonthsAgo(12));
|
||||
mjonMsgVO.setEndDate(DateUtils.getCurrentDate());
|
||||
|
||||
};
|
||||
|
||||
List<MjonMsgVO> payUserSWList = mjonMsgDataService.selectPayUserSWList(mjonMsgVO);
|
||||
|
||||
paginationInfo.setTotalRecordCount(payUserSWList.size()> 0 ? payUserSWList.get(0).getTotCnt() : 0);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("payUserSWList", resultMap.get("payUserSWList"));
|
||||
model.addAttribute("totSuccSendPrice", resultMap.get("totSuccSendPrice"));
|
||||
model.addAttribute("payUserSWList", payUserSWList);
|
||||
|
||||
model.addAttribute("totSuccSendPrice", payUserSWList.size() > 0 ? PayUtils.getTrimToFirstDecimal(payUserSWList.get(0).getTotSuccSendPrice()) : 0);
|
||||
|
||||
model.addAttribute("mjonMsgVO", mjonMsgVO);
|
||||
|
||||
|
||||
@ -2515,7 +2878,7 @@ public class MjonPayController {
|
||||
font.setBoldweight(Font.BOLDWEIGHT_BOLD); //글씨 bold
|
||||
|
||||
sheet.setColumnWidth(1, 5000); // 칼럼의 폭 조절
|
||||
sheet.setColumnWidth(3, 10000); // 칼럼의 폭 조절
|
||||
sheet.setColumnWidth(4, 10000); // 칼럼의 폭 조절
|
||||
|
||||
try{
|
||||
|
||||
@ -2540,7 +2903,6 @@ public class MjonPayController {
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,1,1,1)); //셀병합
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,1,2,2)); //셀병합
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,1,3,3)); //셀병합
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,1,6,6)); //셀병합
|
||||
|
||||
|
||||
cell = row.createCell(0);
|
||||
@ -2548,29 +2910,46 @@ public class MjonPayController {
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(1);
|
||||
cell.setCellValue("발송일시");
|
||||
cell.setCellValue("날짜");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(2);
|
||||
cell.setCellValue("형태");
|
||||
cell.setCellValue("문자유형");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(3);
|
||||
cell.setCellValue("내용");
|
||||
cell.setCellValue("발송건수");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(4);
|
||||
cell.setCellValue("발송건수");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,0,4,5)); //셀병합
|
||||
cell.setCellValue("내용");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(5);
|
||||
|
||||
/*cell = row.createCell(5);
|
||||
cell.setCellValue("충전");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,0,5,6)); //셀병합
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(6);
|
||||
cell.setCellValue("금액(원)");
|
||||
cell.setCellStyle(style);*/
|
||||
|
||||
cell = row.createCell(5);
|
||||
cell.setCellValue("사용");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,0,5,6)); //셀병합
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(6);
|
||||
cell.setCellStyle(style);
|
||||
|
||||
|
||||
/*cell = row.createCell(9);
|
||||
cell.setCellValue("잔액");
|
||||
sheet.addMergedRegion(new CellRangeAddress(0,0,9,10)); //셀병합
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(10);
|
||||
cell.setCellStyle(style);*/
|
||||
|
||||
row = sheet.createRow(1);
|
||||
|
||||
cell = row.createCell(0);
|
||||
@ -2586,16 +2965,32 @@ public class MjonPayController {
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(4);
|
||||
cell.setCellValue("성공");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(5);
|
||||
cell.setCellValue("실패");
|
||||
/*cell = row.createCell(5);
|
||||
cell.setCellValue("충전금");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(6);
|
||||
cell.setCellValue("포인트");
|
||||
cell.setCellStyle(style);*/
|
||||
|
||||
cell = row.createCell(5);
|
||||
cell.setCellValue("충전금");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(6);
|
||||
cell.setCellValue("포인트");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
/*cell = row.createCell(9);
|
||||
cell.setCellValue("충전금");
|
||||
cell.setCellStyle(style);
|
||||
|
||||
cell = row.createCell(10);
|
||||
cell.setCellValue("포인트");
|
||||
cell.setCellStyle(style);*/
|
||||
|
||||
DecimalFormat formatter = new DecimalFormat("###,###.##");
|
||||
String befCash = "";
|
||||
String befPoint = "";
|
||||
@ -2638,11 +3033,15 @@ public class MjonPayController {
|
||||
if(j==0) cell.setCellValue(i+1); //번호
|
||||
if(j==1) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getRegDate()); //결제일시
|
||||
if(j==2) cell.setCellValue(msgType); //문자유형
|
||||
if(j==3) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSmsTxt()); //내용
|
||||
if(j==4) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendCnt()); //성공건수
|
||||
if(j==5) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getFailSendCnt()); //실패건수
|
||||
if(j==6) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendPrice()); //금액
|
||||
}
|
||||
if(j==3) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendCnt()); //발송건수
|
||||
if(j==4) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSmsTxt()); //내용
|
||||
if(j==5) cell.setCellValue(((MjonMsgVO)payUserList.get(i)).getSuccSendPrice()); //충전 - 충전금
|
||||
if(j==6) cell.setCellValue(0); //충전 - 포인트
|
||||
/*if(j==7) cell.setCellValue(totPrice); //사용 - 충전금
|
||||
if(j==8) cell.setCellValue(0); //사용 - 포인트
|
||||
if(j==9) cell.setCellValue(thisPoint); //잔액 - 충전금
|
||||
if(j==10) cell.setCellValue(befPoint); //잔액 - 포인트
|
||||
*/ }
|
||||
}
|
||||
}
|
||||
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
|
||||
@ -4645,19 +5044,35 @@ public class MjonPayController {
|
||||
model.addAttribute("endDate", endDate);
|
||||
|
||||
DecimalFormat decFormat = new DecimalFormat("###,###");
|
||||
DecimalFormat decFormatFloat = new DecimalFormat("###,###.#");
|
||||
model.addAttribute("sendSumCount", decFormat.format(sendSumCount));
|
||||
model.addAttribute("supplySumPrice", decFormat.format(supplySumPrice));
|
||||
model.addAttribute("vatSumPrice", decFormat.format(vatSumPrice));
|
||||
model.addAttribute("totalSumPrice", decFormatFloat.format(totalSumPrice));
|
||||
model.addAttribute("totalSumPrice", decFormat.format(totalSumPrice));
|
||||
model.addAttribute("resultList", payUserSumList);
|
||||
|
||||
// 수신자 정보
|
||||
MJUtil mjUtil = new MJUtil();
|
||||
MberManageVO mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
|
||||
mberManageVO.setMoblphonNo(mjUtil.addDash(mberManageVO.getMoblphonNo()));
|
||||
mberManageVO.setBizNo(mjUtil.bizNoAddDash(mberManageVO.getBizNo()));
|
||||
model.addAttribute("mberManageVO", mberManageVO);
|
||||
String mberNm = ""; // 회사명
|
||||
String managerNm = ""; // 담당자명
|
||||
String moblphonNo = ""; // 연락처
|
||||
MberManageVO mberManageVO = new MberManageVO();
|
||||
mberManageVO = mjonMsgDataService.selectMberManageInfo(userId);
|
||||
if (mberManageVO != null) {
|
||||
// 회원종류 p-개인 c-기업
|
||||
if (mberManageVO.getDept().equals("c")) {
|
||||
mberNm = mberManageVO.getMberNm();
|
||||
managerNm = mberManageVO.getManagerNm();
|
||||
moblphonNo = mberManageVO.getMoblphonNo();
|
||||
}
|
||||
else {
|
||||
mberNm = mberManageVO.getMberNm();
|
||||
managerNm = mberManageVO.getMberNm();
|
||||
moblphonNo = mberManageVO.getMoblphonNo();
|
||||
}
|
||||
}
|
||||
|
||||
model.addAttribute("mberNm", mberNm);
|
||||
model.addAttribute("managerNm", managerNm);
|
||||
model.addAttribute("moblphonNo", moblphonNo);
|
||||
|
||||
//부가세 포함 가격 정보 계산
|
||||
double addTax = Math.round(totalSumPrice * 0.1);
|
||||
@ -5775,42 +6190,7 @@ public class MjonPayController {
|
||||
|
||||
return "/uss/ion/pay/cashPointSendList";
|
||||
}
|
||||
|
||||
/**
|
||||
* * 거래명세서 팝업
|
||||
* @param searchVO
|
||||
* @param model
|
||||
* @return "/web/member/pay/payInvoicePopupAjax.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value= {"/web/member/pay/payInvoicePopupAjax.do"})
|
||||
public String printInvoiceAjax(
|
||||
@ModelAttribute("searchVO") MjonPayVO mjonPayVO
|
||||
, RedirectAttributes redirectAttributes
|
||||
, ModelMap model) throws Exception {
|
||||
|
||||
|
||||
|
||||
//로그인 권한정보 불러오기
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if(loginVO == null) {
|
||||
//redirectAttributes.addFlashAttribute("message", "문자온 서비스는 로그인 후 이용 가능합니다.");
|
||||
return "redirect:/web/user/login/login.do";
|
||||
}
|
||||
|
||||
mjonPayVO.setUserId(userId);
|
||||
|
||||
//결제 정보 불러오기
|
||||
MJUtil mjUtil = new MJUtil();
|
||||
MjonPayVO result = mjonPayService.selectPayDetail(mjonPayVO);
|
||||
result.setMbtlNum(mjUtil.addDash(result.getMbtlNum()));
|
||||
result.setBizNo(mjUtil.bizNoAddDash(result.getBizNo()));
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "web/pay/payInvoicePrintPopup";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param p_pattern
|
||||
* @param p_mjonPayVO
|
||||
@ -5923,6 +6303,5 @@ public class MjonPayController {
|
||||
|
||||
return p_response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -278,8 +278,6 @@ public class MjonPayV2Controller {
|
||||
try {
|
||||
// 다음 결제시 결제수단 SELECT
|
||||
nextPayMethod = userManageService.selectNextPayMethod(userId);
|
||||
// 실제 마지막 결제 방식 -
|
||||
|
||||
}
|
||||
catch(Exception e) {
|
||||
isSuccess = false;
|
||||
@ -1642,45 +1640,6 @@ public class MjonPayV2Controller {
|
||||
return "web/cop/kgmV2/bankOkUrl";
|
||||
}
|
||||
|
||||
/**
|
||||
* 마지막 결제수단 SELECT
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/web/member/pay/selectLastPayMethodAjax.do")
|
||||
public ModelAndView selectLastPayMethodAjax(MjonPayVO mjonPayVO,
|
||||
HttpServletRequest request ) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
boolean isSuccess = true;
|
||||
String msg = "";
|
||||
String nextPayMethod = "";
|
||||
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
if(userId == null) {
|
||||
isSuccess = false;
|
||||
msg = "로그인이 필요합니다.";
|
||||
}
|
||||
|
||||
try {
|
||||
// 다음 결제시 결제수단 SELECT
|
||||
nextPayMethod = userManageService.selectLastPayMethod(userId);
|
||||
}
|
||||
catch(Exception e) {
|
||||
isSuccess = false;
|
||||
msg = e.getMessage();
|
||||
}
|
||||
|
||||
modelAndView.addObject("isSuccess", isSuccess);
|
||||
modelAndView.addObject("msg", msg);
|
||||
modelAndView.addObject("nextPayMethod", nextPayMethod);
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
// Get Server Path
|
||||
public static String getKgServerPath(HttpServletRequest request) {
|
||||
String kgmPath = request.getScheme() + "://" + request.getServerName() +":" + request.getServerPort();
|
||||
|
||||
@ -213,36 +213,6 @@ public class PriceAndPoint {
|
||||
kakaoAlimTalkDAO.insertKakaoSendPrice(kakaoVO);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @methodName : insertCashAndPoint
|
||||
* @author : 이지우
|
||||
* @date : 2025. 8. 14.
|
||||
* @description : insertCashAndPoint 에서 updateMemberCash 제외
|
||||
* @return : void
|
||||
* @param userId
|
||||
* @param totPrice
|
||||
* @param memo
|
||||
* @param msgGroupId
|
||||
* @param userData
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
public void insertCashAndPointNoUpdate(
|
||||
String userId
|
||||
, float totPrice
|
||||
, String memo
|
||||
, String msgGroupId
|
||||
, String userData
|
||||
) throws Exception {
|
||||
|
||||
MjonPayVO mjonPayVO = buildPayVO(userId, totPrice, memo, msgGroupId);
|
||||
|
||||
// 환불로 인해 userData가 추후 사용될 경우 여기에 처리
|
||||
if (StringUtils.isNotEmpty(userData)) { mjonPayVO.setOrderId(userData); }
|
||||
|
||||
mjonPayDAO.insertCash(mjonPayVO); //캐시
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -47,11 +47,11 @@ public interface SchdlrManageService {
|
||||
//전용계좌 자동 충전 배치
|
||||
public void vacsAutoCharge() throws Exception;
|
||||
|
||||
//문자온 카카오톡 실패 건수 환불 배치
|
||||
public void kakaoFailPayBack() throws Exception;
|
||||
|
||||
//문자온 문자전송 실패 건수 환불 배치
|
||||
public void payBack(String type, int limitCout) throws Exception;
|
||||
|
||||
public void payBack_advc(String p_type) throws Exception;
|
||||
|
||||
//대체문자 결과 반영 배치
|
||||
public void updateKakaoResendResult() throws Exception;
|
||||
}
|
||||
|
||||
@ -2,9 +2,7 @@ package itn.let.schdlr.service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.sql.DataSource;
|
||||
@ -26,16 +24,12 @@ import itn.let.fax.admin.service.FaxAdmService;
|
||||
import itn.let.fax.admin.service.FaxStatVO;
|
||||
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoAtStatVO;
|
||||
import itn.let.kakao.admin.statistics.service.KakaoStatisticsService;
|
||||
import itn.let.kakao.kakaoComm.KakaoVO;
|
||||
import itn.let.kakao.user.kakaoAt.service.KakaoAlimTalkService;
|
||||
import itn.let.lett.service.LetterService;
|
||||
import itn.let.mail.service.MailTemplateService;
|
||||
import itn.let.mjo.mjocommon.MjonCommon;
|
||||
import itn.let.mjo.msg.service.MjonMsgService;
|
||||
import itn.let.mjo.msg.service.MjonMsgStatVO;
|
||||
import itn.let.mjo.msg.service.MjonMsgVO;
|
||||
import itn.let.mjo.msgdata.service.impl.MjonMsgDataDAO;
|
||||
import itn.let.mjo.pay.service.MjonPayService;
|
||||
import itn.let.mjo.pay.service.MjonPayVO;
|
||||
import itn.let.sts.com.StatsVO;
|
||||
import itn.let.sts.cst.service.EgovConectStatsService;
|
||||
import itn.let.uss.umt.service.EgovUserManageService;
|
||||
@ -88,15 +82,6 @@ public class SchedulerUtil {
|
||||
@Resource(name="MjonMsgDataDAO")
|
||||
private MjonMsgDataDAO mjonMsgDataDAO;
|
||||
|
||||
@Resource(name="kakaoAlimTalkService")
|
||||
private KakaoAlimTalkService kakaoAlimTalkService;
|
||||
|
||||
@Resource(name="MjonCommon")
|
||||
private MjonCommon mjonCommon;
|
||||
|
||||
@Resource(name = "mjonPayService")
|
||||
private MjonPayService mjonPayService;
|
||||
|
||||
/** 설정값 가져오기 */
|
||||
@Value("#{globalSettings['Globals.Env']}")
|
||||
private String GlobalsEnv;
|
||||
@ -480,52 +465,18 @@ public class SchedulerUtil {
|
||||
public LockProvider lockProvider(DataSource dataSource) {
|
||||
return new JdbcTemplateLockProvider(dataSource);
|
||||
}
|
||||
|
||||
// @Scheduled(cron = "0 0 0/2 * * ?") // 매시간 짝수 정각마다 실행
|
||||
|
||||
@Scheduled(cron = "0 0/3 * * * ?") // 3분마다 실행
|
||||
@SchedulerLock(name = "runKakaoOneTime", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN)
|
||||
public void runKakaoOneTime() throws Exception {
|
||||
|
||||
/* 회원 money 업데이트 처리 트랜잭션 분리를 위하여 impl이 아닌 현재 위치에서 반복문 실행 */
|
||||
System.out.println("=============SchedulerUtil=====runKakaoOneTime =============>");
|
||||
List<KakaoVO> kakaoRefundList = kakaoAlimTalkService.selectKakaoSentRefundListForSingle();
|
||||
Set<String> targetIdSet = new HashSet<>();
|
||||
|
||||
for(KakaoVO kakaoVO : kakaoRefundList) {
|
||||
try {
|
||||
kakaoAlimTalkService.kakaoSingleRefund(kakaoVO);
|
||||
targetIdSet.add(kakaoVO.getUserId());
|
||||
} catch (Exception e) {
|
||||
String msg = "[문자온] 환불 실패 - " + kakaoVO.getMsgId() +"("+ kakaoVO.getUserId() + ")";
|
||||
mjonCommon.sendSimpleSlackMsg(msg);;
|
||||
}
|
||||
}
|
||||
|
||||
MjonPayVO mjonPayVO = new MjonPayVO();
|
||||
for(String userId : targetIdSet) {
|
||||
try {
|
||||
mjonPayVO.setUserId(userId);
|
||||
mjonPayService.updateMemberCash(mjonPayVO); //회원정보 업데이트
|
||||
} catch(Exception e) {
|
||||
String msg = "[문자온] 환불 후 잔액 갱신 실패 - " + userId;
|
||||
mjonCommon.sendSimpleSlackMsg(msg);;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//대체문자 결과 반영
|
||||
@Scheduled(cron = "0 0/2 * * * ?") // 2분마다 실행
|
||||
@SchedulerLock(name = "updateKakaoResendResult", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN)
|
||||
public void runUpdateKakaoResendResult() throws Exception {
|
||||
|
||||
// do something...
|
||||
try {
|
||||
System.out.println("=============SchedulerUtil=====runUpdateKakaoResendResult =============>");
|
||||
schdlrManageService.updateKakaoResendResult();
|
||||
System.out.println("=============SchedulerUtil=====runKakaoOneTime =============>");
|
||||
schdlrManageService.kakaoFailPayBack();
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//환불 실행
|
||||
|
||||
@ -438,6 +438,17 @@ public class SchdlrManageServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
}
|
||||
|
||||
// 카카오 환불 처리 리스트
|
||||
public void kakaoFailPayBack() throws Exception {
|
||||
|
||||
// 카카오 알림톡 환불 처리
|
||||
kakaoAlimTalkService.selectKakaoAtSentRefundList();
|
||||
|
||||
// 카카오 친구톡 환불 처리
|
||||
kakaoAlimTalkService.selectKakaoFtSentRefundList();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void payBack(String type, int limitCout) throws Exception {
|
||||
// 문자 환불
|
||||
@ -556,37 +567,4 @@ public class SchdlrManageServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
return msgFailList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @methodName : updateKakaoResendResult
|
||||
* @author : 이지우
|
||||
* @date : 2025.07.15
|
||||
* @description : 대체문자 결과 반영
|
||||
* @param p_type
|
||||
* @param request
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void updateKakaoResendResult() throws Exception {
|
||||
long startTime = System.currentTimeMillis();
|
||||
// 대체문자 대상 조회
|
||||
List<MjonMsgVO> resendLogList = mjonMsgDataDAO.selectBizResendLogList();
|
||||
for(MjonMsgVO vo : resendLogList) {
|
||||
if("4100".equals(vo.getResultCode())
|
||||
|| "6600".equals(vo.getResultCode())
|
||||
|| "7000".equals(vo.getResultCode())) {
|
||||
vo.setMsgResult("40");
|
||||
}else {
|
||||
vo.setMsgResult("50");
|
||||
}
|
||||
mjonMsgDataDAO.updateResendResult(vo);
|
||||
mjonMsgDataDAO.deleteBizResendLog(vo);
|
||||
}
|
||||
long endTime = System.currentTimeMillis();
|
||||
long elapsedTime = (endTime - startTime) / 1000; // 초 단위 변환
|
||||
System.out.println("updateKakaoResendResult 실행 시간: " + elapsedTime + "초 (" + resendLogList.size() + "건 처리)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,6 @@ public class JoinSettingVO {
|
||||
private String slackNoti; //관리자 SLACK 알림 여부
|
||||
private String smishingNoti; //첫결제(카드제외) 스미싱의심 알림 여부
|
||||
private String holiSmishingNoti; //야간 스미싱알림 여부
|
||||
private String smsNotiIfOverFifty; //50건이상 문자발송 시 안내문자 발송
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -121,4 +121,5 @@ public interface EgovLoginService {
|
||||
//비밀번호 실패 횟수 조회
|
||||
public LoginVO selectPassMiss(LoginVO vo) throws Exception;
|
||||
|
||||
public KmcVO kmcDecryption(HttpServletRequest request, KmcVO kmcVO);
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@ import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import itn.com.cmm.LoginVO;
|
||||
import itn.let.mjo.pay.service.KmcVO;
|
||||
import itn.let.uat.uia.service.AuthCertVO;
|
||||
import itn.let.uat.uia.service.EgovLoginService;
|
||||
import itn.let.uss.umt.service.UserManageVO;
|
||||
import itn.let.utl.fcc.service.EgovNumberUtil;
|
||||
@ -319,6 +318,240 @@ public class EgovLoginServiceImpl extends EgovAbstractServiceImpl implements
|
||||
return loginDAO.selectPassMiss(vo);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public KmcVO kmcDecryption(HttpServletRequest request, KmcVO kmcVO) {
|
||||
|
||||
|
||||
|
||||
String rec_cert = request.getParameter("rec_cert").trim();
|
||||
String certNum = request.getParameter("certNum").trim();
|
||||
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
kmcVO.setCertNum(certNum);
|
||||
// 파라미터 유효성 검증
|
||||
if (rec_cert.length() == 0 || certNum.length() == 0) {
|
||||
kmcVO.setErrMessage("비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
// 변수선언
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
String k_certNum = ""; // 파라미터로 수신한 요청번호
|
||||
k_certNum = certNum;
|
||||
String date = ""; // 요청일시
|
||||
String CI = ""; // 연계정보(CI)
|
||||
String DI = ""; // 중복가입확인정보(DI)
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사
|
||||
String birthDay = ""; // 생년월일
|
||||
String gender = ""; // 성별
|
||||
String nation = ""; // 내국인
|
||||
String name = ""; // 성명
|
||||
String M_name = ""; // 미성년자 성명
|
||||
String M_birthDay = ""; // 미성년자 생년월일
|
||||
String M_Gender = ""; // 미성년자 성별
|
||||
String M_nation = ""; // 미성년자 내외국인
|
||||
String result = ""; // 결과값
|
||||
|
||||
String certMet = ""; // 인증방법
|
||||
String ip = ""; // ip주소
|
||||
String plusInfo = "";
|
||||
|
||||
String encPara = "";
|
||||
String encMsg1 = "";
|
||||
String encMsg2 = "";
|
||||
String msgChk = "";
|
||||
|
||||
IcertSecuManager seed = new IcertSecuManager();
|
||||
|
||||
// 02. 1차 복호화
|
||||
// 수신된 certNum를 이용하여 복호화
|
||||
rec_cert = seed.getDec(rec_cert, k_certNum);
|
||||
|
||||
// 03. 1차 파싱
|
||||
int inf1 = rec_cert.indexOf("/", 0);
|
||||
int inf2 = rec_cert.indexOf("/", inf1 + 1);
|
||||
|
||||
encPara = rec_cert.substring(0, inf1); // 암호화된 통합 파라미터
|
||||
encMsg1 = rec_cert.substring(inf1 + 1, inf2); // 암호화된 통합 파라미터의 Hash값
|
||||
|
||||
// 04. 위변조 검증
|
||||
encMsg2 = seed.getMsg(encPara);
|
||||
kmcVO.setEncMsg2(encMsg2);
|
||||
if (encMsg2.equals(encMsg1)) {
|
||||
msgChk = "Y";
|
||||
}
|
||||
|
||||
if (!"Y".equals(msgChk)) {
|
||||
kmcVO.setErrMessage("비정상접근입니다.");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
// 05. 2차 복호화
|
||||
rec_cert = seed.getDec(encPara, k_certNum);
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
// 06. 2차 파싱
|
||||
int info1 = rec_cert.indexOf("/", 0);
|
||||
int info2 = rec_cert.indexOf("/", info1 + 1);
|
||||
int info3 = rec_cert.indexOf("/", info2 + 1);
|
||||
int info4 = rec_cert.indexOf("/", info3 + 1);
|
||||
int info5 = rec_cert.indexOf("/", info4 + 1);
|
||||
int info6 = rec_cert.indexOf("/", info5 + 1);
|
||||
int info7 = rec_cert.indexOf("/", info6 + 1);
|
||||
int info8 = rec_cert.indexOf("/", info7 + 1);
|
||||
int info9 = rec_cert.indexOf("/", info8 + 1);
|
||||
int info10 = rec_cert.indexOf("/", info9 + 1);
|
||||
int info11 = rec_cert.indexOf("/", info10 + 1);
|
||||
int info12 = rec_cert.indexOf("/", info11 + 1);
|
||||
int info13 = rec_cert.indexOf("/", info12 + 1);
|
||||
int info14 = rec_cert.indexOf("/", info13 + 1);
|
||||
int info15 = rec_cert.indexOf("/", info14 + 1);
|
||||
int info16 = rec_cert.indexOf("/", info15 + 1);
|
||||
int info17 = rec_cert.indexOf("/", info16 + 1);
|
||||
int info18 = rec_cert.indexOf("/", info17 + 1);
|
||||
|
||||
certNum = rec_cert.substring(0, info1);
|
||||
kmcVO.setCertNum(certNum);
|
||||
date = rec_cert.substring(info1 + 1, info2);
|
||||
kmcVO.setDate(date);
|
||||
CI = rec_cert.substring(info2 + 1, info3);
|
||||
kmcVO.setCI(CI);
|
||||
phoneNo = rec_cert.substring(info3 + 1, info4);
|
||||
kmcVO.setPhoneNo(phoneNo);
|
||||
phoneCorp = rec_cert.substring(info4 + 1, info5);
|
||||
kmcVO.setPhoneCorp(phoneCorp);
|
||||
birthDay = rec_cert.substring(info5 + 1, info6);
|
||||
kmcVO.setBirthDay(birthDay);
|
||||
gender = rec_cert.substring(info6 + 1, info7);
|
||||
kmcVO.setGender(gender);
|
||||
nation = rec_cert.substring(info7 + 1, info8);
|
||||
kmcVO.setNation(nation);
|
||||
name = rec_cert.substring(info8 + 1, info9);
|
||||
kmcVO.setName(name);
|
||||
result = rec_cert.substring(info9 + 1, info10);
|
||||
kmcVO.setResult(result);
|
||||
certMet = rec_cert.substring(info10 + 1, info11);
|
||||
kmcVO.setCertMet(certMet);
|
||||
ip = rec_cert.substring(info11 + 1, info12);
|
||||
kmcVO.setIp(ip);
|
||||
M_name = rec_cert.substring(info12 + 1, info13);
|
||||
kmcVO.setMName(M_name);
|
||||
M_birthDay = rec_cert.substring(info13 + 1, info14);
|
||||
kmcVO.setMBirthDay(M_birthDay);
|
||||
M_Gender = rec_cert.substring(info14 + 1, info15);
|
||||
kmcVO.setMGender(M_Gender);
|
||||
M_nation = rec_cert.substring(info15 + 1, info16);
|
||||
kmcVO.setMNation(M_nation);
|
||||
plusInfo = rec_cert.substring(info16 + 1, info17);
|
||||
kmcVO.setPlusInfo(plusInfo);
|
||||
DI = rec_cert.substring(info17 + 1, info18);
|
||||
kmcVO.setDI(DI);
|
||||
|
||||
// 07. CI, DI 복호화
|
||||
CI = seed.getDec(CI, k_certNum);
|
||||
kmcVO.setCI(CI);
|
||||
DI = seed.getDec(DI, k_certNum);
|
||||
kmcVO.setDI(DI);
|
||||
|
||||
if ("Y".equals(result)) {
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------
|
||||
String regex = "";
|
||||
if (certNum.length() == 0 || certNum.length() > 40) {
|
||||
kmcVO.setErrMessage("요청번호 비정상.");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (date.length() != 14 || !this.paramChk(regex, date)) {
|
||||
kmcVO.setErrMessage("요청일시");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (certMet.length() != 1 || !this.paramChk(regex, certMet)) {
|
||||
kmcVO.setErrMessage("본인인증방법 비정상" + certMet);
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if ((phoneNo.length() != 10 && phoneNo.length() != 11) || !this.paramChk(regex, phoneNo)) {
|
||||
kmcVO.setErrMessage("휴대폰번호 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (phoneCorp.length() != 3 || !this.paramChk(regex, phoneCorp)) {
|
||||
kmcVO.setErrMessage("이동통신사 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (birthDay.length() != 8 || !this.paramChk(regex, birthDay)) {
|
||||
kmcVO.setErrMessage("생년월일 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (gender.length() != 1 || !this.paramChk(regex, gender)) {
|
||||
kmcVO.setErrMessage("성별 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (nation.length() != 1 || !this.paramChk(regex, nation)) {
|
||||
kmcVO.setErrMessage("내/외국인 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-<2D>R.,-]*";
|
||||
if (name.length() > 60 || !this.paramChk(regex, name)) {
|
||||
kmcVO.setErrMessage("성명 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (result.length() != 1 || !this.paramChk(regex, result)) {
|
||||
kmcVO.setErrMessage("결과값 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-?.,-]*";
|
||||
if (M_name.length() != 0) {
|
||||
if (M_name.length() > 60 || !this.paramChk(regex, M_name)) {
|
||||
kmcVO.setErrMessage("미성년자 성명 비정상");
|
||||
return kmcVO;
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_birthDay.length() != 0) {
|
||||
if (M_birthDay.length() != 8 || !this.paramChk(regex, M_birthDay)) {
|
||||
kmcVO.setErrMessage("미성년자 생년월일 비정상");
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_Gender.length() != 0) {
|
||||
if (M_Gender.length() != 1 || !paramChk(regex, M_Gender)) {
|
||||
kmcVO.setErrMessage("미성년자 성별 비정상");
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_nation.length() != 0) {
|
||||
if (M_nation.length() != 1 || !this.paramChk(regex, M_nation)) {
|
||||
kmcVO.setErrMessage("미성년자 내/외국인 비정상");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
|
||||
public Boolean paramChk(String patn, String param) {
|
||||
Pattern pattern = Pattern.compile(patn);
|
||||
Matcher matcher = pattern.matcher(param);
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
package itn.let.uat.uia.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -16,16 +11,14 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import itn.com.cmm.util.StringUtil;
|
||||
import itn.com.uss.olh.hpc.service.HackIpService;
|
||||
import itn.com.uss.olh.hpc.service.HackIpVO;
|
||||
import itn.com.utl.fcc.service.EgovStringUtil;
|
||||
import itn.let.mjo.msgdata.service.MjonMsgDataService;
|
||||
import itn.let.mjo.cert.service.CertVO;
|
||||
import itn.let.mjo.msgsent.service.MjonMsgSentVO;
|
||||
import itn.let.mjo.pay.service.KmcVO;
|
||||
import itn.let.sec.rgm.service.AuthorGroup;
|
||||
import itn.let.sec.rgm.service.EgovAuthorGroupService;
|
||||
import itn.let.sym.site.service.JoinSettingVO;
|
||||
import itn.let.uat.uia.service.AuthCertVO;
|
||||
import itn.let.uss.umt.service.AdmProcHstryVO;
|
||||
import itn.let.uss.umt.service.EgovMberManageService;
|
||||
@ -89,10 +82,6 @@ public class EgovMberManageServiceImpl extends EgovAbstractServiceImpl implement
|
||||
@Resource(name = "hackIpService")
|
||||
private HackIpService hackIpService;
|
||||
|
||||
/* MjonMsgDataService */
|
||||
@Resource(name = "MjonMsgDataService")
|
||||
private MjonMsgDataService mjonMsgDataService;
|
||||
|
||||
|
||||
@Override
|
||||
public int insertMber(MberManageVO mberManageVO) throws Exception {
|
||||
@ -632,71 +621,4 @@ public class EgovMberManageServiceImpl extends EgovAbstractServiceImpl implement
|
||||
return mberManageDAO.findTopByregDateFromCertLog(authCertVO);
|
||||
}
|
||||
|
||||
public MberManageVO selectMberHeaderInfo(String mberId) throws Exception {
|
||||
//회원 단가, 이벤트 단가, 이벤트 종료일 등 조회
|
||||
MberManageVO headerInfo = mberManageDAO.selectMberHeaderInfo(mberId);
|
||||
//기본 단가 조회
|
||||
JoinSettingVO sysPrice = mjonMsgDataService.selectJoinSettingInfo();
|
||||
|
||||
//이벤트 종료까지 남은 일 수 계산
|
||||
long eventLeftDay = calculateEventLeftDay(headerInfo.getEventEndDate());
|
||||
headerInfo.setEventLeftDay(String.valueOf(eventLeftDay));
|
||||
|
||||
//이벤트 유무에 따라 이벤트 잔액 or 잔액 사용
|
||||
boolean isEventActive = eventLeftDay > 0;
|
||||
double money = isEventActive ? headerInfo.getEventRemainCash() : headerInfo.getUserMoney();
|
||||
|
||||
//이벤트, 회원 단가가 0일 시 기본 단가 사용
|
||||
setPrices(headerInfo, sysPrice, isEventActive);
|
||||
|
||||
//발송가능 건수 조회
|
||||
calculateAvailableCounts(headerInfo, money);
|
||||
|
||||
return headerInfo;
|
||||
}
|
||||
|
||||
private long calculateEventLeftDay(String eventEndDateStr) {
|
||||
if (StringUtil.isEmpty(eventEndDateStr)) return 0;
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalDate eventEndDate = LocalDate.parse(eventEndDateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
return ChronoUnit.DAYS.between(today, eventEndDate);
|
||||
}
|
||||
|
||||
private void setPrices(MberManageVO headerInfo, JoinSettingVO sysPrice, boolean isEventActive) {
|
||||
if (isEventActive) {
|
||||
headerInfo.setHeaderShortPrice(priceChk(headerInfo.getEventShortPrice(), sysPrice.getShortPrice()));
|
||||
headerInfo.setHeaderLongPrice(priceChk(headerInfo.getEventLongPrice(), sysPrice.getLongPrice()));
|
||||
headerInfo.setHeaderPicturePrice(priceChk(headerInfo.getEventPicturePrice(), sysPrice.getPicturePrice()));
|
||||
headerInfo.setHeaderPicture2Price(priceChk(headerInfo.getEventPicture2Price(), sysPrice.getPicture2Price()));
|
||||
headerInfo.setHeaderPicture3Price(priceChk(headerInfo.getEventPicture3Price(), sysPrice.getPicture3Price()));
|
||||
} else {
|
||||
headerInfo.setHeaderShortPrice(priceChk(headerInfo.getShortPrice(), sysPrice.getShortPrice()));
|
||||
headerInfo.setHeaderLongPrice(priceChk(headerInfo.getLongPrice(), sysPrice.getLongPrice()));
|
||||
headerInfo.setHeaderPicturePrice(priceChk(headerInfo.getPicturePrice(), sysPrice.getPicturePrice()));
|
||||
headerInfo.setHeaderPicture2Price(priceChk(headerInfo.getPicture2Price(), sysPrice.getPicture2Price()));
|
||||
headerInfo.setHeaderPicture3Price(priceChk(headerInfo.getPicture3Price(), sysPrice.getPicture3Price()));
|
||||
}
|
||||
// 카카오, 팩스 단가는 기본 단가 고정
|
||||
headerInfo.setHeaderKakaoAtPrice(sysPrice.getKakaoAtPrice());
|
||||
headerInfo.setHeaderFaxPrice(sysPrice.getFaxPrice());
|
||||
}
|
||||
|
||||
private float priceChk(float price, float sysPrice) {
|
||||
return price > 0 ? price : sysPrice;
|
||||
}
|
||||
|
||||
private void calculateAvailableCounts(MberManageVO headerInfo, double money) {
|
||||
headerInfo.setHeaderShortCnt(calcCount(money, headerInfo.getHeaderShortPrice()));
|
||||
headerInfo.setHeaderLongCnt(calcCount(money, headerInfo.getHeaderLongPrice()));
|
||||
headerInfo.setHeaderPictureCnt(calcCount(money, headerInfo.getHeaderPicturePrice()));
|
||||
headerInfo.setHeaderPicture2Cnt(calcCount(money, headerInfo.getHeaderPicture2Price()));
|
||||
headerInfo.setHeaderPicture3Cnt(calcCount(money, headerInfo.getHeaderPicture3Price()));
|
||||
headerInfo.setHeaderKakaoAtCnt(calcCount(money, headerInfo.getHeaderKakaoAtPrice()));
|
||||
headerInfo.setHeaderFaxCnt(calcCount(money, headerInfo.getHeaderFaxPrice()));
|
||||
}
|
||||
|
||||
private int calcCount(double money, double price) {
|
||||
if (price <= 0) return 0;
|
||||
return (int) Math.floor(money / price);
|
||||
}
|
||||
}
|
||||
@ -345,8 +345,5 @@ public class MberManageDAO extends EgovComAbstractDAO{
|
||||
public String findTopByregDateFromCertLog(AuthCertVO authCertVO) {
|
||||
return (String)select("mberManageDAO.findTopByregDateFromCertLog", authCertVO);
|
||||
}
|
||||
|
||||
public MberManageVO selectMberHeaderInfo(String mberId) {
|
||||
return (MberManageVO) select("mberManageDAO.selectMberHeaderInfo", mberId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -253,7 +253,7 @@ public class EgovLoginController {
|
||||
private CertIpService certIpService;
|
||||
|
||||
@Resource(name = "KmcCertChecker")
|
||||
private KmcCertChecker kmcCertChecker;
|
||||
private KmcCertChecker kmcCertCheck;
|
||||
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MjonMsgDataController.class);
|
||||
@ -336,7 +336,7 @@ public class EgovLoginController {
|
||||
|
||||
MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO();
|
||||
mberCertPhoneVO.setTrUrl("/web/cop/kmc/authRequestAjax.do");
|
||||
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request);
|
||||
AuthCertVO certVO = kmcCertCheck.authCertCheck(mberCertPhoneVO, request);
|
||||
|
||||
model.addAttribute("tr_cert", certVO.getTr_cert());
|
||||
model.addAttribute("tr_url", certVO.getTr_url());
|
||||
@ -385,7 +385,7 @@ public class EgovLoginController {
|
||||
mberCertPhoneVO.setNation(mberManageVO.getNationality());
|
||||
mberCertPhoneVO.setBirthDay(mberManageVO.getBirth());
|
||||
|
||||
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request);
|
||||
AuthCertVO certVO = kmcCertCheck.authCertCheck(mberCertPhoneVO, request);
|
||||
|
||||
// AuthCertVO certVO = kmcCertCheck.authCertCheckTwo(serverNm + "/web/cop/kmc/authRequestAjax.do",
|
||||
// mberManageVO.getMberNm(), mberManageVO.getMoblphonNo(), mberManageVO.getSexdstnCode(),
|
||||
@ -4035,7 +4035,7 @@ public class EgovLoginController {
|
||||
}
|
||||
mberCertPhoneVO.setPlusInfo(plusInfo);
|
||||
|
||||
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request);
|
||||
AuthCertVO certVO = kmcCertCheck.authCertCheck(mberCertPhoneVO, request);
|
||||
|
||||
modelAndView.addObject("tr_cert", certVO.getTr_cert());
|
||||
modelAndView.addObject("tr_url", certVO.getTr_url());
|
||||
@ -4060,26 +4060,22 @@ public class EgovLoginController {
|
||||
*/
|
||||
|
||||
@RequestMapping("/web/cop/kmc/authRequestFindIdPwAjax.do")
|
||||
public String authRequestFindIdPwAjax(HttpServletRequest request, HttpServletResponse response, ModelMap model,
|
||||
public String authRequestFindIdPwAjax(HttpServletRequest request, ModelMap model,
|
||||
@RequestParam Map<String, Object> commandMap, @ModelAttribute("searchVO") KmcVO kmcVO,
|
||||
RedirectAttributes redirectAttributes) throws Exception {
|
||||
|
||||
// KmcVO kmcRVO = loginService.kmcDecryption(request, kmcVO);
|
||||
//kmc 본인인증 결과처리
|
||||
kmcVO = kmcCertChecker.authCertResult(request, response, model);
|
||||
//kmc 본인인증 로그 처리
|
||||
AuthCertVO certVO = kmcCertChecker.insertCertLog(kmcVO, "KMC_아이디패스워드찾기");
|
||||
KmcVO kmcRVO = loginService.kmcDecryption(request, kmcVO);
|
||||
|
||||
String msg = "";
|
||||
if (!findIdKmcCheck(kmcVO.getDI(), kmcVO.getName(), kmcVO.getPhoneNo())) {
|
||||
if (!findIdKmcCheck(kmcRVO.getDI(), kmcRVO.getName(), kmcRVO.getPhoneNo())) {
|
||||
msg = "일치하는 정보가 없습니다.";
|
||||
redirectAttributes.addFlashAttribute("message", msg);
|
||||
return "redirect:/web/user/findUserId.do";
|
||||
}
|
||||
|
||||
// kmcRVO.setCertType("KMC_아이디패스워드찾기");
|
||||
// // 디비 테이블에 저장하기
|
||||
// mberManageService.insertCertInfoLogBn(kmcRVO);
|
||||
kmcRVO.setCertType("KMC_아이디패스워드찾기");
|
||||
// 디비 테이블에 저장하기
|
||||
mberManageService.insertCertInfoLogBn(kmcRVO);
|
||||
|
||||
model.addAttribute("kmcVO", kmcVO);
|
||||
return "web/login/findUserIdKmcReqPage";
|
||||
@ -4096,24 +4092,18 @@ public class EgovLoginController {
|
||||
* @discription 관리자 로그인 DN 값 최초 등록
|
||||
*/
|
||||
@RequestMapping("/web/cop/kmc/authRequestSelfLoginAjax.do")
|
||||
public String authRequestSelfLoginAjax(HttpServletRequest request, HttpServletResponse response, ModelMap model,
|
||||
public String authRequestSelfLoginAjax(HttpServletRequest request, ModelMap model,
|
||||
@RequestParam Map<String, Object> commandMap, @ModelAttribute("searchVO") KmcVO kmcVO,
|
||||
RedirectAttributes redirectAttributes, HttpSession session) throws Exception {
|
||||
|
||||
UserManageVO userManageVO = new UserManageVO();
|
||||
|
||||
// KmcVO kmcRVO = loginService.kmcDecryption(request, kmcVO);
|
||||
|
||||
//kmc 본인인증 결과처리
|
||||
kmcVO = kmcCertChecker.authCertResult(request, response, model);
|
||||
//kmc 본인인증 로그 처리
|
||||
AuthCertVO certVO = kmcCertChecker.insertCertLog(kmcVO, "KMC_아이디패스워드찾기");
|
||||
|
||||
KmcVO kmcRVO = loginService.kmcDecryption(request, kmcVO);
|
||||
|
||||
userManageVO.setCrtfcDnValue(kmcVO.getDI());
|
||||
userManageVO.setEmplyrNm(kmcVO.getName());
|
||||
userManageVO.setEmplyrId(kmcVO.getPlusInfo().split(",,,")[0]);
|
||||
userManageVO.setPassword(kmcVO.getPlusInfo().split(",,,")[1]);
|
||||
userManageVO.setCrtfcDnValue(kmcRVO.getDI());
|
||||
userManageVO.setEmplyrNm(kmcRVO.getName());
|
||||
userManageVO.setEmplyrId(kmcRVO.getPlusInfo().split(",,,")[0]);
|
||||
userManageVO.setPassword(kmcRVO.getPlusInfo().split(",,,")[1]);
|
||||
|
||||
userManageService.updateCrtfcDnValue(userManageVO);
|
||||
|
||||
@ -4131,20 +4121,20 @@ public class EgovLoginController {
|
||||
e.printStackTrace();
|
||||
// TODO: handle exception
|
||||
}
|
||||
// kmcRVO.setCertType("KMC_관리자미인증IP접속인증");
|
||||
// // 디비 테이블에 저장하기
|
||||
//
|
||||
// try {
|
||||
// mberManageService.insertCertInfoLogBn(kmcRVO);
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
// System.out.println("!!!!!!!!!!!!!!!!!");
|
||||
// e.printStackTrace();
|
||||
// // TODO: handle exception
|
||||
// }
|
||||
kmcRVO.setCertType("KMC_관리자미인증IP접속인증");
|
||||
// 디비 테이블에 저장하기
|
||||
|
||||
try {
|
||||
mberManageService.insertCertInfoLogBn(kmcRVO);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println("!!!!!!!!!!!!!!!!!");
|
||||
e.printStackTrace();
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
|
||||
model.addAttribute("kmcVO", kmcVO);
|
||||
model.addAttribute("kmcVO", kmcRVO);
|
||||
|
||||
System.out.println("======================================");
|
||||
model.addAttribute("userManageVO", userManageVO);
|
||||
@ -5435,7 +5425,7 @@ public class EgovLoginController {
|
||||
mberCertPhoneVO.setNation(KMCInfoVO.getNationality());
|
||||
mberCertPhoneVO.setPlusInfo(loginVO.getId());
|
||||
|
||||
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request);
|
||||
AuthCertVO certVO = kmcCertCheck.authCertCheck(mberCertPhoneVO, request);
|
||||
|
||||
modelAndView.addObject("tr_cert", certVO.getTr_cert());
|
||||
modelAndView.addObject("tr_url", certVO.getTr_url());
|
||||
@ -5456,19 +5446,245 @@ public class EgovLoginController {
|
||||
*
|
||||
*/
|
||||
@RequestMapping("/web/cop/kmc/insertIPAjax.do")
|
||||
public String insertIPAjax(HttpServletRequest request, HttpServletResponse response, ModelMap model, @RequestParam Map<String, Object> commandMap,
|
||||
public String insertIPAjax(HttpServletRequest request, ModelMap model, @RequestParam Map<String, Object> commandMap,
|
||||
@ModelAttribute("searchVO") KmcVO kmcVO) throws Exception {
|
||||
|
||||
//kmc 본인인증 결과처리
|
||||
kmcVO = kmcCertChecker.authCertResult(request, response, model);
|
||||
//kmc 본인인증 로그 처리
|
||||
AuthCertVO certVO = kmcCertChecker.insertCertLog(kmcVO, "IP등록");
|
||||
|
||||
String errMessage = ""; // 에러메세지
|
||||
|
||||
String rec_cert = ""; // 결과값(암호화)
|
||||
String certNum = ""; // certNum
|
||||
|
||||
rec_cert = request.getParameter("rec_cert").trim();
|
||||
certNum = request.getParameter("certNum").trim();
|
||||
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
kmcVO.setCertNum(certNum);
|
||||
// 파라미터 유효성 검증
|
||||
if (rec_cert.length() == 0 || certNum.length() == 0) {
|
||||
errMessage = "비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
// 변수선언
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
String k_certNum = ""; // 파라미터로 수신한 요청번호
|
||||
k_certNum = certNum;
|
||||
String date = ""; // 요청일시
|
||||
String CI = ""; // 연계정보(CI)
|
||||
String DI = ""; // 중복가입확인정보(DI)
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사
|
||||
String birthDay = ""; // 생년월일
|
||||
String gender = ""; // 성별
|
||||
String nation = ""; // 내국인
|
||||
String name = ""; // 성명
|
||||
String M_name = ""; // 미성년자 성명
|
||||
String M_birthDay = ""; // 미성년자 생년월일
|
||||
String M_Gender = ""; // 미성년자 성별
|
||||
String M_nation = ""; // 미성년자 내외국인
|
||||
String result = ""; // 결과값
|
||||
|
||||
String certMet = ""; // 인증방법
|
||||
String ip = ""; // ip주소
|
||||
String plusInfo = "";
|
||||
|
||||
String encPara = "";
|
||||
String encMsg1 = "";
|
||||
String encMsg2 = "";
|
||||
String msgChk = "";
|
||||
|
||||
com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager();
|
||||
|
||||
// 02. 1차 복호화
|
||||
// 수신된 certNum를 이용하여 복호화
|
||||
rec_cert = seed.getDec(rec_cert, k_certNum);
|
||||
|
||||
// 03. 1차 파싱
|
||||
int inf1 = rec_cert.indexOf("/", 0);
|
||||
int inf2 = rec_cert.indexOf("/", inf1 + 1);
|
||||
|
||||
encPara = rec_cert.substring(0, inf1); // 암호화된 통합 파라미터
|
||||
encMsg1 = rec_cert.substring(inf1 + 1, inf2); // 암호화된 통합 파라미터의 Hash값
|
||||
|
||||
// 04. 위변조 검증
|
||||
encMsg2 = seed.getMsg(encPara);
|
||||
kmcVO.setEncMsg2(encMsg2);
|
||||
if (encMsg2.equals(encMsg1)) {
|
||||
msgChk = "Y";
|
||||
}
|
||||
|
||||
if (!"Y".equals(msgChk)) {
|
||||
errMessage = "비정상접근입니다.";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
// 05. 2차 복호화
|
||||
rec_cert = seed.getDec(encPara, k_certNum);
|
||||
kmcVO.setRecCert(rec_cert);
|
||||
// 06. 2차 파싱
|
||||
int info1 = rec_cert.indexOf("/", 0);
|
||||
int info2 = rec_cert.indexOf("/", info1 + 1);
|
||||
int info3 = rec_cert.indexOf("/", info2 + 1);
|
||||
int info4 = rec_cert.indexOf("/", info3 + 1);
|
||||
int info5 = rec_cert.indexOf("/", info4 + 1);
|
||||
int info6 = rec_cert.indexOf("/", info5 + 1);
|
||||
int info7 = rec_cert.indexOf("/", info6 + 1);
|
||||
int info8 = rec_cert.indexOf("/", info7 + 1);
|
||||
int info9 = rec_cert.indexOf("/", info8 + 1);
|
||||
int info10 = rec_cert.indexOf("/", info9 + 1);
|
||||
int info11 = rec_cert.indexOf("/", info10 + 1);
|
||||
int info12 = rec_cert.indexOf("/", info11 + 1);
|
||||
int info13 = rec_cert.indexOf("/", info12 + 1);
|
||||
int info14 = rec_cert.indexOf("/", info13 + 1);
|
||||
int info15 = rec_cert.indexOf("/", info14 + 1);
|
||||
int info16 = rec_cert.indexOf("/", info15 + 1);
|
||||
int info17 = rec_cert.indexOf("/", info16 + 1);
|
||||
int info18 = rec_cert.indexOf("/", info17 + 1);
|
||||
|
||||
certNum = rec_cert.substring(0, info1);
|
||||
kmcVO.setCertNum(certNum);
|
||||
date = rec_cert.substring(info1 + 1, info2);
|
||||
kmcVO.setDate(date);
|
||||
CI = rec_cert.substring(info2 + 1, info3);
|
||||
kmcVO.setCI(CI);
|
||||
phoneNo = rec_cert.substring(info3 + 1, info4);
|
||||
kmcVO.setPhoneNo(phoneNo);
|
||||
phoneCorp = rec_cert.substring(info4 + 1, info5);
|
||||
kmcVO.setPhoneCorp(phoneCorp);
|
||||
birthDay = rec_cert.substring(info5 + 1, info6);
|
||||
kmcVO.setBirthDay(birthDay);
|
||||
gender = rec_cert.substring(info6 + 1, info7);
|
||||
kmcVO.setGender(gender);
|
||||
nation = rec_cert.substring(info7 + 1, info8);
|
||||
kmcVO.setNation(nation);
|
||||
name = rec_cert.substring(info8 + 1, info9);
|
||||
kmcVO.setName(name);
|
||||
result = rec_cert.substring(info9 + 1, info10);
|
||||
kmcVO.setResult(result);
|
||||
certMet = rec_cert.substring(info10 + 1, info11);
|
||||
kmcVO.setCertMet(certMet);
|
||||
ip = rec_cert.substring(info11 + 1, info12);
|
||||
kmcVO.setIp(ip);
|
||||
M_name = rec_cert.substring(info12 + 1, info13);
|
||||
kmcVO.setMName(M_name);
|
||||
M_birthDay = rec_cert.substring(info13 + 1, info14);
|
||||
kmcVO.setMBirthDay(M_birthDay);
|
||||
M_Gender = rec_cert.substring(info14 + 1, info15);
|
||||
kmcVO.setMGender(M_Gender);
|
||||
M_nation = rec_cert.substring(info15 + 1, info16);
|
||||
kmcVO.setMNation(M_nation);
|
||||
plusInfo = rec_cert.substring(info16 + 1, info17);
|
||||
kmcVO.setPlusInfo(plusInfo);
|
||||
DI = rec_cert.substring(info17 + 1, info18);
|
||||
kmcVO.setDI(DI);
|
||||
|
||||
// 07. CI, DI 복호화
|
||||
CI = seed.getDec(CI, k_certNum);
|
||||
kmcVO.setCI(CI);
|
||||
DI = seed.getDec(DI, k_certNum);
|
||||
kmcVO.setDI(DI);
|
||||
|
||||
if ("Y".equals(result)) {
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------
|
||||
String regex = "";
|
||||
if (certNum.length() == 0 || certNum.length() > 40) {
|
||||
errMessage = "요청번호 비정상.";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (date.length() != 14 || !paramChk(regex, date)) {
|
||||
errMessage = "요청일시";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (certMet.length() != 1 || !paramChk(regex, certMet)) {
|
||||
errMessage = "본인인증방법 비정상" + certMet;
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if ((phoneNo.length() != 10 && phoneNo.length() != 11) || !paramChk(regex, phoneNo)) {
|
||||
errMessage = "휴대폰번호 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (phoneCorp.length() != 3 || !paramChk(regex, phoneCorp)) {
|
||||
errMessage = "이동통신사 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (birthDay.length() != 8 || !paramChk(regex, birthDay)) {
|
||||
errMessage = "생년월일 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (gender.length() != 1 || !paramChk(regex, gender)) {
|
||||
errMessage = "성별 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (nation.length() != 1 || !paramChk(regex, nation)) {
|
||||
errMessage = "내/외국인 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-<2D>R.,-]*";
|
||||
if (name.length() > 60 || !paramChk(regex, name)) {
|
||||
errMessage = "성명 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[A-Z]*";
|
||||
if (result.length() != 1 || !paramChk(regex, result)) {
|
||||
errMessage = "결과값 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
|
||||
regex = "[\\sA-Za-z가-?.,-]*";
|
||||
if (M_name.length() != 0) {
|
||||
if (M_name.length() > 60 || !paramChk(regex, M_name)) {
|
||||
errMessage = "미성년자 성명 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_birthDay.length() != 0) {
|
||||
if (M_birthDay.length() != 8 || !paramChk(regex, M_birthDay)) {
|
||||
errMessage = "미성년자 생년월일 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_Gender.length() != 0) {
|
||||
if (M_Gender.length() != 1 || !paramChk(regex, M_Gender)) {
|
||||
errMessage = "미성년자 성별 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
|
||||
regex = "[0-9]*";
|
||||
if (M_nation.length() != 0) {
|
||||
if (M_nation.length() != 1 || !paramChk(regex, M_nation)) {
|
||||
errMessage = "미성년자 내/외국인 비정상";
|
||||
return returnPage(model, errMessage, kmcVO);
|
||||
}
|
||||
}
|
||||
LoginVO loginVO = new LoginVO();
|
||||
loginVO.setId(kmcVO.getPlusInfo());
|
||||
|
||||
loginVO.setId(plusInfo);
|
||||
loginVO = loginService.selectKMCInfo(loginVO);
|
||||
loginVO.setIp(kmcVO.getIp());
|
||||
String userIp = EgovClntInfo.getClntIP(request);
|
||||
loginVO.setIp(ip);
|
||||
|
||||
loginService.insertMberIp(loginVO);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -198,7 +198,7 @@ public class EgovMypageRESTAPIController{
|
||||
|
||||
List<ApiKeyVO> resultList = new ArrayList<ApiKeyVO>();
|
||||
resultList = apiKeyMngService.selectApiKeyApplyStatus(apiKeyVO);
|
||||
|
||||
System.out.println("=============");
|
||||
if (resultList.size()>0) {
|
||||
if(StringUtils.isNotEmpty(resultList.get(0).getFrstRegistPnttm()))
|
||||
{
|
||||
@ -250,31 +250,6 @@ public class EgovMypageRESTAPIController{
|
||||
return "web/api/apiSpec";
|
||||
}
|
||||
|
||||
@RequestMapping(value="/web/api/apiAtSpec.do")
|
||||
public String apiAtSpec(ModelMap model)
|
||||
throws Exception {
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
|
||||
if(loginVO == null) {
|
||||
return "redirect:/web/user/login/login.do";
|
||||
}
|
||||
model.addAttribute("loginVO", loginVO);
|
||||
|
||||
return "web/api/apiAtSpec";
|
||||
}
|
||||
@RequestMapping(value="/web/api/apiFtSpec.do")
|
||||
public String apiFtSpec(ModelMap model)
|
||||
throws Exception {
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
|
||||
if(loginVO == null) {
|
||||
return "redirect:/web/user/login/login.do";
|
||||
}
|
||||
model.addAttribute("loginVO", loginVO);
|
||||
|
||||
return "web/api/apiFtSpec";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param model
|
||||
* @return
|
||||
|
||||
@ -1,44 +1,29 @@
|
||||
package itn.let.uat.uia.web;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.servlet.FlashMap;
|
||||
import org.springframework.web.servlet.FlashMapManager;
|
||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||
|
||||
import com.icert.comm.secu.IcertSecuManager;
|
||||
|
||||
import itn.let.cert.phone.service.CertPhoneService;
|
||||
import itn.let.cert.phone.service.MberCertPhoneVO;
|
||||
import itn.let.mjo.pay.service.KmcVO;
|
||||
import itn.let.uat.uia.service.AuthCertVO;
|
||||
import itn.let.uss.umt.service.EgovMberManageService;
|
||||
import itn.let.uss.umt.service.MberManageVO;
|
||||
|
||||
@Component("KmcCertChecker")
|
||||
public class KmcCertChecker {
|
||||
|
||||
@Resource(name = "CertPhoneService")
|
||||
private CertPhoneService certPhoneService;
|
||||
|
||||
@Resource(name = "mberManageService")
|
||||
private EgovMberManageService mberManageService;
|
||||
|
||||
//회원가입 시 인증수단을 휴대폰 본인인증만 했을 경우 사용
|
||||
public AuthCertVO authCertCheck(
|
||||
@ -79,13 +64,11 @@ public class KmcCertChecker {
|
||||
String tr_add = "N"; // IFrame사용여부
|
||||
|
||||
//01. 한국모바일인증(주) 암호화 모듈 선언
|
||||
// IcertSecuManager seed = new IcertSecuManager();
|
||||
com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager();
|
||||
IcertSecuManager seed = new IcertSecuManager();
|
||||
|
||||
//02. 1차 암호화 (tr_cert 데이터변수 조합 후 암호화)
|
||||
String enc_tr_cert = "";
|
||||
tr_cert = cpId +"/"+ urlCode +"/"+ certNum +"/"+ date +"/"+ certMet +"/"+ birthDay +"/"+ gender +"/"+ name +"/"+ phoneNo +"/"+ phoneCorp +"/"+ nation +"/"+ plusInfo +"/"+ extendVar;
|
||||
// tr_cert = cpId +"/"+ urlCode +"/"+ certNum +"/"+ date +"/"+ certMet +"///////"+ plusInfo +"/"+ extendVar;
|
||||
enc_tr_cert = seed.getEnc(tr_cert, "");
|
||||
|
||||
//03. 1차 암호화 데이터에 대한 위변조 검증값 생성 (HMAC)
|
||||
@ -104,315 +87,7 @@ public class KmcCertChecker {
|
||||
return authCertVO;
|
||||
}
|
||||
|
||||
public KmcVO authCertResult(
|
||||
HttpServletRequest request
|
||||
, HttpServletResponse response
|
||||
, ModelMap model
|
||||
) throws IOException {
|
||||
|
||||
//크롬 SameSite정책 방지 - 도메인이 다른 타사로 이동 시 크롬 정책에 의해 세션 유실이 일어나는 경우가 있는데, 이를 방지하기 위해 samesite 보안을 none처리
|
||||
response.setHeader("Set-Cookie", "mberSession=mberSession; Secure; SameSite=None");
|
||||
|
||||
KmcVO kmcVO = new KmcVO(); //return VO
|
||||
|
||||
// 변수 -------------------------------------------------------------------------------------------------------------
|
||||
String api_token = ""; // 토큰값(암호화)
|
||||
String api_certNum = ""; // 요청번호(암호화)
|
||||
|
||||
String message = ""; // JSON 전문
|
||||
String result_cd = ""; // JSON 결과코드
|
||||
String result_msg = ""; // JSON 결과-상세
|
||||
String strResult = ""; // JSON 결과
|
||||
String apiRecCert = ""; // JSON 전송 데이터
|
||||
String apiCertNum = ""; // JSON 전송 데이터
|
||||
|
||||
String rec_cert = ""; // 결과수신DATA
|
||||
String k_certNum = ""; // 파라미터로 수신한 요청번호
|
||||
String certNum = ""; // 요청번호
|
||||
String date = ""; // 요청일시
|
||||
String CI = ""; // 연계정보(CI)
|
||||
String DI = ""; // 중복가입확인정보(DI)
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사
|
||||
String birth = ""; // 생년월일
|
||||
String gender = ""; // 성별
|
||||
String nation = ""; // 내국인
|
||||
String name = ""; // 성명
|
||||
String reserve1 = ""; // 예비필드
|
||||
String reserve2 = ""; // 예비필드
|
||||
String reserve3 = ""; // 예비필드
|
||||
String reserve4 = ""; // 예비필드
|
||||
String result = ""; // 결과값
|
||||
|
||||
String certMet = ""; // 인증방법
|
||||
String ip = ""; // ip주소
|
||||
String plusInfo = "";
|
||||
|
||||
String encPara = "";
|
||||
String encMsg1 = "";
|
||||
String encMsg2 = "";
|
||||
String msgChk = "";
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
try{
|
||||
// Parameter 수신 --------------------------------------------------------------------
|
||||
api_token = request.getParameter("apiToken").trim();
|
||||
api_certNum = request.getParameter("certNum");
|
||||
|
||||
// 파라미터 유효성 검증
|
||||
if( api_token.length() == 0 ){
|
||||
goErrorPage("토큰값 비정상", request, response);
|
||||
return kmcVO;
|
||||
}
|
||||
if( api_certNum.length() == 0 ){
|
||||
goErrorPage("요청번호 비정상", request, response);
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
//현재시각 세팅(YYYYMMDDHI24MISS)
|
||||
Calendar today = Calendar.getInstance();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String api_date = sdf.format(today.getTime());
|
||||
|
||||
//01. 암호화 모듈 (jar) Loading
|
||||
com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager();
|
||||
|
||||
//api_token, api_certNum 복호화
|
||||
api_token = seed.getDec(api_token, "");
|
||||
api_certNum = seed.getDec(api_certNum, "");
|
||||
|
||||
// 파라미터 유효성 검증
|
||||
if( api_token.length() == 0 ){
|
||||
goErrorPage("토큰값 비정상(복호화 후)", request, response);
|
||||
return kmcVO;
|
||||
}
|
||||
if( api_certNum.length() == 0 ){
|
||||
goErrorPage("요청번호 비정상(복호화 후)", request, response);
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
// 1. URL 설정
|
||||
String serverURL = "https://www.kmcert.com/kmcis/api/kmcisToken_api.jsp";
|
||||
|
||||
// 2. 연결 생성
|
||||
URL url = new URL(serverURL);
|
||||
|
||||
// 3. HttpURLConnection 객체 생성.
|
||||
HttpURLConnection con = null;
|
||||
OutputStream wr = null;
|
||||
BufferedReader bufferedReader = null;
|
||||
|
||||
// 4. URL 연결 (웹페이지 URL 연결.)
|
||||
con = (HttpURLConnection)url.openConnection();
|
||||
|
||||
con.setConnectTimeout(20000); // TimeOut 시간 (서버 접속시 연결 시간 - 20초)
|
||||
con.setReadTimeout(20000); // TimeOut 시간 (Read시 연결 시간 - 20초)
|
||||
con.setDoOutput(true); // OutputStream으로 POST 데이터를 넘겨주겠다는 옵션.
|
||||
|
||||
con.setRequestProperty("Content-Type", "application/json;charset=utf-8"); // 타입설정(application/json) 형식으로 전송 (Request Body 전달시 application/json로 서버에 전달.)
|
||||
con.setRequestProperty("Accept", "application/json"); // 서버 Response Data를 JSON 형식의 타입으로 요청.
|
||||
con.setRequestMethod("POST"); // 요청 방식 선택 (POST)
|
||||
|
||||
// 5. JSON 전문 구성
|
||||
|
||||
JSONObject jsonData = new JSONObject();
|
||||
|
||||
jsonData.put("apiToken", api_token);
|
||||
jsonData.put("apiDate", api_date);
|
||||
|
||||
message = jsonData.toString();
|
||||
|
||||
// 6. 전송
|
||||
// Request Body에 Data를 담기위해 OutputStream 객체를 생성.
|
||||
wr = con.getOutputStream();
|
||||
|
||||
// Request Body에 Data 셋팅.(한글깨짐 방지를 위해 utf-8인코딩 처리
|
||||
wr.write(message.getBytes("utf-8"));
|
||||
wr.flush();
|
||||
wr.close();
|
||||
|
||||
// 실제 서버로 Request 요청 하는 부분. (응답 코드를 받는다. 200 성공, 나머지 에러)
|
||||
int responseCode = con.getResponseCode();
|
||||
|
||||
// 4. 결과 수신
|
||||
if(responseCode == 200){
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
|
||||
}else{
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(con.getErrorStream(), "UTF-8"));
|
||||
}
|
||||
|
||||
if(bufferedReader != null){
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
String line = "";
|
||||
|
||||
while((line = bufferedReader.readLine()) != null){
|
||||
stringBuilder.append(line);
|
||||
}
|
||||
bufferedReader.close();
|
||||
|
||||
String stringRet = stringBuilder.toString();
|
||||
|
||||
// 5. 넘어온 문자열을 JSON 객체로 변환
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
|
||||
//JSON데이터를 넣어 JSON Object 로 만들어 준다.
|
||||
JSONObject jsonObj = (JSONObject)jsonParser.parse(stringRet);
|
||||
|
||||
// 6. JSON 객체에서 데이터 가져오기
|
||||
|
||||
if(jsonObj.get("result_cd") != null){
|
||||
result_cd = jsonObj.get("result_cd").toString();
|
||||
if("APR01".equals(result_cd)){
|
||||
//통신성공
|
||||
strResult = "Y";
|
||||
rec_cert = jsonObj.get("apiRecCert").toString();
|
||||
k_certNum = jsonObj.get("apiCertNum").toString();
|
||||
}else if("APR02".equals(result_cd)){
|
||||
//실패 - Token Expire
|
||||
strResult = "N";
|
||||
result_msg = "실패 - Token Expire";
|
||||
}else if("APR03".equals(result_cd)){
|
||||
//실패 - Token Not Found
|
||||
strResult = "N";
|
||||
result_msg = "실패 - Token Not Found";
|
||||
}else if("APR04".equals(result_cd)){
|
||||
//실패 - API 요청일시 길이 오류
|
||||
strResult = "N";
|
||||
result_msg = "실패 - API 요청일시 길이 오류";
|
||||
}else if("APR05".equals(result_cd)){
|
||||
//실패 - API 토큰 길이 오류
|
||||
strResult = "N";
|
||||
result_msg = "실패 - API 토큰 길이 오류";
|
||||
}else if("APR06".equals(result_cd)){
|
||||
//실패 - 결과전송 재요청(3회 제한)
|
||||
strResult = "N";
|
||||
result_msg = "실패 - 결과전송 재요청(3회 제한)";
|
||||
}
|
||||
}else{
|
||||
//JSON 결과코드 에러
|
||||
strResult = "F";
|
||||
}
|
||||
}else{ //timeout except 처리
|
||||
strResult = "F";
|
||||
}
|
||||
|
||||
// 파라미터 유효성 검증
|
||||
if(!strResult.equals("Y")){
|
||||
goErrorPage("결과값 비정상, 결과코드["+result_cd+"], "+"상세내용["+result_msg+"]", request, response);
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
//02. 1차 복호화
|
||||
rec_cert = seed.getDec(rec_cert, "");
|
||||
|
||||
//03. 1차 파싱
|
||||
int inf1 = rec_cert.indexOf("/",0);
|
||||
int inf2 = rec_cert.indexOf("/",inf1+1);
|
||||
|
||||
encPara = rec_cert.substring(0,inf1); //암호화된 통합 파라미터
|
||||
encMsg1 = rec_cert.substring(inf1+1,inf2); //암호화된 통합 파라미터의 Hash값
|
||||
|
||||
//04. 위변조 검증
|
||||
encMsg2 = seed.getMsg(encPara);
|
||||
|
||||
if(encMsg2.equals(encMsg1)){
|
||||
msgChk="Y";
|
||||
}
|
||||
|
||||
if(msgChk.equals("N")){
|
||||
goErrorPage("비정상적인 접근입니다.!!", request, response);
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
//05. 2차 복호화
|
||||
rec_cert = seed.getDec(encPara, "");
|
||||
|
||||
//06. 2차 파싱
|
||||
int info1 = rec_cert.indexOf("/",0);
|
||||
int info2 = rec_cert.indexOf("/",info1+1);
|
||||
int info3 = rec_cert.indexOf("/",info2+1);
|
||||
int info4 = rec_cert.indexOf("/",info3+1);
|
||||
int info5 = rec_cert.indexOf("/",info4+1);
|
||||
int info6 = rec_cert.indexOf("/",info5+1);
|
||||
int info7 = rec_cert.indexOf("/",info6+1);
|
||||
int info8 = rec_cert.indexOf("/",info7+1);
|
||||
int info9 = rec_cert.indexOf("/",info8+1);
|
||||
int info10 = rec_cert.indexOf("/",info9+1);
|
||||
int info11 = rec_cert.indexOf("/",info10+1);
|
||||
int info12 = rec_cert.indexOf("/",info11+1);
|
||||
int info13 = rec_cert.indexOf("/",info12+1);
|
||||
int info14 = rec_cert.indexOf("/",info13+1);
|
||||
int info15 = rec_cert.indexOf("/",info14+1);
|
||||
int info16 = rec_cert.indexOf("/",info15+1);
|
||||
int info17 = rec_cert.indexOf("/",info16+1);
|
||||
int info18 = rec_cert.indexOf("/",info17+1);
|
||||
|
||||
kmcVO.setCertNum (rec_cert.substring(0,info1));
|
||||
kmcVO.setDate (rec_cert.substring(info1+1,info2));
|
||||
//CI 복호화
|
||||
kmcVO.setCI (seed.getDec(rec_cert.substring(info2+1,info3), ""));
|
||||
kmcVO.setPhoneNo (rec_cert.substring(info3+1,info4));
|
||||
kmcVO.setPhoneCorp (rec_cert.substring(info4+1,info5));
|
||||
kmcVO.setBirthDay (rec_cert.substring(info5+1,info6));
|
||||
kmcVO.setGender (rec_cert.substring(info6+1,info7));
|
||||
kmcVO.setNation (rec_cert.substring(info7+1,info8));
|
||||
kmcVO.setName (rec_cert.substring(info8+1,info9));
|
||||
kmcVO.setResult (rec_cert.substring(info9+1,info10));
|
||||
kmcVO.setCertMet (rec_cert.substring(info10+1,info11));
|
||||
kmcVO.setIp (rec_cert.substring(info11+1,info12));
|
||||
kmcVO.setReserve1 (rec_cert.substring(info12+1,info13));
|
||||
kmcVO.setReserve2 (rec_cert.substring(info13+1,info14));
|
||||
kmcVO.setReserve3 (rec_cert.substring(info14+1,info15));
|
||||
kmcVO.setReserve4 (rec_cert.substring(info15+1,info16));
|
||||
kmcVO.setPlusInfo (rec_cert.substring(info16+1,info17));
|
||||
//DI 복호화
|
||||
kmcVO.setDI (seed.getDec(rec_cert.substring(info17+1,info18), ""));
|
||||
|
||||
//07. CI, DI 복호화
|
||||
// CI = seed.getDec(CI, "");
|
||||
// DI = seed.getDec(DI, "");
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
}catch(StringIndexOutOfBoundsException ex){
|
||||
goErrorPage("StringIndexOutOfBoundsException", request, response);
|
||||
}catch(NullPointerException ex){
|
||||
goErrorPage("NullPointerException", request, response);
|
||||
}catch(NumberFormatException ex){
|
||||
goErrorPage("NumberFormatException", request, response);
|
||||
}catch(IllegalStateException ex){
|
||||
goErrorPage("IllegalStateException", request, response);
|
||||
}catch(IndexOutOfBoundsException ex){
|
||||
goErrorPage("IndexOutOfBoundsException", request, response);
|
||||
} catch (IOException e) {
|
||||
goErrorPage("IOException", request, response);
|
||||
} catch (ParseException e) {
|
||||
goErrorPage("ParseException", request, response);
|
||||
}
|
||||
return kmcVO;
|
||||
}
|
||||
|
||||
public AuthCertVO insertCertLog(KmcVO kmcVO, String msg) throws Exception {
|
||||
//KMC 본인인증 로그 insert
|
||||
AuthCertVO certVO = new AuthCertVO();
|
||||
certVO.setMberId(kmcVO.getPlusInfo());
|
||||
certVO.setCertNum(kmcVO.getCertNum());
|
||||
certVO.setCertDate(kmcVO.getDate());
|
||||
certVO.setCertDi(kmcVO.getDI());
|
||||
certVO.setCertPhone(kmcVO.getPhoneNo());
|
||||
certVO.setCertNation(kmcVO.getNation());
|
||||
certVO.setCertName(kmcVO.getName());
|
||||
certVO.setCertResult(kmcVO.getResult());
|
||||
certVO.setCertType(msg);
|
||||
certVO.setCertIpaddr(kmcVO.getIp());
|
||||
certVO.setBirthDay(kmcVO.getBirthDay());
|
||||
certVO.setSexdstnCode(kmcVO.getGender());
|
||||
|
||||
//디비 테이블에 저장하기
|
||||
mberManageService.insertCertInfoLog(certVO);
|
||||
|
||||
return certVO;
|
||||
}
|
||||
|
||||
private String getDomain(HttpServletRequest request) {
|
||||
String serverNm = request.getScheme() + "://" + request.getServerName();
|
||||
@ -469,12 +144,5 @@ public class KmcCertChecker {
|
||||
return mberCertPhoneVO;
|
||||
}
|
||||
|
||||
private void goErrorPage(String msg, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
FlashMap flashMap = RequestContextUtils.getOutputFlashMap(request);
|
||||
flashMap.put("msg", msg);
|
||||
FlashMapManager flashMapManager = RequestContextUtils.getFlashMapManager(request);
|
||||
flashMapManager.saveOutputFlashMap(flashMap, request, response);
|
||||
response.sendRedirect("/web/cert/log/kmcErrorPage.do");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -19,8 +19,6 @@ public class SendLogVO {
|
||||
/*내용*/
|
||||
private String contents;
|
||||
|
||||
private String sendMsgType;
|
||||
|
||||
|
||||
public String getSendId() {
|
||||
return sendId;
|
||||
@ -64,13 +62,5 @@ public class SendLogVO {
|
||||
public void setContents(String contents) {
|
||||
this.contents = contents;
|
||||
}
|
||||
public String getSendMsgType() {
|
||||
return sendMsgType;
|
||||
}
|
||||
public void setSendMsgType(String sendMsgType) {
|
||||
this.sendMsgType = sendMsgType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -251,6 +251,4 @@ public interface EgovMberManageService {
|
||||
|
||||
public String findTopByregDateFromCertLog(AuthCertVO authCertVO);
|
||||
|
||||
//사용자 헤더 정보(단가, 이벤트 활성화 기간)
|
||||
public MberManageVO selectMberHeaderInfo(String mberId) throws Exception;
|
||||
}
|
||||
@ -220,6 +220,4 @@ public interface EgovUserManageService {
|
||||
|
||||
public Map<String, Object> selectFaxSendList(FaxGroupDataVO faxGroupDataVO);
|
||||
|
||||
// 마지막 결제수단 조회
|
||||
public String selectLastPayMethod(String mberId) throws Exception;
|
||||
}
|
||||
@ -512,39 +512,6 @@ public class MberManageVO extends UserDefaultVO{
|
||||
*/
|
||||
private String secuLoginFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 회원 이벤트 정보
|
||||
*/
|
||||
private String eventEndDate; //회원 이벤트 종료일자
|
||||
private double eventRemainCash; //이벤트 차감 후 남은 Cash
|
||||
private float eventShortPrice; //이벤트 단문 가격
|
||||
private float eventLongPrice; //이벤트 장문 가격
|
||||
private float eventPicturePrice; //이벤트 그림 1장 가격
|
||||
private float eventPicture2Price; //이벤트 그림 2장 가격
|
||||
private float eventPicture3Price; //이벤트 그림 3장 가격
|
||||
private String eventLeftDay; //이벤트 남은 기간
|
||||
|
||||
/**
|
||||
* 헤더 영역 정보(단가, 발송가능 건수)
|
||||
*/
|
||||
private float headerShortPrice;
|
||||
private float headerLongPrice;
|
||||
private float headerPicturePrice;
|
||||
private float headerPicture2Price;
|
||||
private float headerPicture3Price;
|
||||
private float headerKakaoAtPrice;
|
||||
private float headerKakaoFtPrice;
|
||||
private float headerFaxPrice;
|
||||
private int headerShortCnt;
|
||||
private int headerLongCnt;
|
||||
private int headerPictureCnt;
|
||||
private int headerPicture2Cnt;
|
||||
private int headerPicture3Cnt;
|
||||
private int headerKakaoAtCnt;
|
||||
private int headerKakaoFtCnt;
|
||||
private int headerFaxCnt;
|
||||
|
||||
public String getSmsCode() {
|
||||
return smsCode;
|
||||
}
|
||||
@ -1837,150 +1804,6 @@ public class MberManageVO extends UserDefaultVO{
|
||||
public void setSecuLoginFlag(String secuLoginFlag) {
|
||||
this.secuLoginFlag = secuLoginFlag;
|
||||
}
|
||||
public String getEventEndDate() {
|
||||
return eventEndDate;
|
||||
}
|
||||
public void setEventEndDate(String eventEndDate) {
|
||||
this.eventEndDate = eventEndDate;
|
||||
}
|
||||
public double getEventRemainCash() {
|
||||
return eventRemainCash;
|
||||
}
|
||||
public void setEventRemainCash(double eventRemainCash) {
|
||||
this.eventRemainCash = eventRemainCash;
|
||||
}
|
||||
public float getEventShortPrice() {
|
||||
return eventShortPrice;
|
||||
}
|
||||
public void setEventShortPrice(float eventShortPrice) {
|
||||
this.eventShortPrice = eventShortPrice;
|
||||
}
|
||||
public float getEventLongPrice() {
|
||||
return eventLongPrice;
|
||||
}
|
||||
public void setEventLongPrice(float eventLongPrice) {
|
||||
this.eventLongPrice = eventLongPrice;
|
||||
}
|
||||
public float getEventPicturePrice() {
|
||||
return eventPicturePrice;
|
||||
}
|
||||
public void setEventPicturePrice(float eventPicturePrice) {
|
||||
this.eventPicturePrice = eventPicturePrice;
|
||||
}
|
||||
public float getEventPicture2Price() {
|
||||
return eventPicture2Price;
|
||||
}
|
||||
public void setEventPicture2Price(float eventPicture2Price) {
|
||||
this.eventPicture2Price = eventPicture2Price;
|
||||
}
|
||||
public float getEventPicture3Price() {
|
||||
return eventPicture3Price;
|
||||
}
|
||||
public void setEventPicture3Price(float eventPicture3Price) {
|
||||
this.eventPicture3Price = eventPicture3Price;
|
||||
}
|
||||
public String getEventLeftDay() {
|
||||
return eventLeftDay;
|
||||
}
|
||||
public void setEventLeftDay(String eventLeftDay) {
|
||||
this.eventLeftDay = eventLeftDay;
|
||||
}
|
||||
public float getHeaderShortPrice() {
|
||||
return headerShortPrice;
|
||||
}
|
||||
public void setHeaderShortPrice(float headerShortPrice) {
|
||||
this.headerShortPrice = headerShortPrice;
|
||||
}
|
||||
public float getHeaderLongPrice() {
|
||||
return headerLongPrice;
|
||||
}
|
||||
public void setHeaderLongPrice(float headerLongPrice) {
|
||||
this.headerLongPrice = headerLongPrice;
|
||||
}
|
||||
public float getHeaderPicturePrice() {
|
||||
return headerPicturePrice;
|
||||
}
|
||||
public void setHeaderPicturePrice(float headerPicturePrice) {
|
||||
this.headerPicturePrice = headerPicturePrice;
|
||||
}
|
||||
public float getHeaderPicture2Price() {
|
||||
return headerPicture2Price;
|
||||
}
|
||||
public void setHeaderPicture2Price(float headerPicture2Price) {
|
||||
this.headerPicture2Price = headerPicture2Price;
|
||||
}
|
||||
public float getHeaderPicture3Price() {
|
||||
return headerPicture3Price;
|
||||
}
|
||||
public void setHeaderPicture3Price(float headerPicture3Price) {
|
||||
this.headerPicture3Price = headerPicture3Price;
|
||||
}
|
||||
public int getHeaderShortCnt() {
|
||||
return headerShortCnt;
|
||||
}
|
||||
public void setHeaderShortCnt(int headerShortCnt) {
|
||||
this.headerShortCnt = headerShortCnt;
|
||||
}
|
||||
public int getHeaderLongCnt() {
|
||||
return headerLongCnt;
|
||||
}
|
||||
public void setHeaderLongCnt(int headerLongCnt) {
|
||||
this.headerLongCnt = headerLongCnt;
|
||||
}
|
||||
public int getHeaderPictureCnt() {
|
||||
return headerPictureCnt;
|
||||
}
|
||||
public void setHeaderPictureCnt(int headerPictureCnt) {
|
||||
this.headerPictureCnt = headerPictureCnt;
|
||||
}
|
||||
public int getHeaderPicture2Cnt() {
|
||||
return headerPicture2Cnt;
|
||||
}
|
||||
public void setHeaderPicture2Cnt(int headerPicture2Cnt) {
|
||||
this.headerPicture2Cnt = headerPicture2Cnt;
|
||||
}
|
||||
public int getHeaderPicture3Cnt() {
|
||||
return headerPicture3Cnt;
|
||||
}
|
||||
public void setHeaderPicture3Cnt(int headerPicture3Cnt) {
|
||||
this.headerPicture3Cnt = headerPicture3Cnt;
|
||||
}
|
||||
public float getHeaderKakaoAtPrice() {
|
||||
return headerKakaoAtPrice;
|
||||
}
|
||||
public void setHeaderKakaoAtPrice(float headerKakaoAtPrice) {
|
||||
this.headerKakaoAtPrice = headerKakaoAtPrice;
|
||||
}
|
||||
public float getHeaderKakaoFtPrice() {
|
||||
return headerKakaoFtPrice;
|
||||
}
|
||||
public void setHeaderKakaoFtPrice(float headerKakaoFtPrice) {
|
||||
this.headerKakaoFtPrice = headerKakaoFtPrice;
|
||||
}
|
||||
public float getHeaderFaxPrice() {
|
||||
return headerFaxPrice;
|
||||
}
|
||||
public void setHeaderFaxPrice(float headerFaxPrice) {
|
||||
this.headerFaxPrice = headerFaxPrice;
|
||||
}
|
||||
public int getHeaderKakaoAtCnt() {
|
||||
return headerKakaoAtCnt;
|
||||
}
|
||||
public void setHeaderKakaoAtCnt(int headerKakaoAtCnt) {
|
||||
this.headerKakaoAtCnt = headerKakaoAtCnt;
|
||||
}
|
||||
public int getHeaderKakaoFtCnt() {
|
||||
return headerKakaoFtCnt;
|
||||
}
|
||||
public void setHeaderKakaoFtCnt(int headerKakaoFtCnt) {
|
||||
this.headerKakaoFtCnt = headerKakaoFtCnt;
|
||||
}
|
||||
public int getHeaderFaxCnt() {
|
||||
return headerFaxCnt;
|
||||
}
|
||||
public void setHeaderFaxCnt(int headerFaxCnt) {
|
||||
this.headerFaxCnt = headerFaxCnt;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -882,11 +882,5 @@ public class EgovUserManageServiceImpl extends EgovAbstractServiceImpl implement
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
// 마지막 결제수단 SELECT
|
||||
@Override
|
||||
public String selectLastPayMethod(String mberId) throws Exception {
|
||||
return userManageDAO.selectLastPayMethod(mberId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -320,9 +320,5 @@ public class UserManageDAO extends EgovAbstractDAO{
|
||||
public int selectUserPrePaymentPGdataCount(String userId) throws Exception{
|
||||
return (int) select("userManageDAO.selectUserPrePaymentPGdataCount", userId);
|
||||
}
|
||||
|
||||
// 마지막 결제수단 SELECT
|
||||
public String selectLastPayMethod(String mberId) throws Exception{
|
||||
return (String) select("userManageDAO.selectLastPayMethod", mberId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -12,9 +12,6 @@ import java.security.PrivateKey;
|
||||
import java.security.PublicKey;
|
||||
import java.security.spec.RSAPublicKeySpec;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@ -109,7 +106,6 @@ import itn.let.lett.service.LetterVO;
|
||||
import itn.let.mjo.addr.service.AddrTransHistService;
|
||||
import itn.let.mjo.addr.service.AddrTransHistVO;
|
||||
import itn.let.mjo.event.service.MjonEventService;
|
||||
import itn.let.mjo.event.service.MjonEventVO;
|
||||
import itn.let.mjo.kisa.service.KisaService;
|
||||
import itn.let.mjo.kisa.service.KisaVO;
|
||||
import itn.let.mjo.mjocommon.MjonForienIpChk;
|
||||
@ -134,7 +130,6 @@ import itn.let.sym.mnu.mpm.service.MenuManageVO;
|
||||
import itn.let.sym.prm.service.EgovProgrmManageService;
|
||||
import itn.let.sym.prm.service.ProgrmManageVO;
|
||||
import itn.let.sym.site.service.EgovSiteManagerService;
|
||||
import itn.let.sym.site.service.JoinSettingVO;
|
||||
import itn.let.sym.site.service.MetaTagVO;
|
||||
import itn.let.sym.site.service.SiteManagerVO;
|
||||
import itn.let.uss.umt.service.EgovMberManageService;
|
||||
@ -1261,16 +1256,6 @@ public class MainController {
|
||||
model.addAttribute("mberManageVO", userManageService.selectUserInfo(mberManageVO));
|
||||
}
|
||||
|
||||
/*
|
||||
* 회원별 단가, 기본 단가, 이벤트 정보 조회
|
||||
* 2025.07.25 이지우 추가
|
||||
* */
|
||||
MberManageVO mberHeaderInfoVO = new MberManageVO();
|
||||
if(loginVO != null) {
|
||||
mberHeaderInfoVO = mberManageService.selectMberHeaderInfo(loginVO.getId());
|
||||
}
|
||||
model.addAttribute("mberHeaderInfoVO", mberHeaderInfoVO);
|
||||
|
||||
return "web/com/webCommonHeader";
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Globals.Env = dev
|
||||
|
||||
# mysql
|
||||
Globals.DriverClassName=com.mysql.jdbc.Driver
|
||||
Globals.Url=jdbc:mysql://192.168.0.60:3308/mjon_advc?useUnicode=true&connectionCollation=utf8mb4_unicode_ci&serverTimezone=Asia/Seoul
|
||||
Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon_advc
|
||||
#Globals.Url=jdbc:mysql://139.150.73.12:3306/mjon
|
||||
Globals.UserName= mjonUr
|
||||
Globals.Password= mjon!@#$
|
||||
|
||||
@ -28,10 +28,8 @@ Globals.Env = local
|
||||
|
||||
# mysql
|
||||
Globals.DriverClassName=com.mysql.jdbc.Driver
|
||||
#Globals.Url=jdbc:mysql://192.168.0.60:3308/mjon_advc
|
||||
#Globals.Url=jdbc:mysql://192.168.0.60:3308/mjon_advc?characterEncoding=UTF-8&useUnicode=true&serverTimezone=Asia/Seoul
|
||||
Globals.Url=jdbc:mysql://192.168.0.60:3308/mjon_advc?useUnicode=true&connectionCollation=utf8mb4_unicode_ci&serverTimezone=Asia/Seoul
|
||||
|
||||
Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon_advc
|
||||
#Globals.Url=jdbc:mysql://192.168.0.60:3308/mjon
|
||||
Globals.UserName= mjonUr
|
||||
Globals.Password= mjon!@#$
|
||||
#Globals.Url=jdbc:mysql://192.168.0.125:3306/mjon
|
||||
|
||||
@ -27,7 +27,7 @@ Globals.Env = prod
|
||||
|
||||
# mysql
|
||||
Globals.DriverClassName=com.mysql.jdbc.Driver
|
||||
Globals.Url=jdbc:mysql://10.12.107.14:3306/mjon_advc?useUnicode=true&connectionCollation=utf8mb4_unicode_ci&serverTimezone=Asia/Seoul
|
||||
Globals.Url=jdbc:mysql://10.12.107.14:3306/mjon_advc
|
||||
Globals.UserName= mjonUr
|
||||
Globals.Password= mjon!@#$
|
||||
|
||||
|
||||
@ -1,94 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:egov-security="http://www.egovframe.go.kr/schema/egov-security"
|
||||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
||||
http://www.egovframe.go.kr/schema/egov-security http://maven.egovframe.go.kr/schema/egov-security/egov-security-3.7.xsd">
|
||||
|
||||
<security:http pattern="/css/**" security="none"/>
|
||||
<security:http pattern="/html/**" security="none"/>
|
||||
<security:http pattern="/images/**" security="none"/>
|
||||
<security:http pattern="/js/**" security="none"/>
|
||||
<security:http pattern="/resource/**" security="none"/>
|
||||
<security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/>
|
||||
|
||||
<egov-security:config id="securityConfig"
|
||||
loginUrl="/uat/uia/actionMain.do"
|
||||
logoutSuccessUrl="/uat/uia/actionMain.do"
|
||||
loginFailureUrl="/uat/uia/actionSecurityLogin.do?login_error=1"
|
||||
accessDeniedUrl="/sec/ram/accessDenied.do"
|
||||
|
||||
dataSource="egov.dataSource"
|
||||
|
||||
jdbcUsersByUsernameQuery="SELECT USER_ID, ESNTL_ID AS PASSWORD, 1 ENABLED, USER_NM, USER_ZIP,
|
||||
USER_ADRES, USER_EMAIL, USER_SE, '-' ORGNZT_ID, ESNTL_ID, MBTLNUM AS MOBLPHONNO,
|
||||
'-' ORGNZT_NM, AUTHOR_CODE AS AUTHORITY, DEPT
|
||||
FROM COMVNUSERMASTER A
|
||||
INNER JOIN LETTNEMPLYRSCRTYESTBS B ON A.ESNTL_ID = B.SCRTY_DTRMN_TRGET_ID
|
||||
WHERE CONCAT(USER_SE, USER_ID) = ?"
|
||||
|
||||
jdbcAuthoritiesByUsernameQuery="SELECT A.SCRTY_DTRMN_TRGET_ID USER_ID, A.AUTHOR_CODE AUTHORITY
|
||||
FROM LETTNEMPLYRSCRTYESTBS A, COMVNUSERMASTER B
|
||||
WHERE A.SCRTY_DTRMN_TRGET_ID = B.ESNTL_ID AND B.USER_ID = ?"
|
||||
|
||||
jdbcMapClass="itn.let.uat.uia.service.impl.EgovSessionMapping"
|
||||
|
||||
requestMatcherType="regex"
|
||||
hash="plaintext"
|
||||
hashBase64="false"
|
||||
|
||||
concurrentMaxSessons="999"
|
||||
concurrentExpiredUrl="/"
|
||||
|
||||
defaultTargetUrl="/uat/uia/actionMain.do"
|
||||
|
||||
/>
|
||||
|
||||
<!--원 소스 -->
|
||||
<!-- defaultTargetUrl="/uat/uia/actionMain.do" -->
|
||||
|
||||
<!-- sqlHierarchicalRoles="
|
||||
SELECT a.CHLDRN_ROLE child, a.PARNTS_ROLE parent
|
||||
FROM LETTNROLES_HIERARCHY a LEFT JOIN LETTNROLES_HIERARCHY b on (a.CHLDRN_ROLE = b.PARNTS_ROLE)" -->
|
||||
|
||||
<egov-security:secured-object-config id="securedObjectConfig"
|
||||
roleHierarchyString="
|
||||
ROLE_ADMIN > ROLE_USER_MEMBER
|
||||
ROLE_USER_MEMBER > ROLE_ANONYMOUS"
|
||||
|
||||
sqlRolesAndUrl="
|
||||
SELECT a.ROLE_PTTRN url, b.AUTHOR_CODE authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'url'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
sqlRolesAndMethod="
|
||||
SELECT a.ROLE_PTTRN method, b.AUTHOR_CODE authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'method'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
sqlRolesAndPointcut="
|
||||
SELECT a.ROLE_PTTRN pointcut, b.AUTHOR_CODE authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'pointcut'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
sqlRegexMatchedRequestMapping="
|
||||
SELECT a.resource_pattern uri, b.authority authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'regex'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
/>
|
||||
|
||||
<egov-security:initializer id="initializer" supportMethod="true" supportPointcut="false" />
|
||||
|
||||
<!-- URL에 세미콜론(semicolon)허용 여부(기본값/false) -->
|
||||
<bean id="egovStrictHttpFirewall" class="org.springframework.security.web.firewall.StrictHttpFirewall">
|
||||
<property name="allowSemicolon" value="true"/>
|
||||
</bean>
|
||||
<security:http-firewall ref="egovStrictHttpFirewall"/>
|
||||
|
||||
</beans>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:egov-security="http://www.egovframe.go.kr/schema/egov-security"
|
||||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd
|
||||
http://www.egovframe.go.kr/schema/egov-security http://www.egovframe.go.kr/schema/egov-security/egov-security-3.7.xsd">
|
||||
|
||||
<security:http pattern="/css/**" security="none"/>
|
||||
<security:http pattern="/html/**" security="none"/>
|
||||
<security:http pattern="/images/**" security="none"/>
|
||||
<security:http pattern="/js/**" security="none"/>
|
||||
<security:http pattern="/resource/**" security="none"/>
|
||||
<security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/>
|
||||
|
||||
<egov-security:config id="securityConfig"
|
||||
loginUrl="/uat/uia/actionMain.do"
|
||||
logoutSuccessUrl="/uat/uia/actionMain.do"
|
||||
loginFailureUrl="/uat/uia/actionSecurityLogin.do?login_error=1"
|
||||
accessDeniedUrl="/sec/ram/accessDenied.do"
|
||||
|
||||
dataSource="egov.dataSource"
|
||||
|
||||
jdbcUsersByUsernameQuery="SELECT USER_ID, ESNTL_ID AS PASSWORD, 1 ENABLED, USER_NM, USER_ZIP,
|
||||
USER_ADRES, USER_EMAIL, USER_SE, '-' ORGNZT_ID, ESNTL_ID, MBTLNUM AS MOBLPHONNO,
|
||||
'-' ORGNZT_NM, AUTHOR_CODE AS AUTHORITY, DEPT
|
||||
FROM COMVNUSERMASTER A
|
||||
INNER JOIN LETTNEMPLYRSCRTYESTBS B ON A.ESNTL_ID = B.SCRTY_DTRMN_TRGET_ID
|
||||
WHERE CONCAT(USER_SE, USER_ID) = ?"
|
||||
|
||||
jdbcAuthoritiesByUsernameQuery="SELECT A.SCRTY_DTRMN_TRGET_ID USER_ID, A.AUTHOR_CODE AUTHORITY
|
||||
FROM LETTNEMPLYRSCRTYESTBS A, COMVNUSERMASTER B
|
||||
WHERE A.SCRTY_DTRMN_TRGET_ID = B.ESNTL_ID AND B.USER_ID = ?"
|
||||
|
||||
jdbcMapClass="itn.let.uat.uia.service.impl.EgovSessionMapping"
|
||||
|
||||
requestMatcherType="regex"
|
||||
hash="plaintext"
|
||||
hashBase64="false"
|
||||
|
||||
concurrentMaxSessons="999"
|
||||
concurrentExpiredUrl="/"
|
||||
|
||||
defaultTargetUrl="/uat/uia/actionMain.do"
|
||||
|
||||
/>
|
||||
|
||||
<!--원 소스 -->
|
||||
<!-- defaultTargetUrl="/uat/uia/actionMain.do" -->
|
||||
|
||||
<!-- sqlHierarchicalRoles="
|
||||
SELECT a.CHLDRN_ROLE child, a.PARNTS_ROLE parent
|
||||
FROM LETTNROLES_HIERARCHY a LEFT JOIN LETTNROLES_HIERARCHY b on (a.CHLDRN_ROLE = b.PARNTS_ROLE)" -->
|
||||
|
||||
<egov-security:secured-object-config id="securedObjectConfig"
|
||||
roleHierarchyString="
|
||||
ROLE_ADMIN > ROLE_USER_MEMBER
|
||||
ROLE_USER_MEMBER > ROLE_ANONYMOUS"
|
||||
|
||||
sqlRolesAndUrl="
|
||||
SELECT a.ROLE_PTTRN url, b.AUTHOR_CODE authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'url'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
sqlRolesAndMethod="
|
||||
SELECT a.ROLE_PTTRN method, b.AUTHOR_CODE authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'method'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
sqlRolesAndPointcut="
|
||||
SELECT a.ROLE_PTTRN pointcut, b.AUTHOR_CODE authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'pointcut'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
sqlRegexMatchedRequestMapping="
|
||||
SELECT a.resource_pattern uri, b.authority authority
|
||||
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
|
||||
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'regex'
|
||||
ORDER BY a.ROLE_SORT"
|
||||
|
||||
/>
|
||||
|
||||
<egov-security:initializer id="initializer" supportMethod="true" supportPointcut="false" />
|
||||
|
||||
<!-- URL에 세미콜론(semicolon)허용 여부(기본값/false) -->
|
||||
<bean id="egovStrictHttpFirewall" class="org.springframework.security.web.firewall.StrictHttpFirewall">
|
||||
<property name="allowSemicolon" value="true"/>
|
||||
</bean>
|
||||
<security:http-firewall ref="egovStrictHttpFirewall"/>
|
||||
|
||||
</beans>
|
||||
|
||||
@ -569,8 +569,10 @@
|
||||
on A.ADDR_GRP_ID = mag.ADDR_GRP_ID
|
||||
WHERE
|
||||
A.MBER_ID = #mberId#
|
||||
AND (A.RECV_STATUS IN ('Y', 'S') OR A.RECV_STATUS IS NULL)
|
||||
AND (A.ADDR_GRP_ID IS NULL OR MAG.DELETE_YN = 'N')
|
||||
AND (A.RECV_STATUS = 'Y'
|
||||
or A.RECV_STATUS = 'S'
|
||||
or A.RECV_STATUS is null)
|
||||
AND mag.DELETE_YN = 'N'
|
||||
</select>
|
||||
|
||||
<!-- 주소록 상세 조회 -->
|
||||
@ -1352,32 +1354,34 @@
|
||||
, BOOKMARK
|
||||
, RECV_STATUS
|
||||
)
|
||||
SELECT t.ADDR_GRP_ID,
|
||||
t.MBER_ID,
|
||||
t.ADDR_NM,
|
||||
FN_GETHYPHEN(t.ADDR_PHONE_NO),
|
||||
t.ADDR_INFO1,
|
||||
t.ADDR_INFO2,
|
||||
t.ADDR_INFO3,
|
||||
t.ADDR_INFO4,
|
||||
t.ADDR_COMMENT,
|
||||
t.FRST_REGIST_PNTTM,
|
||||
t.FRST_REGISTER_ID,
|
||||
t.LAST_UPDT_PNTTM,
|
||||
t.LAST_UPDUSR_ID,
|
||||
t.DELETE_YN,
|
||||
t.BOOKMARK,
|
||||
t.RECV_STATUS
|
||||
FROM TEMP_MJ_ADDR AS t
|
||||
LEFT JOIN MJ_ADDR AS m
|
||||
ON m.MBER_ID = t.MBER_ID
|
||||
AND m.ADDR_GRP_ID = t.ADDR_GRP_ID
|
||||
AND m.BOOKMARK = t.BOOKMARK
|
||||
AND replace(m.ADDR_PHONE_NO, '-', '') = replace(t.ADDR_PHONE_NO, '-', '')
|
||||
WHERE t.MBER_ID = #mberId#
|
||||
AND t.ADDR_GRP_ID = #addrGrpId#
|
||||
AND t.BOOKMARK = #bookmark#
|
||||
AND m.MBER_ID IS NULL
|
||||
SELECT
|
||||
ADDR_GRP_ID
|
||||
, MBER_ID
|
||||
, ADDR_NM
|
||||
, ADDR_PHONE_NO
|
||||
, ADDR_INFO1
|
||||
, ADDR_INFO2
|
||||
, ADDR_INFO3
|
||||
, ADDR_INFO4
|
||||
, ADDR_COMMENT
|
||||
, FRST_REGIST_PNTTM
|
||||
, FRST_REGISTER_ID
|
||||
, LAST_UPDT_PNTTM
|
||||
, LAST_UPDUSR_ID
|
||||
, DELETE_YN
|
||||
, BOOKMARK
|
||||
, RECV_STATUS
|
||||
FROM TEMP_MJ_ADDR
|
||||
WHERE MBER_ID = #mberId#
|
||||
AND ADDR_GRP_ID = #addrGrpId#
|
||||
AND BOOKMARK = #bookmark#
|
||||
AND ADDR_PHONE_NO NOT IN
|
||||
(
|
||||
SELECT ADDR_PHONE_NO FROM MJ_ADDR
|
||||
WHERE MBER_ID = #mberId#
|
||||
AND ADDR_GRP_ID = #addrGrpId#
|
||||
AND BOOKMARK = #bookmark#
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
@ -85,11 +85,4 @@
|
||||
DELETE FROM lettngnrlmber_access_call_info
|
||||
WHERE access_no = #accessNo#
|
||||
</delete>
|
||||
|
||||
<update id="ApiCallInfoMngDAO.updateApiCallInfoAll" parameterClass="apiKeyVO">
|
||||
UPDATE lettngnrlmber_access_call_info
|
||||
SET use_yn = #useYn#
|
||||
WHERE access_no = #accessNo#
|
||||
|
||||
</update>
|
||||
</sqlMap>
|
||||
|
||||
@ -208,7 +208,6 @@
|
||||
)
|
||||
WHERE 1=1
|
||||
and a.mber_id=#mberId#
|
||||
and b.USE_YN != 'N'
|
||||
LIMIT 1
|
||||
|
||||
</select>
|
||||
|
||||
@ -1409,7 +1409,7 @@
|
||||
C.YELLOW_ID AS yellowId
|
||||
FROM MJ_MSG_GROUP_DATA B
|
||||
INNER JOIN (
|
||||
select MSG_GROUP_ID, MSG_TYPE, DEL_FLAG, MSG_NOTICETALK_SENDER_KEY, BIZ_KAKAO_RESEND_YN, BIZ_KAKAO_RESEND_DATA, CALL_TO
|
||||
select MSG_GROUP_ID, MSG_TYPE, DEL_FLAG, MSG_NOTICETALK_SENDER_KEY, BIZ_KAKAO_RESEND_YN, BIZ_KAKAO_RESEND_DATA
|
||||
from MJ_MSG_DATA
|
||||
where DEL_FLAG = 'N'
|
||||
<isNotEmpty property="tabType">
|
||||
@ -1452,9 +1452,6 @@
|
||||
<isEqual property="searchCondition" compareValue="3">
|
||||
AND B.SMS_TXT like CONCAT('%', #searchKeyword#, '%')
|
||||
</isEqual>
|
||||
<isEqual property="searchCondition" compareValue="4" >
|
||||
AND A.CALL_TO LIKE CONCAT('%', #searchKeyword#, '%')
|
||||
</isEqual>
|
||||
</isNotEmpty>
|
||||
GROUP BY B.MSG_GROUP_ID
|
||||
ORDER BY 1=1
|
||||
|
||||
@ -82,7 +82,6 @@
|
||||
, REQ_DATE
|
||||
|
||||
, FILE_CNT
|
||||
, MSG_RESULT
|
||||
)VALUES
|
||||
<iterate conjunction=",">
|
||||
(
|
||||
@ -109,8 +108,7 @@
|
||||
, #[].bizJsonName#
|
||||
, #[].reqDate#
|
||||
|
||||
, #[].fileCnt#,
|
||||
'00'
|
||||
, #[].fileCnt#
|
||||
)
|
||||
</iterate>
|
||||
</insert>
|
||||
@ -150,7 +148,6 @@
|
||||
BEF_POINT,
|
||||
|
||||
TOT_PRICE,
|
||||
SEND_KIND,
|
||||
|
||||
AT_DELAY_YN,
|
||||
BIZ_KAKAO_RESEND_ORGNL_TXT,
|
||||
@ -175,7 +172,6 @@
|
||||
#befPoint#,
|
||||
|
||||
#totPrice#,
|
||||
#sendKind#,
|
||||
|
||||
#atDelayYn#,
|
||||
#bizKakaoResendOrgnlTxt#,
|
||||
@ -209,11 +205,36 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="kakaoAlimTalkDAO.selectKakaoSentRefundList" resultClass="kakaoVO">
|
||||
<select id="kakaoAlimTalkDAO.selectKakaoAtSentRefundList" resultClass="kakaoVO">
|
||||
SELECT
|
||||
MMD.USER_ID AS userId
|
||||
, MMD.MSG_GROUP_ID AS msgGroupId
|
||||
, MMD.MSG_SEQ AS msgSeq
|
||||
, MMD.USERDATA AS userData
|
||||
, MMD.REFUND_YN AS refundYn
|
||||
, MMD.RSLT_CODE AS rsltCode
|
||||
, MMD.RSLT_CODE2 AS rsltCode2
|
||||
, MMD.AGENT_CODE AS agentCode
|
||||
, DATE_FORMAT(MMD.SENT_DATE,'%Y-%m-%d %T') AS sentDate
|
||||
, DATE_FORMAT(MMD.RSLT_DATE,'%Y-%m-%d %T') AS rsltDate
|
||||
, MMD.BIZ_KAKAO_RESEND_YN AS subMsgSendYn
|
||||
, MMD.BIZ_KAKAO_RESEND_TYPE AS subMsgType
|
||||
|
||||
FROM
|
||||
MJ_MSG_DATA MMD
|
||||
INNER JOIN LETTNGNRLMBER MB
|
||||
ON MMD.USER_ID = MB.MBER_ID
|
||||
WHERE 1=1
|
||||
AND MMD.CUR_STATE = '3'
|
||||
AND MMD.REFUND_YN = 'N'
|
||||
AND MMD.RESERVE_C_YN = 'N'
|
||||
AND MMD.MSG_TYPE = 8
|
||||
</select>
|
||||
|
||||
<select id="kakaoAlimTalkDAO.selectKakaoFtSentRefundList" resultClass="kakaoVO">
|
||||
SELECT
|
||||
MMD.USER_ID AS userId
|
||||
, MMD.MSG_GROUP_ID AS msgGroupId
|
||||
, MMD.MSG_ID AS msgId
|
||||
, MMD.MSG_SEQ AS msgSeq
|
||||
, MMGD.BIZ_KAKAO_IMAGE_TYPE AS bizKakaoImageType
|
||||
, MMGD.EACH_PRICE AS eachPrice
|
||||
@ -228,9 +249,8 @@
|
||||
, MMD.BIZ_KAKAO_RESEND_TYPE AS subMsgType
|
||||
, MMD.FILE_CNT AS fileCnt
|
||||
, MMD.BIZ_UMID AS bizUmid
|
||||
, MMD.MSG_TYPE AS msgType
|
||||
FROM
|
||||
MJ_MSG_DATA MMD FORCE index (IDX_MJ_MSG_DATA_13)
|
||||
MJ_MSG_DATA MMD
|
||||
INNER JOIN LETTNGNRLMBER MB
|
||||
ON MMD.USER_ID = MB.MBER_ID
|
||||
INNER JOIN mj_msg_group_data MMGD
|
||||
@ -239,8 +259,7 @@
|
||||
AND MMD.CUR_STATE = '3'
|
||||
AND MMD.REFUND_YN = 'N'
|
||||
AND MMD.RESERVE_C_YN = 'N'
|
||||
AND MMD.MSG_TYPE IN(8, 9)
|
||||
ORDER BY MMD.USER_ID ASC
|
||||
AND MMD.MSG_TYPE = 9
|
||||
</select>
|
||||
|
||||
<select id="kakaoAlimTalkDAO.selectKakaoAtUmid" resultClass="kakaoVO" parameterClass="kakaoVO">
|
||||
|
||||
@ -173,8 +173,7 @@
|
||||
FILE_PATH1,
|
||||
FILE_PATH2,
|
||||
FILE_PATH3,
|
||||
MSG_GROUP_ID,
|
||||
MSG_RESULT
|
||||
MSG_GROUP_ID
|
||||
)VALUES
|
||||
<iterate conjunction=",">
|
||||
(
|
||||
@ -192,8 +191,7 @@
|
||||
#[].filePath1#,
|
||||
#[].filePath2#,
|
||||
#[].filePath3#,
|
||||
#[].msgGroupId#,
|
||||
'00'
|
||||
#[].msgGroupId#
|
||||
)
|
||||
</iterate>
|
||||
</insert>
|
||||
@ -2186,8 +2184,6 @@
|
||||
, BLINE_CODE AS blineCode
|
||||
, AT_SMISHING_YN AS atSmishingYn
|
||||
, PRE_PAYMENT_YN AS prePaymentYn
|
||||
, BIZ_NO AS bizNo
|
||||
, MBER_EMAIL_ADRES AS mberEmailAdres
|
||||
FROM LETTNGNRLMBER
|
||||
WHERE MBER_ID = #userId#
|
||||
|
||||
@ -2327,7 +2323,6 @@
|
||||
EVENT_YN,
|
||||
DELAY_YN,
|
||||
AT_DELAY_YN,
|
||||
SEND_KIND,
|
||||
BIZ_KAKAO_RESEND_ORGNL_TXT,
|
||||
SUBJECT_CHK_YN
|
||||
)
|
||||
@ -2355,7 +2350,6 @@
|
||||
#eventYn#,
|
||||
#delayYn#,
|
||||
#atDelayYn#,
|
||||
#sendKind#,
|
||||
#kakaoSubMagOrgnlTxt#,
|
||||
#subjectChkYn#
|
||||
)
|
||||
@ -3178,7 +3172,6 @@
|
||||
WHERE 1 = 1
|
||||
AND pf.SentEA > 0
|
||||
AND mjf.USER_ID = #userId#
|
||||
AND mjf.RESERVE_C_YN = 'N'
|
||||
|
||||
) AS pay
|
||||
WHERE 1=1
|
||||
@ -3288,7 +3281,7 @@
|
||||
, M.fileName3 AS fileName3
|
||||
, M.orderByCode AS orderByCode
|
||||
, M.msgId AS msgId
|
||||
, DATE_FORMAT(M.reqDate, '%Y-%m-%d %H:%i') AS reqDate
|
||||
, M.reqDate AS reqDate
|
||||
FROM
|
||||
(SELECT
|
||||
DATE_FORMAT(B.REGDATE, '%Y-%m-%d %H:%i' ) AS regDate
|
||||
@ -3329,7 +3322,7 @@
|
||||
/*and A.DEL_FLAG = 'N'*/
|
||||
AND A.USER_ID = #userId#
|
||||
AND B.USER_ID = #userId#
|
||||
AND B.RESERVE_C_YN = 'N'
|
||||
/*AND B.RESERVE_C_YN = 'N'*/
|
||||
ORDER BY 1=1
|
||||
, msgGroupId DESC
|
||||
, sentDate DESC
|
||||
@ -3377,7 +3370,6 @@
|
||||
WHERE 1 = 1
|
||||
AND pf.SentEA > 0
|
||||
AND mjf.USER_ID = #userId#
|
||||
AND mjf.RESERVE_C_YN = 'N'
|
||||
|
||||
) AS pay
|
||||
WHERE 1=1
|
||||
@ -3603,15 +3595,15 @@
|
||||
, MIN(DATE_FORMAT(M.REQ_DATE, '%Y-%m-%d' )) AS minRegDate
|
||||
, M.msgTypeName
|
||||
, M.orderByCode
|
||||
, SUM(IF(M.msgTypeName = '단문', 1, 0)) AS shtSendCount
|
||||
, SUM(IF(M.msgTypeName = '장문', 1, 0)) AS longSendCount
|
||||
, SUM(IF(M.msgTypeName = '그림', 1, 0)) AS pictSendCount
|
||||
, SUM(IF(M.msgTypeName = '단문(SMS)', 1, 0)) AS shtSendCount
|
||||
, SUM(IF(M.msgTypeName = '장문(LMS)', 1, 0)) AS longSendCount
|
||||
, SUM(IF(M.msgTypeName = '그림(MMS)', 1, 0)) AS pictSendCount
|
||||
, SUM(IF(M.msgTypeName = '알림톡', 1, 0)) AS atSendCount
|
||||
, SUM(IF(M.msgTypeName = '친구톡', 1, 0)) AS ftSendCount
|
||||
<!-- , SUM(M.MSG_GROUP_CNT) AS sendCount -->
|
||||
, ifnull(TRUNCATE(SUM(M.EACH_PRICE) , 1), 0) AS supplyPrice
|
||||
, ifnull(TRUNCATE(SUM(M.EACH_PRICE) , 0), 0) AS supplyPrice
|
||||
, 0 AS vatPrice
|
||||
, ifnull(TRUNCATE(SUM(M.EACH_PRICE) , 1), 0) AS totalPrice
|
||||
, ifnull(TRUNCATE(SUM(M.EACH_PRICE) , 0), 0) AS totalPrice
|
||||
, M.MSG_TYPE
|
||||
FROM (
|
||||
SELECT
|
||||
@ -3624,14 +3616,14 @@
|
||||
, B.MSG_TYPE
|
||||
, CASE
|
||||
WHEN B.MSG_TYPE = '6' AND B.FILE_CNT > 0
|
||||
THEN '그림'
|
||||
THEN '그림(MMS)'
|
||||
WHEN B.MSG_TYPE = '6' AND B.FILE_CNT = 0
|
||||
THEN '장문'
|
||||
THEN '장문(LMS)'
|
||||
WHEN B.MSG_TYPE = '8'
|
||||
THEN '알림톡'
|
||||
WHEN B.MSG_TYPE = '9'
|
||||
THEN '친구톡'
|
||||
ELSE '단문'
|
||||
ELSE '단문(SMS)'
|
||||
END msgTypeName
|
||||
, CASE
|
||||
WHEN B.MSG_TYPE = '6' AND B.FILE_CNT > 0
|
||||
@ -3649,6 +3641,8 @@
|
||||
AND A.MSG_GROUP_ID = B.MSG_GROUP_ID
|
||||
AND A.USER_ID = #userId#
|
||||
AND B.USER_ID = #userId#
|
||||
AND B.DEL_FLAG = 'N'
|
||||
AND IFNULL(B.DEL_FLAG,'N') = 'N'
|
||||
AND B.RESERVE_C_YN = 'N'
|
||||
|
||||
<isNotEmpty property="startDate">
|
||||
@ -3676,9 +3670,6 @@
|
||||
<isEqual property="pageType" compareValue="at">
|
||||
AND B.MSG_TYPE = '8'
|
||||
</isEqual>
|
||||
<isEqual property="pageType" compareValue="ft">
|
||||
AND B.MSG_TYPE = '9'
|
||||
</isEqual>
|
||||
</isNotEmpty>
|
||||
) M
|
||||
WHERE 1=1
|
||||
@ -3694,9 +3685,9 @@
|
||||
, IFNULL(MIN(DATE_FORMAT(M.REQ_DATE, '%Y-%m-%d' )), 0) AS minRegDate
|
||||
, M.msgTypeName
|
||||
, IFNULL(SUM(SentEA), 0) AS ftSendCount
|
||||
, ifnull(TRUNCATE(SUM(supplyPrice) , 1), 0) AS supplyPrice
|
||||
, ifnull(TRUNCATE(SUM(supplyPrice) , 0), 0) AS supplyPrice
|
||||
, 0 AS vatPrice
|
||||
, ifnull(TRUNCATE(SUM(M.TOT_PRICE) , 1), 0) AS totalPrice
|
||||
, ifnull(TRUNCATE(SUM(M.TOT_PRICE) , 0), 0) AS totalPrice
|
||||
FROM (
|
||||
SELECT pf.ReqDate AS REGDATE
|
||||
, pf.ReqDate AS REQ_DATE
|
||||
@ -3737,8 +3728,7 @@
|
||||
RECEIVE,
|
||||
FRST_SEND_PNTTM,
|
||||
CHECK_NO,
|
||||
CONTENTS,
|
||||
SEND_MSG_TYPE
|
||||
CONTENTS
|
||||
)
|
||||
|
||||
|
||||
@ -3751,8 +3741,7 @@
|
||||
#receive#,
|
||||
now(),
|
||||
#checkNo#,
|
||||
#contents#,
|
||||
#sendMsgType#
|
||||
#contents#
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -8270,51 +8259,5 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="mjonMsgDataDAO.selectBizResendLogList" resultClass="mjonMsgVO">
|
||||
|
||||
SELECT
|
||||
BRLA.CMID AS cmId,
|
||||
BRLA.CALL_STATUS AS resultCode,
|
||||
BRLB.USER_KEY AS userData
|
||||
FROM
|
||||
BIZ_RESEND_LOG BRLA
|
||||
JOIN
|
||||
BIZ_RESEND_LOG BRLB
|
||||
ON BRLB.UMID = BRLA.CMID
|
||||
WHERE (BRLA.UMID = '' OR BRLA.UMID IS NULL);
|
||||
|
||||
</select>
|
||||
|
||||
<update id="mjonMsgDataDAO.updateResendResult" parameterClass="mjonMsgVO" >
|
||||
|
||||
UPDATE MJ_MSG_DATA
|
||||
SET MSG_RESULT = #msgResult#
|
||||
WHERE USERDATA = #userData#
|
||||
|
||||
</update>
|
||||
|
||||
<delete id="mjonMsgDataDAO.deleteBizResendLog" parameterClass="mjonMsgVO" >
|
||||
|
||||
DELETE FROM BIZ_RESEND_LOG
|
||||
WHERE CMID = #cmId# OR UMID = #cmId#
|
||||
|
||||
</delete>
|
||||
|
||||
<select id="mjonMsgDataDAO.selectSysMsgTodaySendYn" parameterClass="SendLogVO" resultClass="boolean">
|
||||
SELECT
|
||||
<![CDATA[
|
||||
COUNT(1) >= 1 AS todaySendYn
|
||||
]]>
|
||||
FROM
|
||||
mj_system_send a
|
||||
WHERE
|
||||
RECEIVE = #receive#
|
||||
<![CDATA[
|
||||
AND FRST_SEND_PNTTM >= CURDATE()
|
||||
AND FRST_SEND_PNTTM < CURDATE() + INTERVAL 1 DAY
|
||||
]]>
|
||||
AND SEND_MSG_TYPE = '01'
|
||||
</select>
|
||||
|
||||
</sqlMap>
|
||||
|
||||
|
||||
@ -254,9 +254,6 @@
|
||||
<isEqual property="searchCondition" compareValue="3" >
|
||||
AND B.SMS_TXT LIKE CONCAT('%', #searchKeyword#, '%')
|
||||
</isEqual>
|
||||
<isEqual property="searchCondition" compareValue="4" >
|
||||
AND A.CALL_TO LIKE CONCAT('%', #searchKeyword#, '%')
|
||||
</isEqual>
|
||||
</isNotEmpty>
|
||||
<isNotEmpty property="searchCondition01">
|
||||
AND B.RESERVE_YN = #searchCondition01#
|
||||
@ -476,9 +473,6 @@
|
||||
<isEqual property="searchCondition" compareValue="3" >
|
||||
AND B.SMS_TXT LIKE CONCAT('%', #searchKeyword#, '%')
|
||||
</isEqual>
|
||||
<isEqual property="searchCondition" compareValue="4" >
|
||||
AND A.CALL_TO LIKE CONCAT('%', #searchKeyword#, '%')
|
||||
</isEqual>
|
||||
</isNotEmpty>
|
||||
<isNotEmpty property="searchCondition01">
|
||||
AND B.RESERVE_YN = #searchCondition01#
|
||||
|
||||
@ -101,7 +101,6 @@
|
||||
, D.CODE_NM AS rcptTypeTxt
|
||||
, E.CONFIRM_YN AS confirmYn
|
||||
, E.RCPT_TYPE AS rcptType
|
||||
, E.CONFIRM_DATE AS confirmDate
|
||||
, IFNULL(MP.POINT, '0') AS point
|
||||
, EMI.EVENT_PG_MOID AS eventMoid
|
||||
, mber.SMISHING_YN AS smishingYn
|
||||
@ -150,7 +149,6 @@
|
||||
MOID
|
||||
, CONFIRM_YN
|
||||
, RCPT_TYPE
|
||||
, CONFIRM_DATE
|
||||
FROM
|
||||
MJ_TAX
|
||||
WHERE 1=1
|
||||
@ -2375,27 +2373,4 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="mjonPayDAO.selectPayDetail" parameterClass="mjonPayVO" resultClass="mjonPayVO">
|
||||
|
||||
SELECT
|
||||
LM.BIZ_NO AS bizNo
|
||||
, LM.MBER_NM AS mberNm
|
||||
, LM.MANAGER_NM AS managerNm
|
||||
, LM.MBTLNUM AS mbtlNum
|
||||
, LM.MBER_EMAIL_ADRES AS email
|
||||
, LM.PRE_PAYMENT_YN AS prePaymentYn
|
||||
, LM.DEPT AS dept
|
||||
, LM.USER_MONEY AS userMoney
|
||||
, MP.REG_DATE AS regDate
|
||||
, MP.AMT AS amt
|
||||
, MP.CASH AS cash
|
||||
, MP.PG_STATUS AS pgStatus
|
||||
FROM LETTNGNRLMBER LM
|
||||
LEFT JOIN MJ_PG MP
|
||||
ON MP.USER_ID = LM.MBER_ID
|
||||
WHERE LM.MBER_ID = #userId#
|
||||
AND MP.MOID = #moid#
|
||||
|
||||
</select>
|
||||
|
||||
</sqlMap>
|
||||
@ -980,7 +980,6 @@
|
||||
IFNULL(SLACK_NOTI, 'N') AS slackNoti,
|
||||
IFNULL(SMISHING_NOTI, 'N') AS smishingNoti,
|
||||
IFNULL(HOLI_SMISHING_NOTI, 'N') AS holiSmishingNoti,
|
||||
IFNULL(SMS_NOTI_IF_OVER_FIFTY, 'N') AS smsNotiIfOverFifty,
|
||||
LAST_UPDUSR_ID AS lasUpdusrId,
|
||||
LAST_UPDT_PNTTM AS lastUpdtPnttm
|
||||
FROM MJ_MBER_SETTING
|
||||
|
||||
@ -2142,38 +2142,4 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="mberManageDAO.selectMberHeaderInfo" resultClass="itn.let.uss.umt.service.MberManageVO" parameterClass="String">
|
||||
SELECT
|
||||
L.SHORT_PRICE AS shortPrice
|
||||
, L.LONG_PRICE AS longPrice
|
||||
, L.PICTURE_PRICE AS picturePrice
|
||||
, L.PICTURE2_PRICE AS picture2Price
|
||||
, L.PICTURE3_PRICE AS picture3Price
|
||||
, L.PRE_PAYMENT_YN AS prePaymentYn
|
||||
, L.USER_MONEY AS userMoney
|
||||
, IFNULL(MEMI.EVENT_SHORT_PRICE, 0) AS eventShortPrice
|
||||
, IFNULL(MEMI.EVENT_LONG_PRICE, 0) AS eventLongPrice
|
||||
, IFNULL(MEMI.EVENT_PICTURE_PRICE, 0) AS eventPicturePrice
|
||||
, IFNULL(MEMI.EVENT_PICTURE2_PRICE, 0) AS eventPicture2Price
|
||||
, IFNULL(MEMI.EVENT_PICTURE3_PRICE, 0) AS eventPicture3Price
|
||||
, IFNULL(MEMI.EVENT_REMAIN_CASH, 0) AS eventRemainCash
|
||||
, DATE_FORMAT(MEMI.EVENT_END_DATE, '%Y-%m-%d') AS eventEndDate
|
||||
FROM
|
||||
LETTNGNRLMBER L
|
||||
LEFT JOIN
|
||||
MJ_EVENT_MBER_INFO MEMI
|
||||
ON L.MBER_ID = MEMI.MBER_ID
|
||||
AND MEMI.EVENT_INFO_ID = (
|
||||
SELECT
|
||||
MAX(EVENT_INFO_ID)
|
||||
FROM
|
||||
MJ_EVENT_MBER_INFO
|
||||
WHERE
|
||||
MBER_ID = #mberID#
|
||||
AND EVENT_STATUS = 'Y'
|
||||
|
||||
)
|
||||
WHERE L.MBER_ID = #mberId#
|
||||
|
||||
</select>
|
||||
</sqlMap>
|
||||
|
||||
@ -1459,15 +1459,5 @@
|
||||
AND MONTH(REG_DATE) = MONTH(CURRENT_DATE)
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 마지막 결제수단 SELECT -->
|
||||
<select id="userManageDAO.selectLastPayMethod" parameterClass="String" resultClass="String">
|
||||
SELECT
|
||||
IFNULL(PAY_METHOD, '') AS nextPayMethod
|
||||
FROM MJ_PG
|
||||
WHERE
|
||||
USER_ID = #userId#
|
||||
ORDER BY REG_DATE DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
|
||||
</sqlMap>
|
||||
|
||||
@ -36,11 +36,6 @@
|
||||
<link rel="stylesheet" href="/publish/js/datepicker/classic.css">
|
||||
<link rel="stylesheet" href="/publish/js/datepicker/classic.date.css">
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/publish/js/highlight/styles/default.min.css">
|
||||
<link rel="stylesheet" href="/publish/js/highlight/styles/arta.css">
|
||||
|
||||
<script type="text/javascript" src="/publish/js/jquery-3.5.0.js"></script>
|
||||
<script type="text/javascript" src="/publish/js/jquery.mCustomScrollbar.concat.min.js"></script>
|
||||
<script type="text/javascript" src="/publish/js/common.js?date=202507210001"></script>
|
||||
@ -85,9 +80,6 @@
|
||||
|
||||
<!-- Uncaught TypeError: e.widget is not a function로 인해 가장 마지막에 선언_이준호_220510 -->
|
||||
<script type="text/javascript" src="/dist/js/tabulator/jquery_wrapper.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/publish/js/highlight/highlight.min.js"></script>
|
||||
|
||||
<%-- 20240110 matomo 사용 안함으로 인하여 주석처리 함
|
||||
|
||||
<c:if test="${fn:contains(pageContext.request.requestURL, 'munjaon.co.kr')}">
|
||||
|
||||
@ -904,6 +904,5 @@ function listAddrTransHistAjax(pageNo) {
|
||||
<input type="hidden" name="tr_url" id="tr_url" value = "${tr_url}">
|
||||
<input type="hidden" name="tr_add" id="tr_add" value = "${tr_add}">
|
||||
<input type="hidden" name="mberId" id="mberId" value= "${userId}">
|
||||
<input type="hidden" name="tr_ver" value = "V2">
|
||||
</form>
|
||||
|
||||
|
||||
@ -112,17 +112,16 @@ function insertAddrAjax() {
|
||||
// return;
|
||||
//}
|
||||
|
||||
if(!isValidPhoneNumber(form.addrPhoneNo.value)){//일반전화 유효성 검사
|
||||
const formattedNumber =formatPhoneNumber(form.addrPhoneNo.value); // 번호 표준화
|
||||
if(!isValidPhoneNumber(formattedNumber)){
|
||||
if(!checkHpNum(form.addrPhoneNo.value)){//휴대폰 유효성 검사
|
||||
if(!checkNorPhoneNum(form.addrPhoneNo.value)){//일반전화 유효성 검사
|
||||
|
||||
alert("잘못된 휴대폰번호 또는 일반전화 번호 입니다.");
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//휴대폰번호 포맷 맞추기
|
||||
form.addrPhoneNo.value = formatPhoneNumber(form.addrPhoneNo.value);
|
||||
|
||||
var data = new FormData(form);
|
||||
|
||||
$.ajax({
|
||||
|
||||
@ -26,7 +26,7 @@ function moveTab(type){
|
||||
<!-- tab button -->
|
||||
<ul class="tabType1">
|
||||
<li class="tab active"><button type="button" onclick="TabType6(this,'1');">네이버 주소록을 이용하여 폰주소록 등록</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType6(this,'2');listTab(this,'2');">핸드폰 VCF파일로 변환하여 등록</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType6(this,'2');">핸드폰 VCF파일로 변환하여 등록</button></li>
|
||||
</ul><!--// tab button -->
|
||||
</div>
|
||||
<!-- 네이버 주소록을 이용하여 등록 -->
|
||||
@ -98,8 +98,7 @@ function moveTab(type){
|
||||
</div><!--// 네이버 주소록을 이용하여 등록 - 안드로이드 -->
|
||||
|
||||
<!-- 네이버 주소록을 이용하여 등록 - 안드로이드 -->
|
||||
<!-- <div class="addWrap iphone eleType_cont" id="listTab_2"> -->
|
||||
<div class="addWrap iphone eleType_cont">
|
||||
<div class="addWrap iphone eleType_cont" id="listTab_2">
|
||||
<ul class="add_and">
|
||||
<li>
|
||||
<p class="number">01</p>
|
||||
@ -141,95 +140,49 @@ function moveTab(type){
|
||||
</div> <!-- // 네이버 주소록을 이용하여 등록-->
|
||||
<!-- 핸드폰 VCF파일로 변환하여 등록 -->
|
||||
<div class="enroll_cont" id="tab6_2">
|
||||
<ul class="adr_depth3">
|
||||
<li class="tab active"><button type="button" onclick="listTab(this,'2');">갤럭시</button></li>
|
||||
<li class="tab"><button type="button" onclick="listTab(this,'3');">아이폰</button></li>
|
||||
</ul>
|
||||
<div class="addWrap list_cont current galexy" id="listTab_2">
|
||||
<ul class="add_and">
|
||||
<li>
|
||||
<p class="number">01</p>
|
||||
<p class="txt">휴대폰 <strong>연락처 앱</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img01.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">02</p>
|
||||
<p>왼쪽 메뉴 클릭 후<br /><strong>연락처 관리 선택</strong></p>
|
||||
<img src="/publish/images/content/add_vcf_img02.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">03</p>
|
||||
<p>연락처 관리에서 <strong>연락처</strong><br /><strong>가져오기/내보내기</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img03.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">04</p>
|
||||
<p class="txt"><strong>연락처 내보내기</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img04.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">05</p>
|
||||
<p><strong>내장메모리</strong> 선택 후<br /><strong>핸드폰과 PC 연결</strong></p>
|
||||
<img src="/publish/images/content/add_vcf_img05.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">06</p>
|
||||
<p><strong>내 PC</strong>에서<br /><strong>본인 핸드폰 기종</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img06.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">07</p>
|
||||
<p><strong>연락처(VCF) 파일</strong> 선택 후<br />PC 복사(Ctrl+C/Ctrl+V),<br>드래그앤드롭)</p>
|
||||
<img src="/publish/images/content/add_vcf_img07.png" />
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnWrap">
|
||||
<button type="button" onclick="moveTab('addrApply'); return false;">주소록 입력 무료대행</button>
|
||||
<button type="button" onclick="moveTab('addr'); return false;">주소록 관리 바로가기</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="addWrap list_cont iphone vCard" id="listTab_3">
|
||||
<ul class="add_and">
|
||||
<li>
|
||||
<p class="number">01</p>
|
||||
<p class="txt">
|
||||
<strong>iCloud.com</strong> 접속 후<br> <strong>Apple 계정</strong>으로 로그인
|
||||
</p>
|
||||
<img src="/publish/images/content/add_vCard_iphone_img01.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">02</p>
|
||||
<p><strong>‘연락처’</strong> 앱 선택 및 실행 </p>
|
||||
<img src="/publish/images/content/add_vCard_iphone_img02.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">03</p>
|
||||
<p><strong>모든 연락처</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vCard_iphone_img03.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">04</p>
|
||||
<p class="txt"><strong>vCard</strong> 내보내기</p>
|
||||
<img src="/publish/images/content/add_vCard_iphone_img04.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">05</p>
|
||||
<p><strong>다운로드 폴더</strong>에<br><strong>iCloud vCards</strong> 파일로 저장</p>
|
||||
<img src="/publish/images/content/add_vCard_iphone_img05.png" />
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">06</p>
|
||||
<p><strong>연락처(vCards)</strong>파일 선택 후<br>
|
||||
<strong>PC 바탕화면</strong>에 <br>
|
||||
<strong>복사/붙여넣기</strong>(Ctrl+C/Ctrl+V)</p>
|
||||
<img src="/publish/images/content/add_vCard_iphone_img06.png" />
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnWrap">
|
||||
<button type="button" onclick="moveTab('addrApply'); return false;">주소록 입력 무료대행</button>
|
||||
<button type="button" onclick="moveTab('addr'); return false;">주소록 관리 바로가기</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="addWrap vcf">
|
||||
<ul class="add_and">
|
||||
<li>
|
||||
<p class="number">01</p>
|
||||
<p class="txt">휴대폰 <strong>연락처 앱</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img01.png"/>
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">02</p>
|
||||
<p>왼쪽 메뉴 클릭 후<br/><strong>연락처 관리 선택</strong></p>
|
||||
<img src="/publish/images/content/add_vcf_img02.png"/>
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">03</p>
|
||||
<p>연락처 관리에서 <strong>연락처</strong><br/><strong>가져오기/내보내기</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img03.png"/>
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">04</p>
|
||||
<p class="txt"><strong>연락처 내보내기</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img04.png"/>
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">05</p>
|
||||
<p><strong>내장메모리</strong> 선택 후<br/><strong>핸드폰과 PC 연결</strong></p>
|
||||
<img src="/publish/images/content/add_vcf_img05.png"/>
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">06</p>
|
||||
<p><strong>내 PC</strong>에서<br/><strong>본인 핸드폰 기종</strong> 선택</p>
|
||||
<img src="/publish/images/content/add_vcf_img06.png"/>
|
||||
</li>
|
||||
<li>
|
||||
<p class="number">07</p>
|
||||
<p><strong>연락처(VCF) 파일</strong> 선택 후<br/>PC 복사(Ctrl+C/Ctrl+V),<br>드래그앤드롭)</p>
|
||||
<img src="/publish/images/content/add_vcf_img07.png"/>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnWrap">
|
||||
<button type="button" onclick="moveTab('addrApply'); return false;">주소록 입력 무료대행</button>
|
||||
<button type="button" onclick="moveTab('addr'); return false;">주소록 관리 바로가기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--// 핸드폰 VCF파일로 변환하여 등록 -->
|
||||
</div><!--// 주소록 관리 - 폰주소록 등록 -->
|
||||
</div><!--// send top -->
|
||||
|
||||
@ -1,164 +0,0 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
<script language=javascript>
|
||||
$(document).ready(function(){
|
||||
|
||||
// 현재 url 추출
|
||||
/* var url = window.location.pathname;
|
||||
// 현재 url에서 uri만 추출
|
||||
var lastPart = url.split('/').pop();
|
||||
|
||||
|
||||
$('.tabType4 .tab').each(function(index) {
|
||||
var $btn = $(this).children("button");
|
||||
var id = $btn.attr("id");
|
||||
|
||||
// 개발가이드 그룹
|
||||
if (id === 'apiSpec' && /api.*Spec\.do$/.test(lastPart)) {
|
||||
$(this).addClass('active');
|
||||
}
|
||||
// 나머지 기본 처리
|
||||
else if (lastPart.indexOf(id) > -1) {
|
||||
$(this).addClass('active');
|
||||
}
|
||||
}); */
|
||||
|
||||
|
||||
});
|
||||
|
||||
hljs.highlightAll();
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.padding_add > p
|
||||
{
|
||||
padding-left: 30px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.padding_add > div > p
|
||||
{
|
||||
padding-left: 60px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<!-- content 영역 -->
|
||||
<div class="inner">
|
||||
<!-- send top -->
|
||||
<div class="send_top">
|
||||
|
||||
<c:import url="./top_tepMenu.jsp" /><!--// tab button -->
|
||||
|
||||
<!-- tab button -->
|
||||
<div class="api_guide_cont current">
|
||||
<div class="heading">
|
||||
<h2>REST API 개발 가이드</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<!--// sub tab button -->
|
||||
<c:import url="./top_subTepMenu.jsp" />
|
||||
|
||||
<!-- REST API 개발 가이드 > 문자 -->
|
||||
<%-- <div class="api_guide current" id="tab5_1">
|
||||
<div class="list_tab_wrap2 type3">
|
||||
<!-- tab button -->
|
||||
<ul class="list_tab">
|
||||
<li class="tab active"><button type="button" onclick="TabType1(this,'1')">문자보내기</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'2')" id="btnEstimate">문자보내기(대량)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'3')" id="btnEstimate3">전송내역조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'4')" id="btnEstimate4">전송결과조회(상세)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'5')" id="btnEstimate5">발송가능건수</button></li>
|
||||
</ul><!--// tab button -->
|
||||
</div>
|
||||
|
||||
<!-- 문자보내기 -->
|
||||
<div class="fee_cont current" id="tab1_1">
|
||||
<c:import url="./msg/apiSpec_tab1.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 문자보내기(대량) -->
|
||||
<div class="fee_cont" id="tab1_2">
|
||||
<c:import url="./msg/apiSpec_tab2.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 전송내역조회 -->
|
||||
<div class="fee_cont" id="tab1_3">
|
||||
<c:import url="./msg/apiSpec_tab3.jsp" />
|
||||
</div>
|
||||
<!-- 전송결과조회(상세) -->
|
||||
<div class="fee_cont" id="tab1_4">
|
||||
<c:import url="./msg/apiSpec_tab4.jsp" />
|
||||
</div>
|
||||
<!-- 발송가능건수 -->
|
||||
<div class="fee_cont" id="tab1_5">
|
||||
<c:import url="./msg/apiSpec_tab5.jsp" />
|
||||
</div>
|
||||
</div> --%>
|
||||
<!-- //REST API 개발 가이드 > 문자 -->
|
||||
|
||||
<!-- REST API 개발 가이드 > 알림톡 -->
|
||||
<div class="api_guide current" id="tab5_1">
|
||||
<div class="list_tab_wrap2 type3">
|
||||
<!-- tab button -->
|
||||
<ul class="list_tab">
|
||||
|
||||
<li class="tab active"><button type="button" onclick="TabType1(this,'1');">채널 ID 조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'2');">템플릿 ID 조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'3');">템플릿상세조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'4');">알림톡 보내기</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'5');">전송내역조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'6');">전송내역조회(상세)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'7');">발송가능건수</button></li>
|
||||
|
||||
</ul><!--// tab button -->
|
||||
</div>
|
||||
|
||||
<!-- 채널 ID 조회 -->
|
||||
<div class="fee_cont current" id="tab1_1">
|
||||
<c:import url="./at/apiSpec_tab1.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 템플릿 ID 조회 -->
|
||||
<div class="fee_cont" id="tab1_2">
|
||||
<c:import url="./at/apiSpec_tab2.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 템플릿상세조회 -->
|
||||
<div class="fee_cont" id="tab1_3">
|
||||
<c:import url="./at/apiSpec_tab3.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 알림톡 보내기 -->
|
||||
<div class="fee_cont" id="tab1_4">
|
||||
<c:import url="./at/apiSpec_tab4.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 전송내역조회 -->
|
||||
<div class="fee_cont" id="tab1_5">
|
||||
<c:import url="./at/apiSpec_tab6.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 전송내역조회(상세) -->
|
||||
<div class="fee_cont" id="tab1_6">
|
||||
<c:import url="./at/apiSpec_tab7.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 발송가능건수 -->
|
||||
<div class="fee_cont" id="tab1_7">
|
||||
<c:import url="./at/apiSpec_tab8.jsp" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- //REST API 개발 가이드 > 알림톡 -->
|
||||
</div>
|
||||
</div><!--// send top -->
|
||||
</div>
|
||||
@ -1,111 +0,0 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
<script language=javascript>
|
||||
$(document).ready(function(){
|
||||
|
||||
// 현재 url 추출
|
||||
/* var url = window.location.pathname;
|
||||
// 현재 url에서 uri만 추출
|
||||
var lastPart = url.split('/').pop();
|
||||
|
||||
|
||||
$('.tabType4 .tab').each(function(index) {
|
||||
var $btn = $(this).children("button");
|
||||
var id = $btn.attr("id");
|
||||
|
||||
// 개발가이드 그룹
|
||||
if (id === 'apiSpec' && /api.*Spec\.do$/.test(lastPart)) {
|
||||
$(this).addClass('active');
|
||||
}
|
||||
// 나머지 기본 처리
|
||||
else if (lastPart.indexOf(id) > -1) {
|
||||
$(this).addClass('active');
|
||||
}
|
||||
}); */
|
||||
|
||||
|
||||
});
|
||||
|
||||
hljs.highlightAll();
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.padding_add > p
|
||||
{
|
||||
padding-left: 30px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.padding_add > div > p
|
||||
{
|
||||
padding-left: 60px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<!-- content 영역 -->
|
||||
<div class="inner">
|
||||
<!-- send top -->
|
||||
<div class="send_top">
|
||||
|
||||
<c:import url="./top_tepMenu.jsp" /><!--// tab button -->
|
||||
|
||||
<!-- tab button -->
|
||||
<div class="api_guide_cont current">
|
||||
<div class="heading">
|
||||
<h2>REST API 개발 가이드</h2>
|
||||
</div>
|
||||
<!--// sub tab button -->
|
||||
<c:import url="./top_subTepMenu.jsp" />
|
||||
<!-- REST API 개발 가이드 > 알림톡 -->
|
||||
<div class="api_guide current" id="tab5_1">
|
||||
<div class="list_tab_wrap2 type3">
|
||||
<!-- tab button -->
|
||||
<ul class="list_tab">
|
||||
|
||||
<li class="tab active"><button type="button" onclick="TabType1(this,'1');">채널 ID 조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'2');">친구톡 보내기</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'3');">전송내역조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'4');">전송내역조회(상세)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'5');">발송가능건수</button></li>
|
||||
|
||||
</ul><!--// tab button -->
|
||||
</div>
|
||||
|
||||
<!-- 채널 ID 조회 -->
|
||||
<div class="fee_cont current" id="tab1_1">
|
||||
<c:import url="./ft/apiSpec_tab1.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 알림톡 보내기 -->
|
||||
<div class="fee_cont" id="tab1_2">
|
||||
<c:import url="./ft/apiSpec_tab2.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 전송내역조회 -->
|
||||
<div class="fee_cont" id="tab1_3">
|
||||
<c:import url="./ft/apiSpec_tab3.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 전송내역조회(상세) -->
|
||||
<div class="fee_cont" id="tab1_4">
|
||||
<c:import url="./ft/apiSpec_tab4.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 발송가능건수 -->
|
||||
<div class="fee_cont" id="tab1_5">
|
||||
<c:import url="./ft/apiSpec_tab5.jsp" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- //REST API 개발 가이드 > 알림톡 -->
|
||||
</div>
|
||||
</div><!--// send top -->
|
||||
</div>
|
||||
@ -2,21 +2,11 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
<script language=javascript>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.topBtn').click(function(){
|
||||
|
||||
location.href=$(this).data('info');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
hljs.highlightAll();
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@ -35,7 +25,6 @@ $(document).ready(function(){
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<!-- content 영역 -->
|
||||
<div class="inner">
|
||||
<!-- send top -->
|
||||
@ -44,54 +33,47 @@ $(document).ready(function(){
|
||||
<c:import url="./top_tepMenu.jsp" /><!--// tab button -->
|
||||
|
||||
<!-- tab button -->
|
||||
<div class="api_guide_cont current">
|
||||
<div class="api_guide_cont current" id="tab5_1">
|
||||
<div class="heading">
|
||||
<h2>REST API 개발 가이드</h2>
|
||||
<h2>REST API 설명</h2>
|
||||
</div>
|
||||
<div class="pay_tab_wrap">
|
||||
<!-- tab button -->
|
||||
<ul class="tabType1">
|
||||
<li class="tab active"><button type="button" onclick="TabType1(this,'1')">문자보내기</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'2')" id="btnEstimate">문자보내기(대량)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'3')" id="btnEstimate3">전송내역조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'4')" id="btnEstimate4">전송결과조회(상세)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'5')" id="btnEstimate5">발송가능건수</button></li>
|
||||
</ul><!--// tab button -->
|
||||
</div>
|
||||
|
||||
<!-- 문자보내기 -->
|
||||
<!-- 문자보내기 -->
|
||||
<!-- 문자보내기 -->
|
||||
<div class="fee_cont current" id="tab1_1">
|
||||
<c:import url="./apiSpec_tab1.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 문자보내기(대량) -->
|
||||
<!-- 문자보내기(대량) -->
|
||||
<!-- 문자보내기(대량) -->
|
||||
<div class="fee_cont" id="tab1_2">
|
||||
<c:import url="./apiSpec_tab2.jsp" />
|
||||
</div>
|
||||
|
||||
<!--// sub tab button -->
|
||||
<c:import url="./top_subTepMenu.jsp" />
|
||||
|
||||
<!-- REST API 개발 가이드 > 문자 -->
|
||||
<div class="api_guide current" id="tab5_1">
|
||||
<div class="list_tab_wrap2 type3">
|
||||
<!-- tab button -->
|
||||
<ul class="list_tab">
|
||||
<li class="tab active"><button type="button" onclick="TabType1(this,'1')">문자보내기</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'2')" id="btnEstimate">문자보내기(대량)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'3')" id="btnEstimate3">전송내역조회</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'4')" id="btnEstimate4">전송결과조회(상세)</button></li>
|
||||
<li class="tab"><button type="button" onclick="TabType1(this,'5')" id="btnEstimate5">발송가능건수</button></li>
|
||||
</ul><!--// tab button -->
|
||||
</div>
|
||||
|
||||
<!-- 문자보내기 -->
|
||||
<div class="fee_cont current" id="tab1_1">
|
||||
<c:import url="./msg/apiSpec_tab1.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 문자보내기(대량) -->
|
||||
<div class="fee_cont" id="tab1_2">
|
||||
<c:import url="./msg/apiSpec_tab2.jsp" />
|
||||
</div>
|
||||
|
||||
<!-- 전송내역조회 -->
|
||||
<div class="fee_cont" id="tab1_3">
|
||||
<c:import url="./msg/apiSpec_tab3.jsp" />
|
||||
</div>
|
||||
<!-- 전송결과조회(상세) -->
|
||||
<div class="fee_cont" id="tab1_4">
|
||||
<c:import url="./msg/apiSpec_tab4.jsp" />
|
||||
</div>
|
||||
<!-- 발송가능건수 -->
|
||||
<div class="fee_cont" id="tab1_5">
|
||||
<c:import url="./msg/apiSpec_tab5.jsp" />
|
||||
</div>
|
||||
<!-- 전송내역조회 -->
|
||||
<div class="fee_cont" id="tab1_3">
|
||||
<c:import url="./apiSpec_tab3.jsp" />
|
||||
</div>
|
||||
<!-- 전송결과조회(상세) -->
|
||||
<div class="fee_cont" id="tab1_4">
|
||||
<c:import url="./apiSpec_tab4.jsp" />
|
||||
</div>
|
||||
<!-- 발송가능건수 -->
|
||||
<div class="fee_cont" id="tab1_5">
|
||||
<c:import url="./apiSpec_tab5.jsp" />
|
||||
</div>
|
||||
<!-- //REST API 개발 가이드 > 문자 -->
|
||||
|
||||
<!-- REST API 개발 가이드 > 알림톡 -->
|
||||
<!-- //REST API 개발 가이드 > 친구톡 -->
|
||||
</div>
|
||||
</div><!--// send top -->
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
|
||||
<ul class="info">
|
||||
<li>- 문자온 사이트 및 API를 통해 전송된 발송내역을 조회할 수 있습니다.</li>
|
||||
<li>- 문자온 사이트 및 API를 통해 전송된 문자 발송내역을 조회할 수 있습니다.</li>
|
||||
<li>- 문자 발송내역은 날짜별로 조회되며, 최근 3개월까지만 조회 가능합니다.</li>
|
||||
<li>- 발신번호별 문자 발송내역 조회 기능은 제공되지 않습니다.</li>
|
||||
</ul>
|
||||
@ -242,7 +242,7 @@ function fn_reg_user_4_apikey(){
|
||||
var form = document.checkForm;
|
||||
var data = new FormData(form);
|
||||
|
||||
if(confirm("API를 신청하시겠습니까?")) {
|
||||
if(confirm("API 신청하시겠습니까?")) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/uss/ion/apikey/UserAPIInsertAPIKEYAjax.do",
|
||||
@ -299,10 +299,6 @@ function fn_reg_user_4_apikey(){
|
||||
<!--신청/관리 내용-->
|
||||
<!--API 신청 정보 : 신청 전-->
|
||||
<div class="api_admin">
|
||||
<ul class="info">
|
||||
<li>- 서비스 사용 신청 시, 문자 및 카카오톡 연동서비스를 모두 이용하실 수 있습니다.</li>
|
||||
<li>- 관리자 승인 이후 발송 서버 IP를 등록해 주셔야 합니다.</li>
|
||||
</ul>
|
||||
<div class="admin_title">API 신청 정보</div>
|
||||
<div class="tb_wrap_t1">
|
||||
<table class="tType4">
|
||||
|
||||
@ -1,239 +0,0 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
|
||||
|
||||
<ul class="info">
|
||||
<li>- API를 통해서 채널 ID를 조회할 수 있습니다.</li>
|
||||
<!-- <li>- 발신번호는 문자온 사이트를 통해 사전등록 후 이용하실 수 있습니다.(마이페이지-발신번호 관리 메뉴 이용)</li> -->
|
||||
<!-- <li>- 문자 내용이 "90byte"를 초과하는 경우 장문(LMS)으로 자동 전환됩니다.</li> -->
|
||||
</ul>
|
||||
<div class="re_cont">
|
||||
<!-- Request -->
|
||||
<div class="req_title">Request</div>
|
||||
<div class="box">
|
||||
<div class="text">
|
||||
<h4>Request</h4>
|
||||
<table>
|
||||
<caption>API Request Http Method, 프로토콜, HOST, Service Port, Endpoint 정보 테이블</caption>
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:80%;">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>Http Method</th>
|
||||
<td>POST</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>프로토콜</th>
|
||||
<td>HTTPS/1.1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>HOST</th>
|
||||
<td>api.munjaon.co.kr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Service Port</th>
|
||||
<td>443</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Endpoint</th>
|
||||
<td>/api/kakao/inqry/chnlId</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="type_table">
|
||||
<table>
|
||||
<caption>채널ID 조회 API Request 키 종류 및 설명, 타입, 필수 여부 테이블</caption>
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:45%;">
|
||||
<col style="width:25%">
|
||||
<col style="width:10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>키</th>
|
||||
<th>설명</th>
|
||||
<th>타입</th>
|
||||
<th>필수</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><span class="font_b">mberId</span></td>
|
||||
<td>사용자 ID</td>
|
||||
<td>String</td>
|
||||
<td><span class="select_o">O</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">accessKey</span></td>
|
||||
<td>인증용 API Key</td>
|
||||
<td>String</td>
|
||||
<td><span class="select_o">O</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">test_yn</span></td>
|
||||
<td>테스트 데이터 여부 (YS: 성공 테스트, YF: 실패 테스트)</td>
|
||||
<td>String</td>
|
||||
<td><span class="select_x">X</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table_info">
|
||||
<p>※ HTTPS 프로토콜을 사용하여 POST로 요청합니다.</p>
|
||||
<p>※ Content-Type: application/json</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="title">[Example]</div>
|
||||
<div class="code_view">
|
||||
<pre>
|
||||
<code class="language-json">
|
||||
{
|
||||
|
||||
"mberId": "홍길동",
|
||||
|
||||
"accessKey": "XXXXXXXXXXXXXX414050694b953",
|
||||
|
||||
"test_yn": ""
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<!-- // Request -->
|
||||
|
||||
<!-- Response -->
|
||||
<div class="res_title">Response</div>
|
||||
<div class="type_table">
|
||||
<table>
|
||||
<caption>채널ID 조회 API Response 키 종류 및 설명, 타입 테이블</caption>
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:60%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>키</th>
|
||||
<th>설명</th>
|
||||
<th>타입</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><span class="font_b">resultCode</span></td>
|
||||
<td>성공 여부("0" 이외는 실패)</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">data</span></td>
|
||||
<td>조회 결과 목록(성공 시 배열, 실패 시 오류 메시지)</td>
|
||||
<td>Array | String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].senderKey</span></td>
|
||||
<td>발신 프로필 SenderKey</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].phoneNumber</span></td>
|
||||
<td>대표 전화번호</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].yellowId</span></td>
|
||||
<td>카카오 채널(옐로아이디)</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].frstRegistPnttm</span></td>
|
||||
<td>최초 등록 일시(YYYY-MM-DD HH:mm:ss)</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].frstRegisterId</span></td>
|
||||
<td>최초 등록자 ID</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">localDateTime</span></td>
|
||||
<td>서버 처리 일시(ISO-8601)</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table_info">
|
||||
<p>※ JSON 객체로 응답합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="title_t1"><span class="ex">[Example]</span><span class="ex_success">O 성공 예시</span></div>
|
||||
<div class="code_view">
|
||||
<pre>
|
||||
<code class="language-json">
|
||||
{
|
||||
"resultCode": "0",
|
||||
|
||||
"data": [
|
||||
|
||||
{
|
||||
|
||||
"senderKey": "test_sender_key_001",
|
||||
|
||||
"phoneNumber": "02-1234-0000",
|
||||
|
||||
"yellowId": "@test_channel_001",
|
||||
|
||||
"frstRegistPnttm": "2025-09-09 12:44:21",
|
||||
|
||||
"frstRegisterId": "test_id_one"
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"senderKey": "test_sender_key_002",
|
||||
|
||||
"phoneNumber": "02-1234-0001",
|
||||
|
||||
"yellowId": "@test_channel_002",
|
||||
|
||||
"frstRegistPnttm": "2025-09-09 12:44:21",
|
||||
|
||||
"frstRegisterId": "test_id_tow"
|
||||
|
||||
}
|
||||
|
||||
],
|
||||
|
||||
"localDateTime": "2025-09-09T12:44:21.624464"
|
||||
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="title_t1"><span class="ex">[Example]</span><span class="ex_fail">X 실패 예시</span></div>
|
||||
<div class="code_view">
|
||||
<pre><code class="language-json">
|
||||
{
|
||||
|
||||
"resultCode": "2099",
|
||||
|
||||
"data": "기타 시스템 오류"
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<!-- // Response -->
|
||||
</div>
|
||||
<!--// Response-->
|
||||
|
||||
@ -1,271 +0,0 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
|
||||
|
||||
<ul class="info">
|
||||
<li>- 등록된 알림톡 템플릿 목록을 조회할 수 있습니다.</li>
|
||||
<li>- SenderKey별로 승인된 템플릿만 조회됩니다.</li>
|
||||
<li>- 템플릿 상태(등록완료, 승인대기 등)를 확인할 수 있습니다.</li>
|
||||
</ul>
|
||||
<div class="re_cont">
|
||||
<!-- Request -->
|
||||
<div class="req_title">Request</div>
|
||||
<div class="box">
|
||||
<div class="text">
|
||||
<h4>Request</h4>
|
||||
<table>
|
||||
<caption>API Request Http Method, 프로토콜, HOST, Service Port, Endpoint 정보 테이블</caption>
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:80%;">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>Http Method</th>
|
||||
<td>POST</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>프로토콜</th>
|
||||
<td>HTTPS/1.1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>HOST</th>
|
||||
<td>api.munjaon.co.kr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Service Port</th>
|
||||
<td>443</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Endpoint</th>
|
||||
<td>/api/kakao/inqry/templates/list</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="type_table">
|
||||
<table>
|
||||
<caption>템플릿 목록 조회 API Request 키 종류 및 설명, 타입, 필수 여부 테이블</caption>
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:45%;">
|
||||
<col style="width:25%">
|
||||
<col style="width:10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>키</th>
|
||||
<th>설명</th>
|
||||
<th>타입</th>
|
||||
<th>필수</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><span class="font_b">mberId</span></td>
|
||||
<td>사용자 ID</td>
|
||||
<td>String</td>
|
||||
<td><span class="select_o">O</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">accessKey</span></td>
|
||||
<td>인증용 API Key</td>
|
||||
<td>String</td>
|
||||
<td><span class="select_o">O</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">senderKey</span></td>
|
||||
<td>발신 프로필 SenderKey</td>
|
||||
<td>String</td>
|
||||
<td><span class="select_o">O</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">test_yn</span></td>
|
||||
<td>테스트 데이터 여부 (YS: 성공 테스트, YF: 실패 테스트)</td>
|
||||
<td>String</td>
|
||||
<td><span class="select_x">X</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table_info">
|
||||
<p>※ HTTPS 프로토콜을 사용하여 POST로 요청합니다.</p>
|
||||
<p>※ Content-Type: application/json</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="title">[Example]</div>
|
||||
<div class="code_view">
|
||||
<pre>
|
||||
<code class="language-json">
|
||||
{
|
||||
|
||||
"mberId": "홍길동",
|
||||
|
||||
"accessKey": "XXXXXXXXXXXXXX414050694b953",
|
||||
|
||||
"senderKey": "XXXXXXXXXXXXXX669143473b1af",
|
||||
|
||||
"test_yn": ""
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<!-- // Request -->
|
||||
|
||||
<!-- Response -->
|
||||
<div class="res_title">Response</div>
|
||||
<div class="type_table">
|
||||
<table>
|
||||
<caption>템플릿 목록 조회 API Response 키 종류 및 설명, 타입 테이블</caption>
|
||||
<colgroup>
|
||||
<col style="width:20%;">
|
||||
<col style="width:60%;">
|
||||
<col style="width:20%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>키</th>
|
||||
<th>설명</th>
|
||||
<th>타입</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><span class="font_b">resultCode</span></td>
|
||||
<td>성공 여부("0" 이외는 실패)</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">data</span></td>
|
||||
<td>조회 결과 목록(성공 시 배열, 실패 시 오류 메시지)</td>
|
||||
<td>Array | String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].senderKey</span></td>
|
||||
<td>발신 프로필 SenderKey</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].templateCode</span></td>
|
||||
<td>템플릿 코드</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].templateName</span></td>
|
||||
<td>템플릿 명</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].createdAt</span></td>
|
||||
<td>템플릿 생성 일시</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].modifiedAt</span></td>
|
||||
<td>템플릿 수정 일시</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">[data][i].serviceStatus</span></td>
|
||||
<td>서비스 상태(등록완료, 승인대기 등)</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="font_b">localDateTime</span></td>
|
||||
<td>서버 처리 일시(ISO-8601)</td>
|
||||
<td>String</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table_info">
|
||||
<p>※ JSON 객체로 응답합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="title_t1"><span class="ex">[Example]</span><span class="ex_success">O 성공 예시</span></div>
|
||||
<div class="code_view">
|
||||
<pre>
|
||||
<code class="language-json">
|
||||
{
|
||||
"resultCode": "0",
|
||||
|
||||
"data": [
|
||||
|
||||
{
|
||||
|
||||
"senderKey": "test_sender_key_001",
|
||||
|
||||
"templateCode": "TEST_TEMPLATE_001",
|
||||
|
||||
"templateName": "테스트 템플릿 001",
|
||||
|
||||
"createdAt": "2025-01-01 10:00:00",
|
||||
|
||||
"modifiedAt": "2025-01-01 10:00:00",
|
||||
|
||||
"serviceStatus": "REG(등록완료)"
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"senderKey": "test_sender_key_001",
|
||||
|
||||
"templateCode": "TEST_TEMPLATE_002",
|
||||
|
||||
"templateName": "테스트 템플릿 002",
|
||||
|
||||
"createdAt": "2025-01-01 11:00:00",
|
||||
|
||||
"modifiedAt": "2025-01-01 11:00:00",
|
||||
|
||||
"serviceStatus": "REG(등록완료)"
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"senderKey": "test_sender_key_002",
|
||||
|
||||
"templateCode": "TEST_TEMPLATE_003",
|
||||
|
||||
"templateName": "테스트 템플릿 003",
|
||||
|
||||
"createdAt": "2025-01-01 12:00:00",
|
||||
|
||||
"modifiedAt": "2025-01-01 12:00:00",
|
||||
|
||||
"serviceStatus": "PENDING(승인대기)"
|
||||
|
||||
}
|
||||
|
||||
],
|
||||
|
||||
"localDateTime": "2025-09-09T14:18:38.445175"
|
||||
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="title_t1"><span class="ex">[Example]</span><span class="ex_fail">X 실패 예시</span></div>
|
||||
<div class="code_view">
|
||||
<pre><code class="language-json">
|
||||
{
|
||||
|
||||
"resultCode": "4010",
|
||||
|
||||
"data": "인증 정보가 올바르지 않습니다.(mberId/accessKey)"
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<!-- // Response -->
|
||||
</div>
|
||||
<!--// Response-->
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user