feat: 敏感词检测update
This commit is contained in:
@@ -17,7 +17,7 @@ public class SchisandraShareSensitiveWordsDTO implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -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.entity.SchisandraShareSensitiveWords;
|
||||
import com.schisandra.share.infra.basic.entity.table.SchisandraShareSensitiveWordsTableDef;
|
||||
import com.schisandra.share.infra.basic.service.SchisandraShareSensitiveWordsService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -62,7 +61,7 @@ public class WordContext {
|
||||
}
|
||||
}
|
||||
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);
|
||||
if (autoLoad) {
|
||||
@@ -121,10 +120,9 @@ public class WordContext {
|
||||
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())));
|
||||
List<SchisandraShareSensitiveWords> list = schisandraShareSensitiveWordsDao.selectListByQuery(query);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(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> white = new HashSet<>();
|
||||
for (SchisandraShareSensitiveWords words : list) {
|
||||
|
@@ -16,7 +16,7 @@ public class SchisandraShareSensitiveWordsBO implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -23,8 +23,8 @@ public class SchisandraShareSensitiveWords implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||
private String id;
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
|
Reference in New Issue
Block a user