Explorar o código

商学院显示全部

xialei hai 1 ano
pai
achega
9c9522310e
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      app/controller/api/business/BusinessSchool.php

+ 4 - 3
app/controller/api/business/BusinessSchool.php

@@ -17,7 +17,8 @@ class BusinessSchool  extends BaseController
17 17
         $this->merId =  $this->request->header('merId');
18 18
     }
19 19
     public function classify_list(){
20
-        $list = Db::name("business_school_classify")->field('id,name') ->where('mer_id',$this->merId)->where('state',1)->where('is_del',0)->order("sort desc,id desc")-> select() -> toArray();
20
+        // $list = Db::name("business_school_classify")->field('id,name') ->where('mer_id',$this->merId)->where('state',1)->where('is_del',0)->order("sort desc,id desc")-> select() -> toArray();
21
+        $list = Db::name("business_school_classify")->field('id,name')->where('state',1)->where('is_del',0)->order("sort desc,id desc")-> select() -> toArray();
21 22
         return app("json") -> success($list);
22 23
     }
23 24
 
@@ -27,7 +28,7 @@ class BusinessSchool  extends BaseController
27 28
         $query=Db::name('business_school')
28 29
             -> alias("sp")
29 30
             -> join("business_school_classify spc","sp.classify = spc.id","left")
30
-            ->where('spc.mer_id',$this->merId)
31
+            // ->where('spc.mer_id',$this->merId)
31 32
             ->where('sp.state',1)
32 33
             ->where('sp.is_del',0)
33 34
             -> when(!empty($where['classify']),function ($query) use ($where){
@@ -42,7 +43,7 @@ class BusinessSchool  extends BaseController
42 43
         $data=Db::name('business_school')
43 44
             -> alias("sp")
44 45
             -> join("business_school_classify spc","sp.classify = spc.id","left")
45
-            ->where('spc.mer_id',$this->merId)
46
+            // ->where('spc.mer_id',$this->merId)
46 47
             ->where('sp.state',1)
47 48
             ->where('sp.id',$id)
48 49
             ->field("sp.id,sp.name,sp.image,sp.cover,sp.type,DATE(sp.create_time) as create_time,sp.mp4,sp.content,sp.reading,spc.name as classify_name")