From add70e576d408f6664c4c49ff112bc9bf0ac67ed Mon Sep 17 00:00:00 2001 From: Haidar <16521522@mahasiswa.itb.ac.id> Date: Fri, 17 Nov 2023 10:55:52 +0700 Subject: [PATCH] fix: fix getHistory bug jsonparse --- src/main/java/org/example/service/getHistoryServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/example/service/getHistoryServiceImpl.java b/src/main/java/org/example/service/getHistoryServiceImpl.java index 3ff22bd..5de7ab9 100644 --- a/src/main/java/org/example/service/getHistoryServiceImpl.java +++ b/src/main/java/org/example/service/getHistoryServiceImpl.java @@ -77,7 +77,7 @@ public class getHistoryServiceImpl implements getHistoryService { while (result.next()) { json += "{\"product_id\": " + result.getInt("product_id") + ", \"quantity\": " + result.getInt("quantity") + ", \"timestamp\": " - + result.getString("timestamp") + ", \"history_id\": \"" + result.getInt("history_id") + "\"},"; + + "\"" + result.getString("timestamp") + "\"" + ", \"history_id\": \"" + result.getInt("history_id") + "\"},"; found = true; } json = json.substring(0, json.length() - 1); -- GitLab