From 10df7e29b51d6a2efacc83d870856f57d97a9b66 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期一, 24 十月 2022 13:48:24 +0800 Subject: [PATCH] #feat 修改别名 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java index 3b54f5d..1ba4fac 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java @@ -69,6 +69,11 @@ //查询用户回答 List<ComActQuestnaireAnswerContentVO> vos = this.baseMapper.export(pageReserveRegisterDetailedAdminDTO); + vos.forEach(vo->{ + if(vo.getType()==4){ + vo.setAnswerContent(vo.getAnswerContent().replaceAll("(?<=\\w{3})\\w(?=\\w{4})", "*")); + } + }); result.setAnswers(vos); return R.ok(result); @@ -104,12 +109,8 @@ List<ComActReserveRegisterDetailedAnswerVO> registerDetailedAnswerList = this.baseMapper.getRegisterDetailedAnswerList(registerDetailed.getId()); if(!registerDetailedAnswerList.isEmpty()){ for (ComActReserveRegisterDetailedAnswerVO detailed:registerDetailedAnswerList) { - if(detailed.getReserveSubContent().equals("身份证号")){ + if(detailed.getType()==4){ detailed.setAnswerContent(detailed.getAnswerContent().replaceAll("(?<=\\w{3})\\w(?=\\w{4})", "*")); - } - if(detailed.getReserveSubContent().equals("请输入联系电话")){ - detailed.setAnswerContent(detailed.getAnswerContent().replaceAll( - "(\\d{3})\\d{4}(\\d{4})", "$1****$2")); } if(!detailed.getType().equals(5)){ if(detailed.getType().equals(1)){ -- Gitblit v1.7.1