|
|
@@ -8,11 +8,11 @@ use biz\goods\classes\PicClass;
|
|
|
|
|
|
class PicCategoryService extends BaseService
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
public static $baseFile = '\biz\goods\classes\PicCategoryClass';
|
|
|
-
|
|
|
+
|
|
|
//图库列表 shish 2019.12.7
|
|
|
- public static function getPicList($where)
|
|
|
+ public static function getPicList($where, $takeCategoryId)
|
|
|
{
|
|
|
$data = PicCategoryClass::getList('*', $where, 'inTurn DESC');
|
|
|
$list = isset($data['list']) && !empty($data['list']) ? $data['list'] : [];
|
|
|
@@ -21,15 +21,15 @@ class PicCategoryService extends BaseService
|
|
|
}
|
|
|
$picIdList = array_column($list, 'picId');
|
|
|
$picInfoList = PicClass::getByIds($picIdList);
|
|
|
- $data['list'] = PicClass::groupPicBaseInfo($picInfoList);
|
|
|
+ $data['list'] = PicClass::groupPicBaseInfo($picInfoList, $takeCategoryId);
|
|
|
return $data;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//获取图库分类 shish 2019.12.8
|
|
|
public static function getPicHasCategoryId($id)
|
|
|
{
|
|
|
$list = PicCategoryClass::getAllByCondition(['picId' => $id], null, 'id', 'categoryId');
|
|
|
return !empty($list) ? array_keys($list) : [];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|