fix(aihr): keep demo question verification read-only
This commit is contained in:
+5
-1
@@ -1788,7 +1788,7 @@ public class AihrSopSeedService {
|
||||
}
|
||||
|
||||
private SearchResponse withReviewId(SearchResponse response, String source) {
|
||||
Long reviewId = createSopReview(response, source);
|
||||
Long reviewId = skipSopReview(source) ? null : createSopReview(response, source);
|
||||
return new SearchResponse(
|
||||
response.queryText(),
|
||||
response.category(),
|
||||
@@ -1804,6 +1804,10 @@ public class AihrSopSeedService {
|
||||
);
|
||||
}
|
||||
|
||||
static boolean skipSopReview(String source) {
|
||||
return "verify_demo_questions".equals(source);
|
||||
}
|
||||
|
||||
private Long createSopReview(SearchResponse response, String source) {
|
||||
try {
|
||||
ensureSopReviewTable();
|
||||
|
||||
+7
@@ -26,4 +26,11 @@ public class AihrSopSeedServiceTest {
|
||||
assertTrue(response.reference().contains("1 份文档 / 1 个片段"));
|
||||
assertTrue(response.cautions().contains("未生成结构化概要,已返回命中原文片段。"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Tag("dev")
|
||||
public void verifyDemoQuestionsSourceSkipsSopReviewSample() {
|
||||
assertTrue(AihrSopSeedService.skipSopReview("verify_demo_questions"));
|
||||
assertFalse(AihrSopSeedService.skipSopReview("knowledge_search"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user