From 1be710b8b5f5db2369b5bf766e1f816320684a74 Mon Sep 17 00:00:00 2001 From: lihongjie0209 Date: Tue, 18 Feb 2025 20:42:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor(smartCamCarLicenseSnapshotData):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E4=BF=9D=E5=AD=98=E9=80=BB?= =?UTF-8?q?=E8=BE=91-=20=E5=9C=A8=20PojoProcessor=20=E4=B8=AD=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=20ResponseEntity=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86=EF=BC=8C=E9=81=BF=E5=85=8D=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E6=93=8D=E4=BD=9C=20-=20=E5=9C=A8?= =?UTF-8?q?=20SmartCamCarLicenseSnapshotDataController=20=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20OrgScope=20=E6=B3=A8=E8=A7=A3=20-=20?= =?UTF-8?q?=E5=9C=A8=20SmartCamCarLicenseSnapshotDataService=20=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=EF=BC=8C?= =?UTF-8?q?=E4=BE=BF=E4=BA=8E=E8=B0=83=E8=AF=95=E5=92=8C=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/lihongjie/coal/pojoProcessor/PojoProcessor.java | 5 +++++ .../controller/SmartCamCarLicenseSnapshotDataController.java | 1 + .../service/SmartCamCarLicenseSnapshotDataService.java | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/main/java/cn/lihongjie/coal/pojoProcessor/PojoProcessor.java b/src/main/java/cn/lihongjie/coal/pojoProcessor/PojoProcessor.java index b66e0ddd..29816e0e 100644 --- a/src/main/java/cn/lihongjie/coal/pojoProcessor/PojoProcessor.java +++ b/src/main/java/cn/lihongjie/coal/pojoProcessor/PojoProcessor.java @@ -15,6 +15,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.FieldUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.util.StopWatch; @@ -100,6 +101,10 @@ public class PojoProcessor { return; } + if (pojo instanceof ResponseEntity){ + return; + } + if (pojo instanceof Iterable it) { it.forEach(this::collectActions); return; diff --git a/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/controller/SmartCamCarLicenseSnapshotDataController.java b/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/controller/SmartCamCarLicenseSnapshotDataController.java index ca8739e3..eb6feac4 100644 --- a/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/controller/SmartCamCarLicenseSnapshotDataController.java +++ b/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/controller/SmartCamCarLicenseSnapshotDataController.java @@ -62,6 +62,7 @@ public class SmartCamCarLicenseSnapshotDataController { @RateLimit(value = false) @SignCheck(value = false) @SubmitToken(value = false) + @OrgScope(value = false) @PostMapping("/saveEvent") public ResponseEntity saveEvent(@RequestBody String json) { ObjectNode jsonNodes = this.service.saveEvent(json); diff --git a/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/service/SmartCamCarLicenseSnapshotDataService.java b/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/service/SmartCamCarLicenseSnapshotDataService.java index 2bd61c68..0ed4a86b 100644 --- a/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/service/SmartCamCarLicenseSnapshotDataService.java +++ b/src/main/java/cn/lihongjie/coal/smartCamCarLicenseSnapshotData/service/SmartCamCarLicenseSnapshotDataService.java @@ -106,6 +106,8 @@ public class SmartCamCarLicenseSnapshotDataService @SneakyThrows public ObjectNode saveEvent(String json) { + + log.info("saveEvent {}", json); JsonNode rootNode = objectMapper.readTree(json); SmartCamCarLicenseSnapshotDataEntity entity = new SmartCamCarLicenseSnapshotDataEntity();