feat: 카카오톡 추가 반영 - 모바일 페이지 처리

main
Jonguk. Lim 2 months ago
parent 87885b91a7
commit 462de35545

@ -69,7 +69,7 @@ select * from ENS_NICE_JID_MNG order by REGIST_DT desc;
select * from ENS_NICE_CI_MNG order by regist_dt desc; select * from ENS_NICE_CI_MNG order by regist_dt desc;
select to_char(to_timestamp(sendDetailKkoTalk.sentAt, 'yyyy-mm-dd"T"hh24:mi:ss'), 'yyyymmddhh24miss') select to_char(to_timestamp(null, 'yyyy-mm-dd"T"hh24:mi:ss'), 'yyyymmddhh24miss')
from dual; from dual;
@ -193,3 +193,9 @@ SELECT * FROM TB_SEND_RESULT_V2;
ens_intgrn_snd_mast intgrnsend0_ ens_intgrn_snd_mast intgrnsend0_
where where
intgrnsend0_.int_send_mast_id=2452; intgrnsend0_.int_send_mast_id=2452;
select esdkt.EXTERNAL_ID, esdkt.ENVELOPE_ID
from ens_snd_mast esm
join ENS_SND_DTL_KKO_TALK esdkt
ON esm.SEND_MAST_ID = esdkt.SEND_MAST_ID
and esdkt.EXTERNAL_ID =

@ -42,15 +42,24 @@ public class IntgrnNotiMblPageController {
String docUuid = null; String docUuid = null;
String linkedUuid = null; String linkedUuid = null;
// 카카오페이
if (docUuid == null) docUuid = mParam.get("document_binder_uuid"); if (docUuid == null) docUuid = mParam.get("document_binder_uuid");
if (linkedUuid == null) linkedUuid = mParam.get("external_document_uuid"); if (linkedUuid == null) linkedUuid = mParam.get("external_document_uuid");
// 네이버페이
if (docUuid == null) docUuid = mParam.get("docId"); if (docUuid == null) docUuid = mParam.get("docId");
if (linkedUuid == null) linkedUuid = mParam.get("clientDocId"); if (linkedUuid == null) linkedUuid = mParam.get("clientDocId");
// kt
if (docUuid == null) { if (docUuid == null) {
docUuid = CmmnUtil.isEmpty(mParam.get("src_key")) ? null : mParam.get("src_key").replaceAll("[\\\"\\,\\[\\]]", ""); docUuid = CmmnUtil.isEmpty(mParam.get("src_key")) ? null : mParam.get("src_key").replaceAll("[\\\"\\,\\[\\]]", "");
linkedUuid = null; linkedUuid = null;
} }
if (docUuid == null) {
docUuid = CmmnUtil.isEmpty(mParam.get("envelopeId")) ? null : mParam.get("envelopeId").replaceAll("[\\\"\\,\\[\\]]", "");
linkedUuid = null;
}
try { try {
if (CmmnUtil.isEmpty(docUuid)) if (CmmnUtil.isEmpty(docUuid))
throw new EnsException(EnsErrCd.ERR410, "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다. ( 내부식별ID는 필수조건 입니다 )"); throw new EnsException(EnsErrCd.ERR410, "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다. ( 내부식별ID는 필수조건 입니다 )");

@ -4,6 +4,7 @@ import java.util.*;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.*;
import cokr.xit.ens.modules.common.domain.*; import cokr.xit.ens.modules.common.domain.*;
import cokr.xit.ens.modules.kkotalk.model.*; import cokr.xit.ens.modules.kkotalk.model.*;
@ -34,10 +35,11 @@ public interface IKkoTalkMapper {
List<SendDetailKkoTalkDTO> findAllFetchBySendMastId(Long sendMastId); List<SendDetailKkoTalkDTO> findAllFetchBySendMastId(Long sendMastId);
Optional<SendDetailKkoTalkDTO> findFetchByExternalIdAndEnvelopeId(Map<String, String> map); Optional<SendDetailKkoTalkDTO> findFetchByExternalIdAndEnvelopeId(final Map<String, String> map);
List<SendDetailKkoTalkDTO> findAllBySendMastAndEnvlopeIdIsNotNull(SendMast sendMast); List<SendDetailKkoTalkDTO> findAllBySendMastAndEnvlopeIdIsNotNull(final SendMast sendMast);
//Optional<SendDetailKkoMydoc> findByExternalId(String externalId); Optional<SendMast> selectSendMastByExternalIdAndEnvelopeId(final Map<String, String> map);
Optional<Bill> selectBillByBillUid(final String billUid);
} }

@ -0,0 +1,90 @@
package cokr.xit.ens.modules.kkotalk.presentation;
import java.util.*;
import org.springframework.stereotype.*;
import org.springframework.ui.*;
import org.springframework.web.bind.annotation.*;
import cokr.xit.ens.core.aop.*;
import cokr.xit.ens.core.exception.*;
import cokr.xit.ens.core.exception.code.*;
import cokr.xit.ens.core.utils.*;
import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.*;
import cokr.xit.ens.modules.common.ctgy.mblpage.domain.*;
import cokr.xit.ens.modules.common.ctgy.mblpage.domain.ids.*;
import cokr.xit.ens.modules.common.ctgy.mblpage.domain.repository.*;
import cokr.xit.ens.modules.common.ctgy.mblpage.presentation.*;
import cokr.xit.ens.modules.common.domain.*;
import cokr.xit.ens.modules.kkotalk.mapper.*;
import cokr.xit.ens.modules.kkotalk.model.*;
import cokr.xit.ens.modules.kkotalk.service.*;
import io.swagger.v3.oas.annotations.tags.*;
import lombok.*;
import lombok.extern.slf4j.*;
@Tag(name = "KkoTalkMblPageController")
@Slf4j
@RequiredArgsConstructor
@Controller
public class KkoTalkMblPageController extends MblPageControllerSupport {
private final KkoTalkService kkoTalkService;
private final IKkoTalkMapper kkoTalkMapper;
private final SendDetailMblPageRepository sendDetailMblPageRepository;
@GetMapping(value = "/kko/talk/page/prnt")
public String mblPagePrnt(@RequestParam Map<String, String> mParam, ModelMap model) {
final String token = mParam.get("token");
final String envelopeId = mParam.get("envelopeId");
final String externalId = mParam.get("externalId");
try {
if (CmmnUtil.isEmpty(token) && CmmnUtil.isEmpty(envelopeId) && CmmnUtil.isEmpty(externalId))
throw new EnsException(EnsErrCd.ERR410, "정상적인 요청이 아닙니다. 재인증 후 시도하시기 바랍니다.");
// 조직코드값 조회
Map<String, String> param = new HashMap<>();
param.put("envelopeId", envelopeId);
param.put("externalId", externalId);
SendMast sendMast = kkoTalkMapper.selectSendMastByExternalIdAndEnvelopeId(param)
.orElseThrow(() -> new EnsException(EnsErrCd.ERR404, "문서를 찾을 수 없습니다."));
SendDetailKkoTalkDTO sendDetailKkoTalkDTO = kkoTalkMapper.findFetchByExternalIdAndEnvelopeId(param)
.orElseThrow(() -> new EnsException(EnsErrCd.ERR404, String.format("일치하는 자료가 없습니다. [ envelopeId %s externalId %s ]", envelopeId, externalId)));
EnsResponseVO<?> responseVO = kkoTalkService.tokenVerify(sendMast.getOrgCd(), envelopeId, token, externalId);
if (!EnsErrCd.OK.equals(responseVO.getErrCode()))
throw new EnsException(responseVO.getErrCode(), responseVO.getErrMsg());
SendDetailMblPage sendDetailMblPage = sendDetailMblPageRepository.findById(SendDetailMblPageIds.builder()
.postSe(sendMast.getPostSe().getCode())
.sendDetailId(sendDetailKkoTalkDTO.getSendDetailId())
.build())
.orElseThrow(() -> new EnsException(EnsErrCd.ERR404, String.format("일치하는 페이지데이터가 없습니다. [ envelopeId %s externalId %s ]", envelopeId, externalId)));
if (CmmnUtil.isEmpty(sendDetailMblPage.getDetails()))
throw new EnsException(EnsErrCd.ERR401, String.format("details 필드 값이 비어있습니다. [ envelopeId %s externalId %s ]", envelopeId, externalId));
model.put("details", sendDetailMblPage.getDetails());
if ("Y".equals(sendDetailKkoTalkDTO.getMkBillUseYn())) {
Bill bill = kkoTalkMapper.selectBillByBillUid(sendDetailKkoTalkDTO.getBillUid())
.orElseThrow(() -> new EnsException(EnsErrCd.ERR404, String.format("일치하는 결재 정보가 없습니다. [ bill_uid %s ]", sendDetailKkoTalkDTO.getBillUid())));
model.put("payBtnInf", getJsonPayBtnInf(bill, sendMast));
}
kkoTalkService.readCmplt(sendMast.getOrgCd(), envelopeId);
} catch (EnsException e) {
model.put("errCode", e.getErrCd());
model.put("errMsg", e.getMessage());
model.put("details", "{}");
}
return "modules/mblpage/notiprnt";
}
}

@ -1,4 +1,4 @@
package cokr.xit.ens.modules.kkotalk.web; package cokr.xit.ens.modules.kkotalk.presentation;
import java.util.*; import java.util.*;

@ -124,7 +124,7 @@ xit:
host: ${xit.app.url}${xit.app.ctx} host: ${xit.app.url}${xit.app.ctx}
postse: postse:
intgrn: intgrn:
# url: ${xit.app.url}${xit.app.ctx} # url: ${xit.app.url}${xit.app.ctx}
url: https://xit.co.kr url: https://xit.co.kr
path: /ens/kko/mydoc/noti/prnt path: /ens/kko/mydoc/noti/prnt
kkomd: kkomd:
@ -133,7 +133,7 @@ xit:
# //FIXME: 카카오톡 추가 # //FIXME: 카카오톡 추가
kkotalk: kkotalk:
url: ${xit.app.url}${xit.app.ctx} url: ${xit.app.url}${xit.app.ctx}
path: /kko/mydoc/page/prnt path: /kko/talk/page/prnt
nvst: nvst:
url: ${xit.app.url}${xit.app.ctx} url: ${xit.app.url}${xit.app.ctx}
path: /nv/signtalk/page/prnt path: /nv/signtalk/page/prnt

@ -2,11 +2,10 @@ app:
access: access:
auth: auth:
exclude: exclude:
uri: ${xit.app.ctx}/example/.*, ${xit.app.ctx}/kko/mydoc/.*, ${xit.app.ctx}/kko/alimtalk/.*, ${xit.app.ctx}/nv/signtalk/.*, ${xit.app.ctx}/kt/signtalk/.*, ${xit.app.ctx}/kt/gibis/.*, ${xit.app.ctx}/api/msg/result, ${xit.app.ctx}/iup/.*, ${xit.app.ctx}/traffic/.*, ${xit.app.ctx}/sys/mng/.*, ${xit.app.ctx}/sys/util/.*, ${xit.app.ctx}/intgrn/noti/.*, ${xit.app.ctx}/cmft/.*, ${xit.app.ctx}/bill/.* uri: ${xit.app.ctx}/example/.*, ${xit.app.ctx}/kko/mydoc/.*, ${xit.app.ctx}/kko/talk/.*, ${xit.app.ctx}/kko/alimtalk/.*, ${xit.app.ctx}/nv/signtalk/.*, ${xit.app.ctx}/kt/signtalk/.*, ${xit.app.ctx}/kt/gibis/.*, ${xit.app.ctx}/api/msg/result, ${xit.app.ctx}/iup/.*, ${xit.app.ctx}/traffic/.*, ${xit.app.ctx}/sys/mng/.*, ${xit.app.ctx}/sys/util/.*, ${xit.app.ctx}/intgrn/noti/.*, ${xit.app.ctx}/cmft/.*, ${xit.app.ctx}/bill/.*
pallel: pallel:
thread: thread:
basic: basic:
cnt: 5 cnt: 5
bill: bill:
cnt: 2 cnt: 2

@ -139,6 +139,25 @@
</if> </if>
</select> </select>
<select id="selectSendMastByExternalIdAndEnvelopeId" parameterType="map" resultType="SendMast">
/** iup-kkotalk-mapper|selectSendMastByExternalIdAndEnvelopeId-전송마스터 정보 조회|julim */
SELECT esm.org_cd
, esm.post_se
FROM ens_snd_mast esm
JOIN ens_snd_dtl_kko_talk esdkt
ON esm.send_mast_id = esdkt.send_mast_id
WHERE esdkt.external_id = #{externalId}
AND esdkt.envelope_id = #{envelopeId}
</select>
<select id="selectBillByBillUid" parameterType="map" resultType="SendMast">
/** iup-kkotalk-mapper|selectBillByBillUid-Bill 정보 조회|julim */
SELECT bill_id
, bill_se_cd
FROM ens_bill
WHERE bill_uid = #{billUid}
</select>
<sql id="sqlSelectSendDetailKkoTalk"> <sql id="sqlSelectSendDetailKkoTalk">
SELECT send_detail_id, SELECT send_detail_id,
title, title,

Loading…
Cancel
Save