超时退出
This commit is contained in:
@@ -100,7 +100,7 @@ public class JDUtil {
|
|||||||
* <p>
|
* <p>
|
||||||
* 订单号:
|
* 订单号:
|
||||||
*/
|
*/
|
||||||
private static final String WENAN_D = "单:\n" + "{单号} \n" + "分销标记(标记用,勿改):{分销标记}\n" + "型号:\n" + "{型号}" + "\n" + "链接:\n" + "{链接}" + "\n" + "下单付款:\n" + "\n" + "后返金额:\n" + "\n" + "地址:\n" + "{地址}" + "\n" + "物流链接:\n" + "\n" + "订单号:\n" + "\n" + "下单人:\n" + "\n";
|
private static final String WENAN_D = "单:{单的备注}\n" + "{单号} \n" + "分销标记:{分销标记}\n" + "型号:\n" + "{型号}" + "\n" + "链接:\n" + "{链接}" + "\n" + "下单付款:\n" + "\n" + "后返金额:\n" + "\n" + "地址:\n" + "{地址}" + "\n" + "物流链接:\n" + "\n" + "订单号:\n" + "\n" + "下单人:\n" + "\n";
|
||||||
|
|
||||||
final WXUtil wxUtil;
|
final WXUtil wxUtil;
|
||||||
private final StringRedisTemplate redisTemplate;
|
private final StringRedisTemplate redisTemplate;
|
||||||
@@ -1572,15 +1572,14 @@ public class JDUtil {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String[] split = order.split("\n");
|
String[] split = order.split("\n");
|
||||||
logger.info("sendOrderToWxByOrderD.split 数组长度{}", split.length);
|
|
||||||
for (String s : split) {
|
|
||||||
logger.info("sendOrderToWxByOrderD.split 内容 {}", s);
|
|
||||||
}
|
|
||||||
if (split.length != 6) {
|
if (split.length != 6) {
|
||||||
wxUtil.sendTextMessage(fromWxid, "输入格式为:\n 单\n分销标记\n型号\n转链链接\n数量\n地址", 1, fromWxid, false);
|
wxUtil.sendTextMessage(fromWxid, "输入格式为:\n 单\n分销标记\n型号\n转链链接\n数量\n地址", 1, fromWxid, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String temp = WENAN_D;
|
String remark = "";
|
||||||
|
if (!split[0].trim().replace("单", "").isEmpty()){
|
||||||
|
remark = split[0].trim().replace("{单}", "").replace("\n", "");
|
||||||
|
}
|
||||||
// 今天的日期
|
// 今天的日期
|
||||||
String today = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd "));
|
String today = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd "));
|
||||||
String redisKey = "order_count:" + today;
|
String redisKey = "order_count:" + today;
|
||||||
@@ -1615,7 +1614,7 @@ public class JDUtil {
|
|||||||
String orderID = today + String.format("%03d", currentCount); // 格式化为三位数
|
String orderID = today + String.format("%03d", currentCount); // 格式化为三位数
|
||||||
|
|
||||||
// 每次使用原始模板进行替换,避免污染
|
// 每次使用原始模板进行替换,避免污染
|
||||||
String currentTemp = WENAN_D.replace("{单号}", orderID).replace("{分销标记}", split[1]).replace("{链接}", split[3]).replace("{地址}", split[5]).replace("{型号}", split[2]).replaceAll("[|]", "");
|
String currentTemp = WENAN_D.replace("{单的备注}", remark).replace("{单号}", orderID).replace("{分销标记}", split[1]).replace("{链接}", split[3]).replace("{地址}", split[5]).replace("{型号}", split[2]).replaceAll("[|]", "");
|
||||||
|
|
||||||
// 发送订单信息到微信
|
// 发送订单信息到微信
|
||||||
wxUtil.sendTextMessage(fromWxid, currentTemp, 1, fromWxid, true);
|
wxUtil.sendTextMessage(fromWxid, currentTemp, 1, fromWxid, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user