task-98: 移除 similar-asin/appearance-patent 模块 Coze,状态机与共享组件改名 LLM
- similarasin/appearancepatent 模块全部 Coze 工作流调用改走 direct-LLM(已确认唯一运行路径) - 共享组件改名:CozeTaskQueueGate→TaskQueueGate、CozeGroupResultPropagator→GroupResultPropagator - 状态机改名:biz_task_scope_state 的 coze_* 列→llm_*、stateJson coze 键→llm(V100 迁移已应用生产) - 删除 biz_coze_credential 表、CozeCredential* 类、SimilarAsinCozeClient、AppearancePatentCozeClient→LlmClient - 前端 brand 页 Coze 文案→LLM;Python 后端删除 cozepy 依赖与死配置 - 修复 TaskResultFileJobWorker 启动失败:TaskFileJobConfig 注册 ResultFileJobHandlerRegistry 与 13 个 handler bean(含 validateCoverage 启动校验)
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ class AppearancePatentLlmClientHttpTest {
|
||||
private final Map<String, AtomicInteger> callCounts = new ConcurrentHashMap<>();
|
||||
private final List<String> capturedBodies = new ArrayList<>();
|
||||
|
||||
private AppearancePatentCozeClient client;
|
||||
private AppearancePatentLlmClient client;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() throws IOException {
|
||||
@@ -41,7 +41,7 @@ class AppearancePatentLlmClientHttpTest {
|
||||
AppearancePatentProperties properties = new AppearancePatentProperties();
|
||||
properties.setLlmHost("http://127.0.0.1:" + server.getAddress().getPort());
|
||||
properties.setLlmRetryTimes(3);
|
||||
client = new AppearancePatentCozeClient(
|
||||
client = new AppearancePatentLlmClient(
|
||||
properties,
|
||||
objectMapper,
|
||||
null,
|
||||
|
||||
+12
-12
@@ -16,9 +16,9 @@ import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
class AppearancePatentCozeClientTest {
|
||||
class AppearancePatentLlmClientTest {
|
||||
|
||||
private final AppearancePatentCozeClient client = new AppearancePatentCozeClient(
|
||||
private final AppearancePatentLlmClient client = new AppearancePatentLlmClient(
|
||||
new AppearancePatentProperties(),
|
||||
new ObjectMapper(),
|
||||
null,
|
||||
@@ -59,9 +59,9 @@ class AppearancePatentCozeClientTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void skipBrandCheckWhenCozeTitleIsNone() throws Exception {
|
||||
void skipBrandCheckWhenLlmTitleIsNone() throws Exception {
|
||||
BrandCheckClient brandCheckClient = mock(BrandCheckClient.class);
|
||||
AppearancePatentCozeClient cozeClient = new AppearancePatentCozeClient(
|
||||
AppearancePatentLlmClient llmClient = new AppearancePatentLlmClient(
|
||||
new AppearancePatentProperties(),
|
||||
new ObjectMapper(),
|
||||
null,
|
||||
@@ -73,7 +73,7 @@ class AppearancePatentCozeClientTest {
|
||||
{"data":[{"row_id":"1","title":"无","title_reason":"无","appearance":"无侵权","result":"无侵权"}]}
|
||||
""";
|
||||
|
||||
List<AppearancePatentResultRowDto> merged = cozeClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
List<AppearancePatentResultRowDto> merged = llmClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
|
||||
assertThat(merged).hasSize(1);
|
||||
assertThat(merged.get(0).getTitleRisk()).isEqualTo("无侵权");
|
||||
@@ -86,7 +86,7 @@ class AppearancePatentCozeClientTest {
|
||||
BrandCheckClient brandCheckClient = mock(BrandCheckClient.class);
|
||||
when(brandCheckClient.checkTitleText("阿凡达", "Terms"))
|
||||
.thenReturn(new BrandCheckClient.BrandCheckBatchResult(List.of("阿凡达"), List.of(), List.of()));
|
||||
AppearancePatentCozeClient cozeClient = new AppearancePatentCozeClient(
|
||||
AppearancePatentLlmClient llmClient = new AppearancePatentLlmClient(
|
||||
new AppearancePatentProperties(),
|
||||
new ObjectMapper(),
|
||||
null,
|
||||
@@ -98,7 +98,7 @@ class AppearancePatentCozeClientTest {
|
||||
{"data":[{"row_id":"1","title":"阿凡达","appearance":"无侵权","result":"无侵权"}]}
|
||||
""";
|
||||
|
||||
List<AppearancePatentResultRowDto> merged = cozeClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
List<AppearancePatentResultRowDto> merged = llmClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
|
||||
assertThat(merged).hasSize(1);
|
||||
assertThat(merged.get(0).getTitleRisk()).isEqualTo("无侵权");
|
||||
@@ -108,7 +108,7 @@ class AppearancePatentCozeClientTest {
|
||||
@Test
|
||||
void leaveTitleRiskBlankWhenAppearanceIsMissing() throws Exception {
|
||||
BrandCheckClient brandCheckClient = mock(BrandCheckClient.class);
|
||||
AppearancePatentCozeClient cozeClient = new AppearancePatentCozeClient(
|
||||
AppearancePatentLlmClient llmClient = new AppearancePatentLlmClient(
|
||||
new AppearancePatentProperties(),
|
||||
new ObjectMapper(),
|
||||
null,
|
||||
@@ -120,7 +120,7 @@ class AppearancePatentCozeClientTest {
|
||||
{"data":[{"row_id":"1","title":"阿凡达","result":""}]}
|
||||
""";
|
||||
|
||||
List<AppearancePatentResultRowDto> merged = cozeClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
List<AppearancePatentResultRowDto> merged = llmClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
|
||||
assertThat(merged).hasSize(1);
|
||||
assertThat(merged.get(0).getTitleRisk()).isEmpty();
|
||||
@@ -130,7 +130,7 @@ class AppearancePatentCozeClientTest {
|
||||
@Test
|
||||
void leaveTitleRiskBlankWhenTitleAndAppearanceAreMissing() throws Exception {
|
||||
BrandCheckClient brandCheckClient = mock(BrandCheckClient.class);
|
||||
AppearancePatentCozeClient cozeClient = new AppearancePatentCozeClient(
|
||||
AppearancePatentLlmClient llmClient = new AppearancePatentLlmClient(
|
||||
new AppearancePatentProperties(),
|
||||
new ObjectMapper(),
|
||||
null,
|
||||
@@ -142,7 +142,7 @@ class AppearancePatentCozeClientTest {
|
||||
{"data":[{"row_id":"1","result":""}]}
|
||||
""";
|
||||
|
||||
List<AppearancePatentResultRowDto> merged = cozeClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
List<AppearancePatentResultRowDto> merged = llmClient.mergeRowsFromDataText(List.of(row), dataText);
|
||||
|
||||
assertThat(merged).hasSize(1);
|
||||
assertThat(merged.get(0).getTitleRisk()).isEmpty();
|
||||
@@ -151,7 +151,7 @@ class AppearancePatentCozeClientTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void preserveSubmittedPriceWhenMergingCozeResult() throws Exception {
|
||||
void preserveSubmittedPriceWhenMergingLlmResult() throws Exception {
|
||||
AppearancePatentResultRowDto row = new AppearancePatentResultRowDto();
|
||||
row.setId("1");
|
||||
row.setPrice("12.99");
|
||||
Reference in New Issue
Block a user