浏览代码

Merge branch '20241029_fl_order'

15313670163 1 月之前
父节点
当前提交
d5d89c5644
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 9 7
      app/JsonRpc/OrderService.php

+ 9 - 7
app/JsonRpc/OrderService.php

@@ -439,17 +439,19 @@ class OrderService implements OrderServiceInterface
 
         $start = Carbon::parse($data['starttime']);
         $end = Carbon::parse($data['endtime']);
-        $status = [
-            0 => '1',
-            1 => '4',
-            2 => '6',
-        ];
-        //订单状态:1:通过;2:驳回;3:撤回;4:修改;5:过期;6:待审核;7:结束
+        // $status = [
+            // 0 => '1',
+            // 1 => '7',
+            // 2 => '6',
+        // ];
+        //订单状态:1:通过;2:驳回;3:撤回;5:过期;6:待审核;7:结束
+        // 筛选已上架的广告有时间冲突的广告位
         $ads = Ad::where('fromtime', '<=', $start)->where('totime', '>=', $end)->select('pid')->get()->all();
-        $orderads = OrderAd::where('fromtime', '<=', $start)->where('totime', '>=', $end)->whereIn('status', $status)->select('pid')->get()->all();
+        $orderads = OrderAd::where('fromtime', '<=', $start)->where('totime', '>=', $end)->where('status', 1)->select('pid')->get()->all();
         $ads = array_column($ads, 'pid');
         $orderads = array_column($orderads, 'pid');
         $pids = array_merge($ads, $orderads);
+
         var_dump($pids, '-----------1-------------');
         //取出pid
         $ad_pids = array_unique($pids);