• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
chominsoo4245 / mjon_git star
Forked from hylee / mjon_git
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
mjon_gitsrcmainjavaitnletkakaokakaoCommKakaoServiceCommon.java
Download as .zip file
File name
Commit message
Commit date
DATABASE
mjon_git
2023-06-12
src/main
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-14
.codetogether.ignore
mjon_git
2023-06-12
.gitignore
gitignore 적용
2023-06-12
pom.xml
롬복 추가 , [사용자] 결제관리 > 요금 사용내역 ==> 사용금액 표시 방법 변경 완료
2024-07-09
File name
Commit message
Commit date
java
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-14
resources
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-14
webapp
Merge branch 'advc' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-08
File name
Commit message
Commit date
egovframework
mjon_git
2023-06-12
itn
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-14
File name
Commit message
Commit date
com
문자발송 기능개선중
2024-11-08
let
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-14
web
스케줄러 500개로 줄임
2024-11-06
File name
Commit message
Commit date
cop
이용약관 및 개인정보 내용 수정
2024-10-28
crypto/web
mjon_git
2023-06-12
fax
팩스 주소록 등록기능 수정
2024-11-08
hangulparser
mjon_git
2023-06-12
kakao
Merge branch 'advc' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-05
komoran
mjon_git
2023-06-12
lett
선택한 그림문자의 우선선위 변경 기능 추가
2023-09-05
mail
문자발송로직 impl 화 완료 -> 리펙토링 진행 중
2024-09-27
main
이준호 문자온 커밋 - IP 받아오는 방식 수정
2023-07-28
mjo
문자발송 기능개선중
2024-11-08
module/base
금액 포인트 class 수정
2024-07-08
org
mjon_git
2023-06-12
schdlr/service
스케줄러 기능 수정
2024-11-07
sec
mjon_git
2023-06-12
solr
mjon_git
2023-06-12
sts
mjon_git
2023-06-12
sym
이용약관 관련 기능 수정
2024-11-05
uat
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-09-10
uss
Merge branch 'advc' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-11-05
utl
회원 이메일 발송 건수 15분 단위로 기존 200건 -> 500건으로 변경
2024-10-25
File name
Commit message
Commit date
admin
관리자 알림톡 관리 > 채널 아이디 목록 기본 정렬 변경 - 채널등록일 기준으로 정렬되도록 변경(기존 채널아이디 기준 정렬이었음)
2024-08-30
kakaoComm
알림톡 발송 시 대체문자 길이 확인 로그 추가
2024-10-21
user
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
2024-09-10
File name
Commit message
Commit date
kakaoApi
카카오 알림톡 광고메시지 항목 삭제 처리
2023-10-24
KakaoButtonVO.java
mjon_git
2023-06-12
KakaoCommentVO.java
mjon_git
2023-06-12
KakaoItemVO.java
mjon_git
2023-06-12
KakaoReturnVO.java
mjon_git
2023-06-12
KakaoSendUtil.java
알림톡 발송 시 대체문자 길이 확인 로그 추가
2024-10-21
KakaoServiceCommon.java
mjon_git
2023-06-12
KakaoVO.java
알림톡 전송목록에 금일/금월/금년 통계 추가
2023-07-31
hylee 2023-06-12 59cb474 mjon_git UNIX
Raw Open in browser Change history
package itn.let.kakao.kakaoComm; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import org.json.JSONObject; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component public class KakaoServiceCommon{ /** 비즈 회원 아이디 */ @Value("#{globalSettings['Globals.mjon.biz.id']}") private String mjonBizId; /** 비즈 회원 API 키*/ @Value("#{globalSettings['Globals.mjon.biz.kakao.apiKey']}") private String mjonBizKakaoApiKey; /** 비즈 JSON 파일저장 경로*/ @Value("#{globalSettings['Globals.mjon.kakao.dir']}") private String mjonBizJsonDir; public KakaoVO kakaoBizApi(KakaoVO kakaoVO) { String responscCode = ""; try { System.out.println("bizId " + mjonBizId); System.out.println("Kakao " + mjonBizKakaoApiKey); // String sendUrl = "https://kapi.ppurio.com/v3/kakao/profile/category/all"; String sendUrl = "https://kapi.ppurio.com"; sendUrl = sendUrl + kakaoVO.getBizUrl(); HttpURLConnection conn =null; URL url = new URL(sendUrl); conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setRequestProperty("Content-Type", "application/json"); conn.setDoOutput(true); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(conn.getOutputStream())); JSONObject jsonData = new JSONObject(); jsonData.put("bizId", mjonBizId); jsonData.put("apiKey", mjonBizKakaoApiKey); jsonData.put("phoneNumber", kakaoVO.getPhoneNumber()); jsonData.put("yellowId", kakaoVO.getYellowId()); bw.write(jsonData.toString()); bw.flush(); bw.close(); /**-----------------------------------------------------------------------------*/ BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String returnMsg = in.readLine(); System.out.println("응답메시지 : " + returnMsg); /*responscCode = conn.getResponseCode(); kakaoVO.setBizReturnCode(responscCode); if(responscCode == 400) { System.out.println("400 : 명령을 실행 오류"); kakaoVO.setBizReturnMsg("400 : 명령을 실행 오류"); }else if(responscCode == 500) { System.out.println("500 : 서버"); kakaoVO.setBizReturnMsg("500 : 서버"); }else { System.out.println(responscCode+ " : 응답"); kakaoVO.setBizReturnMsg(returnMsg); }*/ } catch (Exception e) { e.printStackTrace(); } return kakaoVO; } public void kakaoBizJson(KakaoVO kakaoVO) { try { LocalDateTime now = LocalDateTime.now(); // 현재 날짜 구하기 DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); // 포맷 설정 String formatedNow = now.format(formatter); // 포맷 적용 String dFile = "userId_"+formatedNow+".json"; System.out.println("fileName : " + dFile); dFile = "D:/"+mjonBizJsonDir +"/"+ dFile; System.out.println("jsonDir : " + dFile); JSONObject jo = new JSONObject(); jo.put("name", "Jone"); jo.put("city", "Seoul"); String jsonStr = jo.toString(); File jsonFile = new File(dFile); BufferedWriter writer = new BufferedWriter(new FileWriter(jsonFile)); writer.write(jsonStr); writer.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up