From 50e1eb020efe8da670b718d865fa4c1eaa61ee7d Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期四, 20 五月 2021 19:51:09 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java index 4d0892b..00c5bc0 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java @@ -44,6 +44,7 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -176,7 +177,11 @@ IPage<ComMngPopulationVO> iPage = populationDAO.pagePopulation(page, comMngPopulationVO); iPage.getRecords().forEach(vo->{ //获取用户生日 - String birthday = vo.getCardNo().substring(6, 14); + String date = vo.getCardNo().substring(6, 14); + String year = date.substring(0,4); + String month = date.substring(4,6); + String day = date.substring(6,8); + String birthday = year + "-" + month + "-" + day; //设置用户年龄 vo.setBirthday(birthday); }); @@ -455,6 +460,7 @@ if(!StringUtils.isEmpty(comMngVillageDO.getGroupAt())){ populationDO.setVillageName(comMngVillageDO.getGroupAt()); } + populationDO.setUpdateAt(new Date()); // this.updateById(populationDO); if(populationDAO.updateById(populationDO) > 0){ return R.ok(); -- Gitblit v1.7.1