fix:获取产品类型列表接口修改

This commit is contained in:
xjh 2023-04-22 15:18:48 +08:00
parent ffed76fb13
commit b301698ec9

View File

@ -35,6 +35,8 @@ class WorksType extends BaseController
->order('works_type_order')
->column('works_type_guid');
$works_type_tree = [];
if ($works_type_guids) {
$works_type = ModelWorksType::whereOr([
[["a.works_type_guid", 'in', $works_type_guids]],
[["a.works_type_ancestors_guid", 'REGEXP', implode('|', $works_type_guids)]],
@ -65,7 +67,7 @@ class WorksType extends BaseController
'works_type_order' => $v['works_type_order'],
];
});
}
return msg(0, "获取作品类型列表成功!", [
'data' => $works_type_tree,
'count' => ModelWorksType::where('works_type_parent_guid', '0')->count()