Commit a948ef1c by 朱继来

添加自动取消

parent 5744adee
Showing with 13 additions and 1 deletions
......@@ -1260,9 +1260,21 @@ Class OrderController extends Controller
if (!empty($order)) {
foreach ($order as $v) {
$diff = $v->pay_time - time();
// 到达付款时间后自动取消订单
if ($v->pay_time == time()) {
$update = DB::connection('order')
->table('lie_order')
->where('order_id', '=', $v->order_id)
->update(['status' => -1]);
if ($update) {
continue;
}
}
// 提前一天推送消息
$diff = $v->pay_time - time();
if ($diff <= 86400) {
$currency = $v->currency == 1 ? '¥' : '$';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment