wesmiler пре 2 година
родитељ
комит
f57d99c89b
1 измењених фајлова са 3 додато и 3 уклоњено
  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;
         }
         $where = ['a.mark'=>1,'b.mark'=>1];
-        if($userId){
-            $where['a.user_id'] = $userId;
-        }else if($id){
+        if($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'];
         $info = $this->model->from('merchant as a')->with(['category'])