|
|
@@ -8,7 +8,6 @@ import com.schisandra.share.common.enums.IsDeletedFlagEnum;
|
|
|
|
import com.schisandra.share.infra.basic.dao.SchisandraShareSensitiveWordsDao;
|
|
|
|
import com.schisandra.share.infra.basic.dao.SchisandraShareSensitiveWordsDao;
|
|
|
|
import com.schisandra.share.infra.basic.entity.SchisandraShareSensitiveWords;
|
|
|
|
import com.schisandra.share.infra.basic.entity.SchisandraShareSensitiveWords;
|
|
|
|
import com.schisandra.share.infra.basic.entity.table.SchisandraShareSensitiveWordsTableDef;
|
|
|
|
import com.schisandra.share.infra.basic.entity.table.SchisandraShareSensitiveWordsTableDef;
|
|
|
|
import com.schisandra.share.infra.basic.service.SchisandraShareSensitiveWordsService;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
|
@@ -62,7 +61,7 @@ public class WordContext {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
this.addLastId = Long.parseLong(list.get(list.size() - 1).getId());
|
|
|
|
this.addLastId = list.get(list.size() - 1).getId();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
initKeyWord(black, white);
|
|
|
|
initKeyWord(black, white);
|
|
|
|
if (autoLoad) {
|
|
|
|
if (autoLoad) {
|
|
|
@@ -121,10 +120,9 @@ public class WordContext {
|
|
|
|
QueryWrapper query = new QueryWrapper();
|
|
|
|
QueryWrapper query = new QueryWrapper();
|
|
|
|
query.where(SchisandraShareSensitiveWordsTableDef.SCHISANDRA_SHARE_SENSITIVE_WORDS.ID.gt(addLastId).and(SchisandraShareSensitiveWordsTableDef.SCHISANDRA_SHARE_SENSITIVE_WORDS.IS_DELETED.eq(IsDeletedFlagEnum.UN_DELETED.getCode())));
|
|
|
|
query.where(SchisandraShareSensitiveWordsTableDef.SCHISANDRA_SHARE_SENSITIVE_WORDS.ID.gt(addLastId).and(SchisandraShareSensitiveWordsTableDef.SCHISANDRA_SHARE_SENSITIVE_WORDS.IS_DELETED.eq(IsDeletedFlagEnum.UN_DELETED.getCode())));
|
|
|
|
List<SchisandraShareSensitiveWords> list = schisandraShareSensitiveWordsDao.selectListByQuery(query);
|
|
|
|
List<SchisandraShareSensitiveWords> list = schisandraShareSensitiveWordsDao.selectListByQuery(query);
|
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
|
log.info("addNewWords {}", JSON.toJSON(list));
|
|
|
|
log.info("addNewWords {}", JSON.toJSON(list));
|
|
|
|
this.addLastId = Long.parseLong(list.get(list.size() - 1).getId());
|
|
|
|
this.addLastId = list.get(list.size() - 1).getId();
|
|
|
|
Set<String> black = new HashSet<>();
|
|
|
|
Set<String> black = new HashSet<>();
|
|
|
|
Set<String> white = new HashSet<>();
|
|
|
|
Set<String> white = new HashSet<>();
|
|
|
|
for (SchisandraShareSensitiveWords words : list) {
|
|
|
|
for (SchisandraShareSensitiveWords words : list) {
|
|
|
|