| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace common\services;
- use common\models\xhPicture;
- use common\models\xhPictureCategory;
- use Yii;
- use common\models\xhOrder;
- use common\components\stringUtil;
- use common\components\dict;
- class xhPictureCategoryService {
- public static function showCategory($sjId)
- {
- $data = xhPictureCategory::find()->where(['sjId'=>$sjId])->asArray()->all();
- return $data;
- }
- /**
- * 获取学员相关的分类
- * @author ssh
- * @time 2019.3.17
- */
- public static function getStudent($sjId)
- {
- $data = self::showCategory($sjId);
- if(!empty($data)){
- foreach($data as $key => $info){
- if($info['type'] != 0){
- unset($data[$key]);
- }
- }
- }
- return $data;
- }
- }
|