| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | @Service |
| | |
| | | language = userInfoService.queryLanguage(uid, language); |
| | | return ResultUtil.error(language == 1 ? "留言内容过长" : language == 2 ? "Message-content is overlong." : "Le contenu du message est trop long."); |
| | | } |
| | | content = content.toLowerCase(); |
| | | List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); |
| | | for(SensitiveWords s : sensitiveWords){ |
| | | content = content.replaceAll(s.getContent(), "***"); |
| | | for(SensitiveWords s : sensitiveWords) { |
| | | content = content.replaceAll(s.getContent().toLowerCase(), "***"); |
| | | } |
| | | } |
| | | |