feat(OrderLogic): 更新订单逻辑,优化超时订单处理,修复时间计算错误。
This commit is contained in:
parent
2ce567684f
commit
09d597fcf7
@ -263,7 +263,8 @@ class OrderLogic extends BaseLogic
|
|||||||
|
|
||||||
// 使用DateTime::format()方法获取时间并比较
|
// 使用DateTime::format()方法获取时间并比较
|
||||||
if ($currentTime->format('H:i') > $fourPM->format('H:i')) {
|
if ($currentTime->format('H:i') > $fourPM->format('H:i')) {
|
||||||
$alert='当前时间超过配送截止时间16:00,如下单,配送时间将顺延至次日';
|
$currentDate = date('Y-m-d');
|
||||||
|
$alert='当前时间超过配送截止时间16:00,若下单,物品送达时间为'.date('Y-m-d', strtotime($currentDate. '+2 days'));
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
self::setError($e->getMessage());
|
self::setError($e->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user