|
|
|
@ -130,16 +130,17 @@ public class CheckMilvusDomainServiceImpl implements CheckMilvusDomainService { |
|
|
|
|
|
|
|
//知识点名称排序(保证拼接顺序固定,避免"a,b"和"b,a"生成不同 hash)
|
|
|
|
List<String> sortedParseNames = new ArrayList<>(parseNameSet); |
|
|
|
Collections.sort(sortedParseNames); // 修正原代码"排序 Set"的语法错误
|
|
|
|
Collections.sort(sortedParseNames); |
|
|
|
|
|
|
|
//规范化拼接知识点名称(固定分隔符,避免歧义)
|
|
|
|
//规范化拼接知识点名称
|
|
|
|
String canonicalKnowledgePoints = sortedParseNames.stream() |
|
|
|
.collect(Collectors.joining(",")); |
|
|
|
|
|
|
|
//生成最终哈希(拆分拼接逻辑,提升可读性;增加分隔符避免字符串拼接歧义)
|
|
|
|
String rawContent = String.format("%s|%s|%s", |
|
|
|
//生成最终哈希
|
|
|
|
String rawContent = String.format("%s|%s|%s|%s", |
|
|
|
StringUtils.isNotBlank(detailDTO.getQuestionContent()) ? detailDTO.getQuestionContent() : "", |
|
|
|
StringUtils.isNotBlank(title.getTaskKpIdsHash()) ? title.getTaskKpIdsHash() : "", |
|
|
|
Objects.toString(title.getTaskId(), ""), |
|
|
|
DigestUtils.md5Hex(canonicalKnowledgePoints) |
|
|
|
); |
|
|
|
return DigestUtils.md5Hex(rawContent); |
|
|
|
|