|
@@ -113,14 +113,14 @@ class EndOrderAdminTask
|
|
|
Db::beginTransaction();
|
|
|
try {
|
|
|
//ad 变更状态为已经审核但是不生效,或者删除订单,或者加入别的状态:比如过期
|
|
|
- OrderAd::whereIn('order_id', $data)->update(['status' => 1,'ad_status'=>8]);
|
|
|
- OrderAd::whereIn('order_id', $data)->update(['status' => 1]);
|
|
|
+ OrderAd::whereIn('order_id', $data)->update(['status' => 1, 'ad_status' => 8]);
|
|
|
+ OrderAd::whereIn('order_id', $data)->update(['status' => 1]);
|
|
|
$pid = OrderAd::whereIn('order_id', $data)->pluck('pid')->toArray();
|
|
|
Ad::whereIn('pid', $pid)->update(['status' => 1]);
|
|
|
Db::commit();
|
|
|
} catch (\Exception $e) {
|
|
|
Db::rollBack();
|
|
|
- $this->logger->error("处理订单ID: {$data['id']} 时发生错误: " . $e->getMessage());
|
|
|
+ $this->logger->error("处理启用订单ID: {$data['id']} 时发生错误: " . $e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
private function OverOder(array $data): void
|
|
@@ -137,13 +137,12 @@ class EndOrderAdminTask
|
|
|
Db::commit();
|
|
|
} catch (\Exception $e) {
|
|
|
Db::rollBack();
|
|
|
- $this->logger->error("处理订单ID: {$data['id']} 时发生错误: " . $e->getMessage());
|
|
|
+ $this->logger->error("处理结束订单ID: {$data['id']} 时发生错误: " . $e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
private function ExpiredOrder(array $data): void
|
|
|
{
|
|
|
- Db::beginTransaction();
|
|
|
- try {
|
|
|
+ Db::beginTransaction();try {
|
|
|
//设置订单状态
|
|
|
Order::whereIn('id', $data)->update(['status' => 5, 'ad_status' => 5]);
|
|
|
//设置广告状态
|
|
@@ -151,7 +150,7 @@ class EndOrderAdminTask
|
|
|
Db::commit();
|
|
|
} catch (\Exception $e) {
|
|
|
Db::rollBack();
|
|
|
- $this->logger->error("处理订单ID: {$data['id']} 时发生错误: " . $e->getMessage());
|
|
|
+ $this->logger->error("处理过期订单ID: {$data['id']} 时发生错误: " . $e->getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|