From f1edb8b0c3a28495743e7f8c383605ec7f3ad927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=9C=EC=98=A8=ED=8C=8C=ED=8C=8C?= Date: Wed, 9 Mar 2022 13:21:59 +0900 Subject: [PATCH] =?UTF-8?q?Double=20->=20String=20cast=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95=20=20=20-.=EC=9B=90=EC=9D=B8:=20?= =?UTF-8?q?Gson=EC=9D=98=20=EA=B2=BD=EC=9A=B0=20json=EC=9D=98=20=EC=88=AB?= =?UTF-8?q?=EC=9E=90=ED=98=95=EC=9D=84=20=EA=B0=9D=EC=B2=B4=EB=B3=80?= =?UTF-8?q?=ED=99=98=20=EC=8B=9C=20Double=20=ED=83=80=EC=9E=85=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B6=84=EC=84=9D(parsing)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/ci/api/presentation/NiceCiController.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/cokr/xit/ci/api/presentation/NiceCiController.java b/src/main/java/cokr/xit/ci/api/presentation/NiceCiController.java index 7df093e..bfd54d3 100644 --- a/src/main/java/cokr/xit/ci/api/presentation/NiceCiController.java +++ b/src/main/java/cokr/xit/ci/api/presentation/NiceCiController.java @@ -32,9 +32,14 @@ public class NiceCiController { // public ResponseEntity ci(@RequestBody Map mParam) { public ResponseEntity ci(@RequestBody String param) { Gson gson = new Gson(); - List> params = gson.fromJson(param, ArrayList.class); + List> params = gson.fromJson(param, ArrayList.class); List jids = params.stream() - .map(row -> row.get("jid")) + .map(row -> { + if(row.get("jid") instanceof Double) + return String.valueOf(Double.valueOf((Double) row.get("jid")).longValue()); + else + return String.valueOf(row.get("jid")); + }) .collect(Collectors.toList()); ResponseVO respVO = diCiService.findAllByJid(SITE_CODE, SITE_PW, jids);