From e087533d1a870a1921395340895e3b200eb4fd91 Mon Sep 17 00:00:00 2001 From: "java_cuibaocheng@163.com" Date: Mon, 13 Nov 2023 17:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=8F=A3=E5=9F=BA=E6=9C=AC=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=BA=AB=E4=BB=BD=E8=AF=81=E6=A0=A1=E9=AA=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../populationinfo/impl/PopulationInfoServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java index 56b6ec9..23c1ff4 100644 --- a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java +++ b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java @@ -235,6 +235,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul @Override public String saveReturnId(String token, PopulationInfoVO populationInfoVO) { String populationInfoId = UUIDUtil.getUUID(); + populationInfoVO.setIdcard(populationInfoVO.getIdcard().trim().replaceAll("x", "X")); PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim()); if (dto != null) { throw new SaveException("该证件号码已存在"); @@ -306,7 +307,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul @Override public void update(String token, String populationInfoId, PopulationInfoVO populationInfoVO) { - Map params = HashMapUtil.objectToMap(populationInfoVO); + populationInfoVO.setIdcard(populationInfoVO.getIdcard().trim().replaceAll("x", "X")); PopulationInfoDTO dto = getByIdcard(populationInfoVO.getIdcard().trim()); if (dto != null && !dto.getPopulationInfoId().equals(populationInfoId)) { throw new SaveException("该证件号码已存在"); @@ -331,6 +332,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul if (!StringUtil.isEmpty(populationInfoVO.getPhone()) && populationInfoVO.getPhone().length() != 11) { throw new SaveException("手机号码错误"); } + Map params = HashMapUtil.objectToMap(populationInfoVO); params.put("populationInfoId", populationInfoId); if(StringUtils.isEmpty(token)) { setUpdateInfo(params);