Selaa lähdekoodia

feat: policy api data

jiangzixin 1 vuosi sitten
vanhempi
commit
a0461bce54
1 muutettua tiedostoa jossa 1 lisäystä ja 14 poistoa
  1. 1 14
      server/api/modules/v1/controllers/SurveyController.php

+ 1 - 14
server/api/modules/v1/controllers/SurveyController.php

@@ -333,20 +333,7 @@ class SurveyController extends Controller {
         }
         $cengci = array_values($cengci);
 
-
-        $query = Policy::find()->select('id,title,author,content,created_at,summary');
-        //过滤匹配类型的政策
-        $query->andWhere(new \yii\db\Expression('FIND_IN_SET("'. Policy::TYPE_SURVEY .'", type)'));
-        if(!empty($cengci)){
-            foreach ($cengci as $value) {
-
-		         $query->orWhere(new \yii\db\Expression('FIND_IN_SET("'.$value['level'].'", cengci)'));
-    		}
-            $list = $query->all();
-        }
-
-
-        return ['data'=>$list,'cengci'=>$cengci];
+        return ['data' => $cengci];
 
     }