1
This commit is contained in:
@@ -2003,9 +2003,13 @@ public class JDUtil {
|
||||
public void LD(String input, String fromWxid) {
|
||||
if (input.equals("慢单")) {
|
||||
// 获取今天的日期
|
||||
LocalDate today = LocalDate.now();
|
||||
LocalDateTime startOfDay = today.atStartOfDay();
|
||||
LocalDateTime endOfDay = today.atTime(23, 59, 59);
|
||||
LocalDateTime today = LocalDateTime.now();
|
||||
if (today.getHour() < 8){
|
||||
// 获取昨天的日期
|
||||
today = today.minusDays(1);
|
||||
}
|
||||
LocalDateTime startOfDay = today.withHour(0).withMinute(0).withSecond(0).withNano(0);
|
||||
LocalDateTime endOfDay = today.withHour(23).withMinute(59).withSecond(59).withNano(999999999);
|
||||
|
||||
// 将 LocalDateTime 转换为 Date
|
||||
Date startDate = Date.from(startOfDay.atZone(ZoneId.systemDefault()).toInstant());
|
||||
@@ -2052,9 +2056,7 @@ public class JDUtil {
|
||||
resultBuilder.append("单:").append(order.getRemark() != null ? order.getRemark() : "未提供")
|
||||
.append("\n型号:").append(order.getModelNumber() != null ? order.getModelNumber() : "未提供")
|
||||
.append("\n下单付款:").append(order.getPaymentAmount() != null ? String.format("%.2f", order.getPaymentAmount()) : "0.00")
|
||||
.append(" 元")
|
||||
.append("\n后返金额:").append(order.getRebateAmount() != null ? String.format("%.2f", order.getRebateAmount()) : "0.00")
|
||||
.append(" 元")
|
||||
.append("\n地址:").append(order.getAddress() != null ? order.getAddress() : "未提供")
|
||||
.append("\n物流链接:").append(order.getLogisticsLink() != null ? order.getLogisticsLink() : "无")
|
||||
.append("\n────────────\n");
|
||||
@@ -2066,7 +2068,6 @@ public class JDUtil {
|
||||
}
|
||||
} else {
|
||||
// 生成当前日期
|
||||
String date = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
JDOrder jdOrder = parseOrderFromText(input.trim().replace("元", ""));
|
||||
if (jdOrder.getOrderId() == null) {
|
||||
return;
|
||||
@@ -2099,7 +2100,7 @@ public class JDUtil {
|
||||
}
|
||||
sb.append(jdOrder.getRemark()).append("\t")
|
||||
.append(jdOrder.getOrderId()).append("\t")
|
||||
.append(date).append("\t")
|
||||
.append(DateUtil.dateToStr(jdOrder.getOrderTime(), "yyyy-MM-dd") ).append("\t")
|
||||
.append(jdOrder.getModelNumber()).append("\t")
|
||||
.append(jdOrder.getAddress()).append("\t")
|
||||
.append(jdOrder.getLogisticsLink()).append("\t\t")
|
||||
|
||||
Reference in New Issue
Block a user