Merge branch '5245_알림톡_이미지형_json_생성'
This commit is contained in:
commit
f3daf9b012
@ -100,7 +100,8 @@ public class KakaoSendUtil {
|
|||||||
|
|
||||||
/** @jsonStr 필요유무 */
|
/** @jsonStr 필요유무 */
|
||||||
boolean hasTitleOrButtons = StringUtils.isNotEmpty(templateTitle)
|
boolean hasTitleOrButtons = StringUtils.isNotEmpty(templateTitle)
|
||||||
|| CollectionUtils.isNotEmpty(templateDetail.getButtonList());
|
|| CollectionUtils.isNotEmpty(templateDetail.getButtonList())
|
||||||
|
|| "IMAGE".equalsIgnoreCase(templateDetail.getTemplateEmphasizeType()); // 템플릿 강조 유형 이미지 유형을 알기 위해 추가
|
||||||
|
|
||||||
/** @jsonStr 반복유무 */
|
/** @jsonStr 반복유무 */
|
||||||
boolean needsJsonReplacement = hasTitleReplacement || hasButtonReplacement;
|
boolean needsJsonReplacement = hasTitleReplacement || hasButtonReplacement;
|
||||||
@ -123,6 +124,7 @@ public class KakaoSendUtil {
|
|||||||
// kakaoSendAdvcListVO.get(i).setBizJsonName(idList.get(i));
|
// kakaoSendAdvcListVO.get(i).setBizJsonName(idList.get(i));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
String templateEmphasizeType = kakaoVO.getTemplateEmphasizeType();
|
||||||
|
|
||||||
|
|
||||||
// 분할 건수 카운터
|
// 분할 건수 카운터
|
||||||
|
|||||||
@ -41,6 +41,7 @@ import itn.let.kakao.kakaoComm.KakaoReturnVO;
|
|||||||
import itn.let.kakao.kakaoComm.KakaoVO;
|
import itn.let.kakao.kakaoComm.KakaoVO;
|
||||||
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
|
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
|
||||||
import itn.let.utl.fcc.service.EgovStringUtil;
|
import itn.let.utl.fcc.service.EgovStringUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @FileName : KakaoApiTemplate.java
|
* @FileName : KakaoApiTemplate.java
|
||||||
@ -50,6 +51,7 @@ import itn.let.utl.fcc.service.EgovStringUtil;
|
|||||||
|
|
||||||
* @프로그램 설명 :
|
* @프로그램 설명 :
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class KakaoApiTemplate {
|
public class KakaoApiTemplate {
|
||||||
|
|
||||||
@ -394,6 +396,7 @@ public class KakaoApiTemplate {
|
|||||||
|
|
||||||
String sendUrl = mjonBizUrl + "/v3/kakao/template/list";
|
String sendUrl = mjonBizUrl + "/v3/kakao/template/list";
|
||||||
|
|
||||||
|
log.info(" + kakaoVO.getCategoryCode() :: [{}]", kakaoVO.getCategoryCode());
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("bizId", mjonBizId);
|
jsonObject.put("bizId", mjonBizId);
|
||||||
jsonObject.put("apiKey", mjonBizKakaoApiKey);
|
jsonObject.put("apiKey", mjonBizKakaoApiKey);
|
||||||
@ -437,6 +440,8 @@ public class KakaoApiTemplate {
|
|||||||
JSONParser parser = new JSONParser();
|
JSONParser parser = new JSONParser();
|
||||||
Object obj = parser.parse(result);
|
Object obj = parser.parse(result);
|
||||||
JSONObject object = (JSONObject) obj;
|
JSONObject object = (JSONObject) obj;
|
||||||
|
log.info(" + object [{}]",object.toJSONString());
|
||||||
|
|
||||||
|
|
||||||
String code = object.get("code").toString();
|
String code = object.get("code").toString();
|
||||||
String msg = object.get("message").toString();
|
String msg = object.get("message").toString();
|
||||||
@ -456,6 +461,9 @@ public class KakaoApiTemplate {
|
|||||||
List<KakaoReturnVO> templatList = new ArrayList<KakaoReturnVO>() ;
|
List<KakaoReturnVO> templatList = new ArrayList<KakaoReturnVO>() ;
|
||||||
for(int i=0; i < tempJSONList.size(); i++) {
|
for(int i=0; i < tempJSONList.size(); i++) {
|
||||||
JSONObject templateInfo = (JSONObject)tempJSONList.get(i);
|
JSONObject templateInfo = (JSONObject)tempJSONList.get(i);
|
||||||
|
|
||||||
|
|
||||||
|
log.info(" + templateInfo [{}]",templateInfo.toJSONString());
|
||||||
KakaoReturnVO templateInfoVO = new KakaoReturnVO();
|
KakaoReturnVO templateInfoVO = new KakaoReturnVO();
|
||||||
|
|
||||||
String senderKey = templateInfo.get("senderKey").toString();
|
String senderKey = templateInfo.get("senderKey").toString();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user