From bf7dc19df731c91e1a3d06e398cfcaab634f5b01 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 02 七月 2021 17:48:57 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java index f034a98..b897c46 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java @@ -1738,6 +1738,7 @@ // if(!latLng.matches("^[\\-\\+]?(0(\\.\\d{1,10})?|([1-9](\\d)?)(\\.\\d{1,10})?|1[0-7]\\d{1}(\\.\\d{1,10})?|180\\.0{1,10}),[\\-\\+]?((0|([1-8]\\d?))(\\.\\d{1,10})?|90(\\.0{1,10})?)$")){ // return R.fail("经纬度参数错误"); // } + //经纬度匹配规则:(短(纬度)在前长(经度)在后,不要擅自修改此规则,否则出现问题后果自负) if(!latLng.matches("[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?")){ return R.fail("经纬度参数错误"); } @@ -2196,7 +2197,11 @@ IPage<EventSpecialPopulationVO> specialPopulationVOIPage = this.baseMapper.specialPopulationList(new Page(specialPopulationDTO.getPageNum(), specialPopulationDTO.getPageSize()), specialPopulationDTO); if(!specialPopulationVOIPage.getRecords().isEmpty()){ specialPopulationVOIPage.getRecords().forEach(specialPopulation -> { - specialPopulation.setAge(IdcardUtil.getAgeByIdCard(specialPopulation.getIdCard())); + try { + specialPopulation.setAge(IdcardUtil.getAgeByIdCard(specialPopulation.getIdCard())); + }catch (Exception e){ + log.error("身份证号码转换年龄失败,人员id:" + specialPopulation.getId()); + } }); } return R.ok(specialPopulationVOIPage); -- Gitblit v1.7.1