1
This commit is contained in:
@@ -1177,7 +1177,7 @@ public class JDUtil {
|
|||||||
|
|
||||||
// 新增礼金流程处理方法
|
// 新增礼金流程处理方法
|
||||||
private void handleGiftMoneyFlow(String fromWxid, String message, UserInteractionState state) {
|
private void handleGiftMoneyFlow(String fromWxid, String message, UserInteractionState state) {
|
||||||
if ("京礼金".equals(message)) {
|
if ("礼金".equals(message)) {
|
||||||
state.reset(); // 重置流程
|
state.reset(); // 重置流程
|
||||||
wxUtil.sendTextMessage(fromWxid, "流程已重置,请重新开始", 1, fromWxid);
|
wxUtil.sendTextMessage(fromWxid, "流程已重置,请重新开始", 1, fromWxid);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class Days0007Strategy implements OrderFetchStrategy {
|
|||||||
LocalDateTime end = baseTime.truncatedTo(ChronoUnit.HOURS);
|
LocalDateTime end = baseTime.truncatedTo(ChronoUnit.HOURS);
|
||||||
LocalDateTime start = end.minusDays(7).truncatedTo(ChronoUnit.HOURS);
|
LocalDateTime start = end.minusDays(7).truncatedTo(ChronoUnit.HOURS);
|
||||||
if (start.isAfter(end)) { // 防御性校验
|
if (start.isAfter(end)) { // 防御性校验
|
||||||
throw new IllegalArgumentException("时间范围错误");
|
throw new IllegalArgumentException(strategyName()+"时间范围错误");
|
||||||
}
|
}
|
||||||
return new TimeRange(start, end);
|
return new TimeRange(start, end);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class Days0714Strategy implements OrderFetchStrategy {
|
|||||||
LocalDateTime end = baseTime.truncatedTo(ChronoUnit.HOURS).minusDays(7);
|
LocalDateTime end = baseTime.truncatedTo(ChronoUnit.HOURS).minusDays(7);
|
||||||
LocalDateTime start = end.minusDays(14).truncatedTo(ChronoUnit.HOURS);
|
LocalDateTime start = end.minusDays(14).truncatedTo(ChronoUnit.HOURS);
|
||||||
if (start.isAfter(end)) { // 防御性校验
|
if (start.isAfter(end)) { // 防御性校验
|
||||||
throw new IllegalArgumentException("时间范围错误");
|
throw new IllegalArgumentException(strategyName()+"时间范围错误");
|
||||||
}
|
}
|
||||||
return new TimeRange(start, end);
|
return new TimeRange(start, end);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class Days1430Strategy implements OrderFetchStrategy {
|
|||||||
LocalDateTime end = baseTime.minusDays(30).truncatedTo(ChronoUnit.HOURS);
|
LocalDateTime end = baseTime.minusDays(30).truncatedTo(ChronoUnit.HOURS);
|
||||||
LocalDateTime start = baseTime.minusDays(14).truncatedTo(ChronoUnit.HOURS);
|
LocalDateTime start = baseTime.minusDays(14).truncatedTo(ChronoUnit.HOURS);
|
||||||
if (start.isAfter(end)) { // 防御性校验
|
if (start.isAfter(end)) { // 防御性校验
|
||||||
throw new IllegalArgumentException("时间范围错误");
|
throw new IllegalArgumentException(strategyName()+"时间范围错误");
|
||||||
}
|
}
|
||||||
return new TimeRange(start, end);
|
return new TimeRange(start, end);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class Days3090Strategy implements OrderFetchStrategy {
|
|||||||
LocalDateTime end = baseTime.minusMonths(1);
|
LocalDateTime end = baseTime.minusMonths(1);
|
||||||
LocalDateTime start = end.minusMonths(2);
|
LocalDateTime start = end.minusMonths(2);
|
||||||
if (start.isAfter(end)) { // 防御性校验
|
if (start.isAfter(end)) { // 防御性校验
|
||||||
throw new IllegalArgumentException("时间范围错误");
|
throw new IllegalArgumentException(strategyName()+"时间范围错误");
|
||||||
}
|
}
|
||||||
return new TimeRange(start, end);
|
return new TimeRange(start, end);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user