后台顾客组管理

This commit is contained in:
TL 2022-06-30 09:43:54 +08:00
parent 30821b5a2c
commit b72fe9f31e
1 changed files with 6 additions and 1 deletions

View File

@ -64,7 +64,12 @@ class CustomerGroupRepo
public static function list()
{
$builder = CustomerGroup::query();
$builder = CustomerGroup::query()
->leftJoin('customer_group_descriptions AS cgd', function ($join) {
$join->on('cgd.customer_group_id', 'customer_group.id')
->where('cgd.language_id', current_language_id());
})
->select(['customer_group.*', 'cgd.name', 'cgd.description']);
$groups = $builder->get();
return $groups;