1
This commit is contained in:
@@ -836,14 +836,14 @@ private String handleTF(String input) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String handlePDD(String input) {
|
private String handlePDD(String input) {
|
||||||
return handlePDDWithMark(input, "拼多多", "PDD");
|
return handlePDDWithMark(input, "拼多多", "PDD", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String handlePDDW(String input) {
|
private String handlePDDW(String input) {
|
||||||
return handlePDDWithMark(input, "拼多多 W", "PDD-W");
|
return handlePDDWithMark(input, "拼多多 W", "PDD-W", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String handlePDDWithMark(String input, String commandKeyword, String distributionMark) {
|
private String handlePDDWithMark(String input, String commandKeyword, String distributionMark, boolean needThirdPartyOrderNo) {
|
||||||
// 拼多多新格式:
|
// 拼多多新格式:
|
||||||
// <指令>251102-457567158704072
|
// <指令>251102-457567158704072
|
||||||
// 赵政委[6947]
|
// 赵政委[6947]
|
||||||
@@ -879,7 +879,9 @@ private String handleTF(String input) {
|
|||||||
Pattern orderNoPattern = Pattern.compile("拼多多(\\d+-\\d+)");
|
Pattern orderNoPattern = Pattern.compile("拼多多(\\d+-\\d+)");
|
||||||
Matcher matcher = orderNoPattern.matcher(firstLine);
|
Matcher matcher = orderNoPattern.matcher(firstLine);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
thirdPartyOrderNo = matcher.group(1); // 提取订单号部分(不含"拼多多")
|
if (needThirdPartyOrderNo) {
|
||||||
|
thirdPartyOrderNo = matcher.group(1); // 提取订单号部分(不含"拼多多")
|
||||||
|
}
|
||||||
isNewFormat = true;
|
isNewFormat = true;
|
||||||
nameLineIndex = 1; // 新格式下,姓名在第二行
|
nameLineIndex = 1; // 新格式下,姓名在第二行
|
||||||
}
|
}
|
||||||
@@ -890,7 +892,9 @@ private String handleTF(String input) {
|
|||||||
Pattern orderNoPattern2 = Pattern.compile("^(\\d+-\\d+)$");
|
Pattern orderNoPattern2 = Pattern.compile("^(\\d+-\\d+)$");
|
||||||
Matcher matcher2 = orderNoPattern2.matcher(secondLine);
|
Matcher matcher2 = orderNoPattern2.matcher(secondLine);
|
||||||
if (matcher2.find()) {
|
if (matcher2.find()) {
|
||||||
thirdPartyOrderNo = matcher2.group(1); // 提取订单号
|
if (needThirdPartyOrderNo) {
|
||||||
|
thirdPartyOrderNo = matcher2.group(1); // 提取订单号
|
||||||
|
}
|
||||||
isNewFormat = true;
|
isNewFormat = true;
|
||||||
nameLineIndex = 2; // 多行格式下,姓名在第三行
|
nameLineIndex = 2; // 多行格式下,姓名在第三行
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user