Merge branch '5245_알림톡_이미지형_json_생성'

This commit is contained in:
hehihoho3@gmail.com 2025-06-20 11:40:15 +09:00
commit f3daf9b012
2 changed files with 11 additions and 1 deletions

View File

@ -100,7 +100,8 @@ public class KakaoSendUtil {
/** @jsonStr 필요유무 */
boolean hasTitleOrButtons = StringUtils.isNotEmpty(templateTitle)
|| CollectionUtils.isNotEmpty(templateDetail.getButtonList());
|| CollectionUtils.isNotEmpty(templateDetail.getButtonList())
|| "IMAGE".equalsIgnoreCase(templateDetail.getTemplateEmphasizeType()); // 템플릿 강조 유형 이미지 유형을 알기 위해 추가
/** @jsonStr 반복유무 */
boolean needsJsonReplacement = hasTitleReplacement || hasButtonReplacement;
@ -123,6 +124,7 @@ public class KakaoSendUtil {
// kakaoSendAdvcListVO.get(i).setBizJsonName(idList.get(i));
// }
String templateEmphasizeType = kakaoVO.getTemplateEmphasizeType();
// 분할 건수 카운터

View File

@ -41,6 +41,7 @@ import itn.let.kakao.kakaoComm.KakaoReturnVO;
import itn.let.kakao.kakaoComm.KakaoVO;
import itn.let.kakao.kakaoComm.kakaoApi.service.KakaoApiService;
import itn.let.utl.fcc.service.EgovStringUtil;
import lombok.extern.slf4j.Slf4j;
/**
* @FileName : KakaoApiTemplate.java
@ -50,6 +51,7 @@ import itn.let.utl.fcc.service.EgovStringUtil;
* @프로그램 설명 :
*/
@Slf4j
@Component
public class KakaoApiTemplate {
@ -394,6 +396,7 @@ public class KakaoApiTemplate {
String sendUrl = mjonBizUrl + "/v3/kakao/template/list";
log.info(" + kakaoVO.getCategoryCode() :: [{}]", kakaoVO.getCategoryCode());
JSONObject jsonObject = new JSONObject();
jsonObject.put("bizId", mjonBizId);
jsonObject.put("apiKey", mjonBizKakaoApiKey);
@ -437,6 +440,8 @@ public class KakaoApiTemplate {
JSONParser parser = new JSONParser();
Object obj = parser.parse(result);
JSONObject object = (JSONObject) obj;
log.info(" + object [{}]",object.toJSONString());
String code = object.get("code").toString();
String msg = object.get("message").toString();
@ -456,6 +461,9 @@ public class KakaoApiTemplate {
List<KakaoReturnVO> templatList = new ArrayList<KakaoReturnVO>() ;
for(int i=0; i < tempJSONList.size(); i++) {
JSONObject templateInfo = (JSONObject)tempJSONList.get(i);
log.info(" + templateInfo [{}]",templateInfo.toJSONString());
KakaoReturnVO templateInfoVO = new KakaoReturnVO();
String senderKey = templateInfo.get("senderKey").toString();