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