Explorar el Código

wesmiler 抢表商城

APPLE hace 3 años
padre
commit
fd06790b41
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      app/Services/Common/TradeService.php

+ 5 - 0
app/Services/Common/TradeService.php

@@ -92,6 +92,11 @@ class TradeService extends BaseService
             ->leftJoin('shop as s', 's.id', '=', 'g.shop_id')
             ->where($where)
             ->where('a.status','>', 0)
+            ->where(function($query) use($userId,$status){
+                if($status == 2){
+                    $query->whereNotIn('a.user_id',[$userId]);
+                }
+            })
             ->where(function($query) use($type){
                 if($type){
                     $query->where('a.create_time','>=', strtotime(date('Y-m-d')));