1
This commit is contained in:
@@ -91,14 +91,7 @@ public class InstructionServiceImpl implements IInstructionService {
|
||||
}
|
||||
// TF/H/生/拼多多 生成类指令
|
||||
else if (input.startsWith("TF")) {
|
||||
String tfResult = handleTF(input, forceGenerate);
|
||||
// 如果包含错误码,按 \n\n 分割成多个结果
|
||||
if (tfResult != null && (tfResult.contains("ERROR_CODE:ADDRESS_DUPLICATE") || tfResult.contains("ERROR_CODE:ORDER_NUMBER_DUPLICATE"))) {
|
||||
String[] parts = tfResult.split("\n\n");
|
||||
result = new ArrayList<>(Arrays.asList(parts));
|
||||
} else {
|
||||
result = Collections.singletonList(tfResult);
|
||||
}
|
||||
result = handleTF(input, forceGenerate);
|
||||
} else if (input.startsWith("H")) {
|
||||
result = Collections.singletonList(handleH(input, forceGenerate));
|
||||
} else if (input.startsWith("W")) {
|
||||
@@ -642,11 +635,11 @@ public class InstructionServiceImpl implements IInstructionService {
|
||||
// 产品京东配置已迁移到Redis,通过productJdConfigService获取
|
||||
// 手机号替换配置已迁移到Redis,通过phoneReplaceConfigService获取
|
||||
|
||||
private String handleTF(String input) {
|
||||
private List<String> handleTF(String input) {
|
||||
return handleTF(input, false);
|
||||
}
|
||||
|
||||
private String handleTF(String input, boolean forceGenerate) {
|
||||
private List<String> handleTF(String input, boolean forceGenerate) {
|
||||
String body = input.replaceFirst("^TF\\s*", "");
|
||||
body = body.replaceAll("[啊阿]", "");
|
||||
String[] lines = body.split("\\r?\\n+");
|
||||
@@ -742,7 +735,7 @@ public class InstructionServiceImpl implements IInstructionService {
|
||||
outputs.add("TF 指令格式:TF\t分销信息\t分销信息\t分销信息\t型号\t数量\t姓名\t电话\t地址 ;也支持多行,每行一条数据");
|
||||
}
|
||||
}
|
||||
return String.join("\n\n", outputs);
|
||||
return outputs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user