| | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | @Service |
| | |
| | | String content = reassign.getRemark(); |
| | | if(ToolUtil.isNotEmpty(content)){ |
| | | List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); |
| | | List<String> list = Arrays.asList(content.split(" ")); |
| | | for(SensitiveWords s : sensitiveWords){ |
| | | content = content.replaceAll(s.getContent(), "***"); |
| | | List<String> str = new ArrayList<>(); |
| | | String lowerCase = s.getContent().toLowerCase(); |
| | | for (String s1 : list) { |
| | | if(lowerCase.equals(s1.toLowerCase())){ |
| | | str.add("***"); |
| | | }else{ |
| | | str.add(s1); |
| | | } |
| | | } |
| | | list = str; |
| | | } |
| | | content = list.stream().collect(Collectors.joining(" ")); |
| | | } |
| | | reassign.setRemark(content); |
| | | ResultUtil resultUtil = ResultUtil.success(); |
| | |
| | | String content = reassign.getRemark(); |
| | | if(ToolUtil.isNotEmpty(content)){ |
| | | List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); |
| | | List<String> list = Arrays.asList(content.split(" ")); |
| | | for(SensitiveWords s : sensitiveWords){ |
| | | content = content.replaceAll(s.getContent(), "***"); |
| | | List<String> str = new ArrayList<>(); |
| | | String lowerCase = s.getContent().toLowerCase(); |
| | | for (String s1 : list) { |
| | | if(lowerCase.equals(s1.toLowerCase())){ |
| | | str.add("***"); |
| | | }else{ |
| | | str.add(s1); |
| | | } |
| | | } |
| | | list = str; |
| | | } |
| | | content = list.stream().collect(Collectors.joining(" ")); |
| | | } |
| | | reassign.setRemark(content); |
| | | ResultUtil resultUtil = ResultUtil.success(); |