Browse Source

qr rq 변경

pull/18/head
지대한 9 months ago
parent
commit
4b0ddb5e2b
  1. 29
      pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java

29
pav-server/src/main/java/com/palnet/biz/api/bas/laanc/service/BasLaancService.java

@ -39,6 +39,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
import java.io.IOException; import java.io.IOException;
import java.time.Instant; import java.time.Instant;
@ -625,7 +627,7 @@ public class BasLaancService {
} }
String confirmKey = UUID.randomUUID().toString(); String confirmKey = UUID.randomUUID().toString();
String jsonParams = null; String params = null;
byte[] qr = null; byte[] qr = null;
try { try {
TsQrcodeRq tsRq = TsQrcodeRq.builder() TsQrcodeRq tsRq = TsQrcodeRq.builder()
@ -635,9 +637,28 @@ public class BasLaancService {
.applyUser(userCi) .applyUser(userCi)
.build(); .build();
jsonParams = JsonUtils.toJson(tsRq); // params = JsonUtils.toJson(tsRq);
/*
qr = tsService.createQrcode(jsonParams); tsdronewallet://kotsa.or.kr
? type=5
& rtnUrl= http://121.190.193.50:6081/api/external/laanc/vc/callback
& reqId=0b42b0af-3875-4a21-b57b-bb93ffcb3cfc
& submittype=C1CM0231251
& applyUser=dzT9zrm1JJRbrT1oRsUbvXYDfbAtXG5QOZjbIVHPaklSZ2PTw8ojYdJyeTrdQdtKIGFM5Z7xfrN/Crm6iGRLkA==
*/
params = UriComponentsBuilder
.fromUriString("tsdronewallet://kotsa.or.kr")
.queryParam("type", tsRq.getType())
.queryParam("rtnUrl", tsRq.getRtnUrl())
.queryParam("reqId", tsRq.getReqId())
.queryParam("submittype", tsRq.getSubmittype())
.queryParam("applyUser", tsRq.getApplyUser())
.build()
.toUriString();
qr = tsService.createQrcode(params);
} catch (WriterException | IOException e) { } catch (WriterException | IOException e) {
log.error("ERROR: ", e); log.error("ERROR: ", e);
throw new CustomException(ErrorCode.FAIL, "QR코드 생성 실패"); throw new CustomException(ErrorCode.FAIL, "QR코드 생성 실패");
@ -648,7 +669,7 @@ public class BasLaancService {
.confirmKey(confirmKey) .confirmKey(confirmKey)
.status("GENERATED") .status("GENERATED")
.targetType("TS_QRCODE") .targetType("TS_QRCODE")
.rqData(jsonParams) .rqData(params)
.createUserId(userId) .createUserId(userId)
.updateUserId(userId) .updateUserId(userId)
.build(); .build();

Loading…
Cancel
Save