From f5b3d49573623f7269979514db16229a78722953 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Wed, 26 Jan 2022 12:50:05 +0800 Subject: [PATCH] =?UTF-8?q?kafka=E6=97=A0=E6=B3=95=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BasePopulationInfoServiceImpl.java | 4 ++++ .../impl/FloatingPopulationServiceImpl.java | 4 ++++ .../overseaspersonnel/impl/OverseasPersonnelServiceImpl.java | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/main/java/cn/com/tenlion/commonpopulation/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java b/src/main/java/cn/com/tenlion/commonpopulation/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java index 3528732..5650a09 100644 --- a/src/main/java/cn/com/tenlion/commonpopulation/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java +++ b/src/main/java/cn/com/tenlion/commonpopulation/service/basepopulationinfo/impl/BasePopulationInfoServiceImpl.java @@ -526,6 +526,10 @@ public class BasePopulationInfoServiceImpl extends DefaultBaseService implements jObj.put("tableNumber", "C0007"); jObj.put("uid", params.get("idCardNumber").toString()); jObj.put("action", action); + if("delete".equals(action)){ + kafkaTemplate.send("tableSync", jObj.toJSONString()); + return; + } PopulationInfo info = new PopulationInfo(); info.setfull_name(params.get("fullName") == null ? null : params.get("fullName").toString()); info.setname_used_before(params.get("nameUsedBefore") == null ? null : params.get("nameUsedBefore").toString()); diff --git a/src/main/java/cn/com/tenlion/commonpopulation/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java b/src/main/java/cn/com/tenlion/commonpopulation/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java index 4119ad1..419fce9 100644 --- a/src/main/java/cn/com/tenlion/commonpopulation/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java +++ b/src/main/java/cn/com/tenlion/commonpopulation/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java @@ -360,6 +360,10 @@ public class FloatingPopulationServiceImpl extends DefaultBaseService implements jObj.put("tableNumber", "C0009"); jObj.put("uid", params.get("floatingPopulationId").toString()); jObj.put("action", action); + if("delete".equals(action)){ + kafkaTemplate.send("tableSync", jObj.toJSONString()); + return; + } Map query = new HashMap<>(); query.put("floatingPopulationId",params.get("floatingPopulationId").toString()); FloatingPopulationDTO floatingPopulation = floatingPopulationDao.getFloatingPopulation(params); diff --git a/src/main/java/cn/com/tenlion/commonpopulation/service/overseaspersonnel/impl/OverseasPersonnelServiceImpl.java b/src/main/java/cn/com/tenlion/commonpopulation/service/overseaspersonnel/impl/OverseasPersonnelServiceImpl.java index da1df1d..8c8d5a1 100644 --- a/src/main/java/cn/com/tenlion/commonpopulation/service/overseaspersonnel/impl/OverseasPersonnelServiceImpl.java +++ b/src/main/java/cn/com/tenlion/commonpopulation/service/overseaspersonnel/impl/OverseasPersonnelServiceImpl.java @@ -327,6 +327,10 @@ public class OverseasPersonnelServiceImpl extends DefaultBaseService implements jObj.put("tableNumber", "C0008"); jObj.put("uid", params.get("overseasPersonnelId").toString()); jObj.put("action", action); + if("delete".equals(action)){ + kafkaTemplate.send("tableSync", jObj.toJSONString()); + return; + } OverseasPersonnel info = new OverseasPersonnel(); info.setlocation_all(params.get("areaNames") == null ? null : params.get("areaNames").toString()); info.setlocation_code(params.get("areaCode") == null ? null : params.get("areaCode").toString());