feat: NICE CI accept 진행

expire_at 설정 반영
dev
Jonguk. Lim 1 month ago
parent b43760d9d7
commit 6492b10934

@ -600,6 +600,18 @@ public class DateUtil {
return result;
}
/**
* LocalDateTime pattern return
* @param localDateTime LocalDateTime
* @param pattern yyyyMMddHHmmss
* @return pattern
*/
public static String getStringFromLocalDate(final LocalDateTime localDateTime, String pattern) {
if ("".equals(pattern) || pattern == null)
pattern = DEFAULT_YMD_DT_FMT;
return localDateTime.format(DateTimeFormatter.ofPattern(pattern));
}
public static void main(String[] args) {
System.out.println(getAddDayT("2024-10-30T23:59:59", 1));
System.out.println(isAfterLocalDateTimeT("2024-10-30T23:59:59", "2024-10-30T23:59:58"));

@ -100,19 +100,17 @@ public class NiceCiAcceptService {
d.setInputDataXits(niceCiMapper.selectNiceCiAcceptDatas(niceCiParam));
});
//List<NiceCiDTO.BillDTO> bills = new ArrayList<>();
//List<NiceCiDTO.BillKkoDTO> billKkos = new ArrayList<>();
final String prefixBillUid = PostSeCd.intgrnNoti.getCode() + "-" + IdGenerator.getCurrentTimeSec();
final String expireAt = DateUtil.getTodayAndNowTime("YYYYMMddHHmmss");
final String prefixBillUid = PostSeCd.intgrnNoti.getCode() + "-" + IdGenerator.getCurrentTimeSec();
final KkoPayUrlRespData kkoPayUrlRespData = KkoPayUrlRespData.builder()
.customUrl(CustomUrl.builder()
.noticeUrl(BILL_HOST + BILL_NOTICE_URL)
.prepayUrl(BILL_HOST + BILL_PREPAY_URL)
.payResultUrl(BILL_HOST + BILL_PAYREUSLT_URL)
.build())
.expireAt(expireAt)
.expireAt(DateUtil.getStringFromLocalDate(list.get(0).getExpiresDt(), "yyyyMMddHHmmss"))
.build();
final OrgMng orgMng = niceCiMapper.selectKkoBpApiUrlFromEnsOrgMng(list.get(0).getOrgCd())
.orElseThrow(() -> new EnsException(EnsErrCd.NO_DATA_FOUND, EnsErrCd.NO_DATA_FOUND.getCodeNm()));
@ -121,7 +119,7 @@ public class NiceCiAcceptService {
try {
List<NiceCiDTO.InputDataXit> inputDataXits = xit.getInputDataXits();
for (NiceCiDTO.InputDataXit data : inputDataXits) {
BillKkoApiRespDTO<?> respDTO = getPayUrl(xit, data, billHistDTO, orgMng, kkoPayUrlRespData);
BillKkoApiRespDTO<?> respDTO = getPayUrl(data, billHistDTO, orgMng, kkoPayUrlRespData);
data.setPayUrl(String.valueOf(respDTO.getData()));
niceCiMapper.updatePayUrlOfDataInput(data);
@ -150,7 +148,7 @@ public class NiceCiAcceptService {
.billerNoticeKey(billUid)
// FIXME: 저장형태 확인 필요
.customUrl(gson.toJson(kkoPayUrlRespData.getCustomUrl()))
.expireAt(expireAt) //d.getExpiresDt()
.expireAt(kkoPayUrlRespData.getExpireAt()) //d.getExpiresDt()
.billUid(billUid)
.build()
);
@ -186,11 +184,13 @@ public class NiceCiAcceptService {
* "mseeage": "정상응답"
* "data": {"url":"https://billgates-web.kakao.com/r/platform/pages/paynow/search/1832/11/1a481760-b0da-4a77-9a7a-74951db5fa01"}
* }
* @param data
* @param orgMng
* @return
* @param dataXit NiceCiDTO.InputDataXit
* @param billHistDTO NiceCiDTO.BillHistDTO
* @param orgMng OrgMng
* @param kkoPayUrlRespData KkoPayUrlRespData
* @return KkoPayUrlRespData
*/
private BillKkoApiRespDTO<?> getPayUrl(final NiceCiDTO.InputXit xitData, final NiceCiDTO.InputDataXit dataXit, NiceCiDTO.BillHistDTO billHistDTO, final OrgMng orgMng, final KkoPayUrlRespData kkoPayUrlRespData){
private BillKkoApiRespDTO<?> getPayUrl(final NiceCiDTO.InputDataXit dataXit, NiceCiDTO.BillHistDTO billHistDTO, final OrgMng orgMng, final KkoPayUrlRespData kkoPayUrlRespData){
// FIXME: 파라메터 확인 필요
Map<String, Object> map = new HashMap<>();
map.put("biller_user_key", dataXit.getDataId());

Loading…
Cancel
Save