api 발송 수정

This commit is contained in:
hehihoho3@gmail.com 2025-06-30 11:24:23 +09:00
parent 1a3088e5f5
commit f7e96648a8
3 changed files with 124 additions and 129 deletions

View File

@ -828,13 +828,13 @@ public class KakaoAlimTalkSendController {
modelAndView.setViewName("jsonView"); modelAndView.setViewName("jsonView");
try { try {
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; // LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); // String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
if(userId == "") { // if(userId == "") {
modelAndView.addObject("result", "notLogin"); // modelAndView.addObject("result", "notLogin");
return modelAndView; // return modelAndView;
}else { // }else {
KakaoReturnVO kakaoTemplateTempList = kakaoApiTemplate.selectKakaoApiTemplate(kakaoVO); KakaoReturnVO kakaoTemplateTempList = kakaoApiTemplate.selectKakaoApiTemplate(kakaoVO);
@ -850,7 +850,7 @@ public class KakaoAlimTalkSendController {
modelAndView.addObject("kakaoTemplateList", kakaoTemplateTempList); modelAndView.addObject("kakaoTemplateList", kakaoTemplateTempList);
modelAndView.addObject("result", "success"); modelAndView.addObject("result", "success");
} // }
}catch(Exception ex){ }catch(Exception ex){
ex.printStackTrace(); ex.printStackTrace();
modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.select")); modelAndView.addObject("message", egovMessageSource.getMessage("fail.common.select"));

View File

@ -1,94 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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:egov-security="http://www.egovframe.go.kr/schema/egov-security"
xmlns:security="http://www.springframework.org/schema/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 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.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"> 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="/css/**" security="none"/>
<security:http pattern="/html/**" security="none"/> <security:http pattern="/html/**" security="none"/>
<security:http pattern="/images/**" security="none"/> <security:http pattern="/images/**" security="none"/>
<security:http pattern="/js/**" security="none"/> <security:http pattern="/js/**" security="none"/>
<security:http pattern="/resource/**" security="none"/> <security:http pattern="/resource/**" security="none"/>
<security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/> <security:http pattern="\A/WEB-INF/jsp/.*\Z" request-matcher="regex" security="none"/>
<egov-security:config id="securityConfig" <egov-security:config id="securityConfig"
loginUrl="/uat/uia/actionMain.do" loginUrl="/uat/uia/actionMain.do"
logoutSuccessUrl="/uat/uia/actionMain.do" logoutSuccessUrl="/uat/uia/actionMain.do"
loginFailureUrl="/uat/uia/actionSecurityLogin.do?login_error=1" loginFailureUrl="/uat/uia/actionSecurityLogin.do?login_error=1"
accessDeniedUrl="/sec/ram/accessDenied.do" accessDeniedUrl="/sec/ram/accessDenied.do"
dataSource="egov.dataSource" dataSource="egov.dataSource"
jdbcUsersByUsernameQuery="SELECT USER_ID, ESNTL_ID AS PASSWORD, 1 ENABLED, USER_NM, USER_ZIP, 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, USER_ADRES, USER_EMAIL, USER_SE, '-' ORGNZT_ID, ESNTL_ID, MBTLNUM AS MOBLPHONNO,
'-' ORGNZT_NM, AUTHOR_CODE AS AUTHORITY, DEPT '-' ORGNZT_NM, AUTHOR_CODE AS AUTHORITY, DEPT
FROM COMVNUSERMASTER A FROM COMVNUSERMASTER A
INNER JOIN LETTNEMPLYRSCRTYESTBS B ON A.ESNTL_ID = B.SCRTY_DTRMN_TRGET_ID INNER JOIN LETTNEMPLYRSCRTYESTBS B ON A.ESNTL_ID = B.SCRTY_DTRMN_TRGET_ID
WHERE CONCAT(USER_SE, USER_ID) = ?" WHERE CONCAT(USER_SE, USER_ID) = ?"
jdbcAuthoritiesByUsernameQuery="SELECT A.SCRTY_DTRMN_TRGET_ID USER_ID, A.AUTHOR_CODE AUTHORITY jdbcAuthoritiesByUsernameQuery="SELECT A.SCRTY_DTRMN_TRGET_ID USER_ID, A.AUTHOR_CODE AUTHORITY
FROM LETTNEMPLYRSCRTYESTBS A, COMVNUSERMASTER B FROM LETTNEMPLYRSCRTYESTBS A, COMVNUSERMASTER B
WHERE A.SCRTY_DTRMN_TRGET_ID = B.ESNTL_ID AND B.USER_ID = ?" WHERE A.SCRTY_DTRMN_TRGET_ID = B.ESNTL_ID AND B.USER_ID = ?"
jdbcMapClass="itn.let.uat.uia.service.impl.EgovSessionMapping" jdbcMapClass="itn.let.uat.uia.service.impl.EgovSessionMapping"
requestMatcherType="regex" requestMatcherType="regex"
hash="plaintext" hash="plaintext"
hashBase64="false" hashBase64="false"
concurrentMaxSessons="999" concurrentMaxSessons="999"
concurrentExpiredUrl="/" concurrentExpiredUrl="/"
defaultTargetUrl="/uat/uia/actionMain.do" defaultTargetUrl="/uat/uia/actionMain.do"
/> />
<!--원 소스 --> <!--원 소스 -->
<!-- defaultTargetUrl="/uat/uia/actionMain.do" --> <!-- defaultTargetUrl="/uat/uia/actionMain.do" -->
<!-- sqlHierarchicalRoles=" <!-- sqlHierarchicalRoles="
SELECT a.CHLDRN_ROLE child, a.PARNTS_ROLE parent 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)" --> FROM LETTNROLES_HIERARCHY a LEFT JOIN LETTNROLES_HIERARCHY b on (a.CHLDRN_ROLE = b.PARNTS_ROLE)" -->
<egov-security:secured-object-config id="securedObjectConfig" <egov-security:secured-object-config id="securedObjectConfig"
roleHierarchyString=" roleHierarchyString="
ROLE_ADMIN > ROLE_USER_MEMBER ROLE_ADMIN > ROLE_USER_MEMBER
ROLE_USER_MEMBER > ROLE_ANONYMOUS" ROLE_USER_MEMBER > ROLE_ANONYMOUS"
sqlRolesAndUrl=" sqlRolesAndUrl="
SELECT a.ROLE_PTTRN url, b.AUTHOR_CODE authority SELECT a.ROLE_PTTRN url, b.AUTHOR_CODE authority
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'url' WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'url'
ORDER BY a.ROLE_SORT" ORDER BY a.ROLE_SORT"
sqlRolesAndMethod=" sqlRolesAndMethod="
SELECT a.ROLE_PTTRN method, b.AUTHOR_CODE authority SELECT a.ROLE_PTTRN method, b.AUTHOR_CODE authority
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'method' WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'method'
ORDER BY a.ROLE_SORT" ORDER BY a.ROLE_SORT"
sqlRolesAndPointcut=" sqlRolesAndPointcut="
SELECT a.ROLE_PTTRN pointcut, b.AUTHOR_CODE authority SELECT a.ROLE_PTTRN pointcut, b.AUTHOR_CODE authority
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'pointcut' WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'pointcut'
ORDER BY a.ROLE_SORT" ORDER BY a.ROLE_SORT"
sqlRegexMatchedRequestMapping=" sqlRegexMatchedRequestMapping="
SELECT a.resource_pattern uri, b.authority authority SELECT a.resource_pattern uri, b.authority authority
FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b FROM LETTNROLEINFO a, LETTNAUTHORROLERELATE b
WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'regex' WHERE a.ROLE_CODE = b.ROLE_CODE AND a.ROLE_TY = 'regex'
ORDER BY a.ROLE_SORT" ORDER BY a.ROLE_SORT"
/> />
<egov-security:initializer id="initializer" supportMethod="true" supportPointcut="false" /> <egov-security:initializer id="initializer" supportMethod="true" supportPointcut="false" />
<!-- URL에 세미콜론(semicolon)허용 여부(기본값/false) --> <!-- URL에 세미콜론(semicolon)허용 여부(기본값/false) -->
<bean id="egovStrictHttpFirewall" class="org.springframework.security.web.firewall.StrictHttpFirewall"> <bean id="egovStrictHttpFirewall" class="org.springframework.security.web.firewall.StrictHttpFirewall">
<property name="allowSemicolon" value="true"/> <property name="allowSemicolon" value="true"/>
</bean> </bean>
<security:http-firewall ref="egovStrictHttpFirewall"/> <security:http-firewall ref="egovStrictHttpFirewall"/>
</beans> </beans>

View File

@ -113,46 +113,47 @@
<tbody> <tbody>
<tr> <tr>
<td><span class="font_b">resultCode</span></td> <td><span class="font_b">resultCode</span></td>
<td>성공 여부("0" 아니면 실패)</td> <td>성공 여부 ("0" 이면 성공, 그 외는 실패)</td>
<td>String</td> <td>String</td>
</tr> </tr>
<tr> <tr>
<td><span class="font_b">data</span></td> <td><span class="font_b">data</span></td>
<td>결과값 객체(성공 : 데이터, 실패 : 메시지)</td> <td>응답 결과 객체 (성공 시 배열, 실패 시 메시지)</td>
<td>Object</td> <td>Array&lt;Object&gt;</td>
</tr> </tr>
<tr> <tr>
<td><span class="font_b">[data].msgGroupId</span></td> <td><span class="font_b">data[].userId</span></td>
<td>메시지 그룹 ID</td> <td>사용자 ID</td>
<td>String</td> <td>String</td>
</tr> </tr>
<tr> <tr>
<td><span class="font_b">[data].msgType</span></td> <td><span class="font_b">data[].senderKey</span></td>
<td>메시지 타입(4 : 단문, 6 : 장문)</td> <td>발신자 키</td>
<td>String</td> <td>String</td>
</tr> </tr>
<tr> <tr>
<td><span class="font_b">[data].blockCnt</span></td> <td><span class="font_b">data[].phoneNumber</span></td>
<td>수신거부 건수</td> <td>수신자 전화번호</td>
<td>String</td> <td>String</td>
</tr> </tr>
<tr> <tr>
<td><span class="font_b">[data].failCnt</span></td> <td><span class="font_b">data[].yellowId</span></td>
<td>전송 실패 건수</td> <td>카카오톡 채널 ID</td>
<td>String</td> <td>String</td>
</tr> </tr>
<tr> <tr>
<td><span class="font_b">[data].successCnt</span></td> <td><span class="font_b">data[].firstRegistPnttm</span></td>
<td>성공 건수</td> <td>최초 등록 시각 (yyyyMMdd HH:mm:ss)</td>
<td>String</td> <td>String</td>
</tr> </tr>
<tr> <tr>
<td><span class="font_b">[data].test_yn</span></td> <td><span class="font_b">data[].firstRegisterId</span></td>
<td>테스트 데이터 여부</td> <td>최초 등록자 ID</td>
<td>String</td> <td>String</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="table_info"> <div class="table_info">
<p>※ JSON 객체로 응답합니다.</p> <p>※ JSON 객체로 응답합니다.</p>
</div> </div>
@ -173,25 +174,19 @@
</p> </p>
<div class="indent_t1"> <div class="indent_t1">
<p> <p>
<span>"msgGroupId"</span>:"MSGGID_0000000000000" ,<span>"senderKey"</span>:"6691434xxxxxxxxxxxxxxxxxxxxxxxxx"
</p> </p>
<p> <p>
,<span>"msgType"</span>:"SMS" ,<span>""phoneNumber"</span>:"010xxxxxxxx"
</p> </p>
<p> <p>
,<span>"resultCode"</span>:"0" ,<span>"yellowId"</span>:"@ID"
</p> </p>
<p> <p>
,<span>"blockCnt"</span>:"0" ,<span>"firstRegistPnttm"</span>:"2025-10-05 18:08:58"
</p> </p>
<p> <p>
,<span>"failCnt"</span>:"0" ,<span>"firstRegisterId"</span>:"userId"
</p>
<p>
,<span>"successCnt"</span>:"3"
</p>
<p>
,<span>"test_yn"</span>:null
</p> </p>
</div> </div>
<p>&#65373;</p> <p>&#65373;</p>
@ -207,10 +202,10 @@
<p>&#65371;</p> <p>&#65371;</p>
<div class="indent"> <div class="indent">
<p> <p>
<span>"resultCode"</span>:"1040" <span>"resultCode"</span>:"401"
</p> </p>
<p> <p>
,<span>"data"</span>:"치환 데이터 오류" ,<span>"message"</span>:"Unauthorized"
</p> </p>
</div> </div>
<p class="l_code">&#65373;</p> <p class="l_code">&#65373;</p>