wesmiler 2 yıl önce
ebeveyn
işleme
f57d99c89b
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      app/Services/Api/MerchantService.php

+ 3 - 3
app/Services/Api/MerchantService.php

@@ -162,10 +162,10 @@ class MerchantService extends BaseService
             return $info;
             return $info;
         }
         }
         $where = ['a.mark'=>1,'b.mark'=>1];
         $where = ['a.mark'=>1,'b.mark'=>1];
-        if($userId){
-            $where['a.user_id'] = $userId;
-        }else if($id){
+        if($id){
             $where['a.id'] = $id;
             $where['a.id'] = $id;
+        }else if($userId){
+            $where['a.user_id'] = $userId;
         }
         }
         $field = ['a.id','a.name','a.user_id','a.type','a.logo','a.category_id','a.business_img','a.albums','a.country','a.city','a.address','a.usdt','a.service_time','a.withdraw_total','a.status','b.username','b.nickname'];
         $field = ['a.id','a.name','a.user_id','a.type','a.logo','a.category_id','a.business_img','a.albums','a.country','a.city','a.address','a.usdt','a.service_time','a.withdraw_total','a.status','b.username','b.nickname'];
         $info = $this->model->from('merchant as a')->with(['category'])
         $info = $this->model->from('merchant as a')->with(['category'])