|
@@ -134,16 +134,22 @@ public class OrderServiceImpl implements OrderService {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 创建订阅
|
|
* 创建订阅
|
|
|
- * 超短池:到当日24点
|
|
|
|
|
|
|
+ * 超短池:T-1日15:01后至T日15:00前付款,有效期至T日15:00
|
|
|
|
|
+ * 即:15:00前付款到当日15:00,15:01后付款到次日15:00
|
|
|
* 强势池:到当年最后一天的23:59:59
|
|
* 强势池:到当年最后一天的23:59:59
|
|
|
*/
|
|
*/
|
|
|
private void createSubscription(PaymentOrder order) {
|
|
private void createSubscription(PaymentOrder order) {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
LocalDateTime expireTime;
|
|
LocalDateTime expireTime;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (order.getPoolType() == 1) {
|
|
if (order.getPoolType() == 1) {
|
|
|
- // 超短池:到当日24点
|
|
|
|
|
- expireTime = LocalDateTime.of(LocalDate.now(), LocalTime.MAX);
|
|
|
|
|
|
|
+ // 超短池:15:00前付款到当日15:00,15:00后付款到次日15:00
|
|
|
|
|
+ LocalTime cutoff = LocalTime.of(15, 0, 0);
|
|
|
|
|
+ if (now.toLocalTime().isAfter(cutoff)) {
|
|
|
|
|
+ expireTime = LocalDateTime.of(now.toLocalDate().plusDays(1), cutoff);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ expireTime = LocalDateTime.of(now.toLocalDate(), cutoff);
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
// 强势池:到当年最后一天的23:59:59(晚上12点)
|
|
// 强势池:到当年最后一天的23:59:59(晚上12点)
|
|
|
expireTime = LocalDateTime.of(now.getYear(), 12, 31, 23, 59, 59);
|
|
expireTime = LocalDateTime.of(now.getYear(), 12, 31, 23, 59, 59);
|