Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7f2699d3
authored
Jun 12, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
主营品牌数据顺序问题
parent
dabed4af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
app/Http/Services/StandardBrandService.php
app/Http/Services/StandardBrandService.php
View file @
7f2699d3
...
...
@@ -72,10 +72,20 @@ class StandardBrandService
'standard_brand_id as brand_id'
,
])
->
get
();
$brands
=
!
empty
(
$brands
)
?
$brands
->
toArray
()
:
[];
return
array_map
(
function
(
$brand
)
{
$brands
=
array_map
(
function
(
$brand
)
{
$brand
[
'show_name'
]
=
$brand
[
'brand_name'
];
$brand
[
'mapping_brand_names'
]
=
'-'
;
return
$brand
;
},
$brands
);
//还要遵循原始排序
$result
=
[];
foreach
(
$brandIds
as
$brandId
)
{
foreach
(
$brands
as
$brand
)
{
if
(
$brandId
==
$brand
[
'brand_id'
])
{
$result
[]
=
$brand
;
}
}
}
return
$result
?:
[];
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment