APPLE 3 лет назад
Родитель
Сommit
057a68ffb5
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      app/Services/Common/TradeService.php

+ 3 - 3
app/Services/Common/TradeService.php

@@ -122,17 +122,17 @@ class TradeService extends BaseService
                 if($type == 1){
 
                     if($status == 0){
-                        $query->where('a.user_id', '=', $userId);
+                        $query->where(['a.user_id'=>$userId,'a.is_out'=>0]);
                         $query->whereNotIn('a.sell_uid', [$userId]);
                     }else if($status == 2){
                         $query->where('a.sell_uid', '=',$userId);
                         $query->whereNotIn('a.user_id', [$userId]);
                     }else{
-                        $query->where('a.user_id', '=', $userId);
+                        $query->where(['a.user_id'=>$userId,'a.is_out'=>0]);
                     }
                 }else{
                     if($userId){
-                        $query->where('a.user_id', '=', $userId);
+                        $query->where(['a.user_id'=>$userId,'a.is_out'=>0]);
                     }else if($sellUid){
                         $query->where('a.sell_uid', '=', $sellUid);
                     }