From 6429751eacbdbcb609a423122c306884427bf515 Mon Sep 17 00:00:00 2001 From: "java_cuibaocheng@163.com" Date: Wed, 15 Nov 2023 17:55:04 +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-=E4=BF=AE=E6=94=B9=E5=A7=93=E5=90=8D=E7=9A=84?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=96=B9=E6=B3=95=20=E4=BA=BA=E5=8F=A3?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF-=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=A7=93=E5=90=8D=E8=84=B1=E6=95=8F=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../populationinfo/impl/PopulationInfoServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 85a7d24..aa2bae8 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 @@ -121,7 +121,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul String newName = name.substring(0, 1) + xin + name.substring(name.length()-1, name.length()); dto.setName(newName); }else{ - String newName = name.substring(0, 1); + String newName = name.substring(0, 1) + "*"; dto.setName(newName); } } @@ -157,7 +157,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul String newName = name.substring(0, 1) + xin + name.substring(name.length()-1, name.length()); dto.setName(newName); }else{ - String newName = name.substring(0, 1); + String newName = name.substring(0, 1) + "*"; dto.setName(newName); } } @@ -256,7 +256,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul throw new SaveException("该证件号码错误"); } } - if (populationInfoVO.getName().length() < 2) { + if (populationInfoVO.getName().length() < 2 || populationInfoVO.getName().length() > 15) { throw new SaveException("姓名错误"); } String areaCode = populationInfoVO.getDomicileAreaCode(); @@ -332,7 +332,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul throw new SaveException("该证件号码错误"); } } - if (populationInfoVO.getName().length() < 2) { + if (populationInfoVO.getName().length() < 2 || populationInfoVO.getName().length() > 15) { throw new SaveException("姓名错误"); } String areaCode = populationInfoVO.getDomicileAreaCode();