Bladeren bron

Merge branch 'kuaiyingyong_wcc' into kuaiyingyon_0820

Wang Chen 4 jaren geleden
bovenliggende
commit
af633d11fb
2 gewijzigde bestanden met toevoegingen van 6 en 5 verwijderingen
  1. 4 4
      app/Modules/AdPosition/Services/AdPositionService.php
  2. 2 1
      app/Modules/Trade/Models/Order.php

+ 4 - 4
app/Modules/AdPosition/Services/AdPositionService.php

@@ -44,9 +44,8 @@ class AdPositionService
         $dispatches = collect($dispatches)->groupBy('ad_position_id')->all();
         foreach ($positions as $position) {
             // 相关变量获取
-            $positionId        = getProp($position, 'id');
-            $ident             = getProp($position, 'ident');
-            $filterContentJson = getProp($position, 'filter_condition');
+            $positionId = getProp($position, 'id');
+            $ident      = getProp($position, 'ident');
 
             // 获取优先级最高的任务
             $validDispatches = getProp($dispatches, $positionId, []);
@@ -56,7 +55,8 @@ class AdPositionService
             }
 
             // 过滤条件判断
-            $matchFilter = $this->filterDispatch($uid, $filterContentJson);
+            $filterContentJson = getProp($validDispatch, 'filter_condition');
+            $matchFilter       = $this->filterDispatch($uid, $filterContentJson);
             if (!$matchFilter) {
                 continue;
             }

+ 2 - 1
app/Modules/Trade/Models/Order.php

@@ -467,6 +467,7 @@ class Order extends Model
             return [];
         }
 
-        return self::where('uid', $uid)->where('status', 'PIAD')->orderBy('id')->limit(1)->get();
+        $result = self::where('uid', $uid)->where('status', 'PAID')->orderBy('id')->limit(1)->get();
+        return $result ? $result->toArray() : [];
     }
 }