Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-webapp-plug
Commits
82589d5f
Commit
82589d5f
authored
Feb 26, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品牌添加共享标志
parent
92ec26dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
StoreBrandController.java
...ava/com/gic/plug/web/controller/StoreBrandController.java
+7
-1
No files found.
src/main/java/com/gic/plug/web/controller/StoreBrandController.java
View file @
82589d5f
...
...
@@ -53,6 +53,7 @@ public class StoreBrandController {
.
collect
(
Collectors
.
toList
());
Map
<
Integer
,
String
>
enterpriseMap
=
new
HashMap
<>();
Map
<
Integer
,
Integer
>
brandIdMap
=
new
HashMap
<>();
ServiceResponse
<
List
<
StoreBrandDTO
>>
brandResponse
=
storeBrandApiService
.
listAllStoreBrandInfoByIds
(
brandIdList
);
if
(
brandResponse
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
brandResponse
.
getResult
()))
{
...
...
@@ -61,6 +62,9 @@ public class StoreBrandController {
.
filter
(
e
->
Objects
.
equals
(
e
.
getType
(),
1
))
.
mapToInt
(
e
->
e
.
getEnterpriseId
()).
boxed
()
.
collect
(
Collectors
.
toList
());
brandIdMap
=
brandList
.
stream
().
filter
(
e
->
Objects
.
equals
(
e
.
getType
(),
1
))
.
collect
(
Collectors
.
toMap
(
e
->
e
.
getStoreBrandId
(),
e
->
e
.
getEnterpriseId
()));
ServiceResponse
<
List
<
EnterpriseDTO
>>
enterpriseResponse
=
enterpriseApiService
.
listEnterpriseByIds
(
enterpriseIdList
);
if
(
enterpriseResponse
.
isSuccess
())
{
enterpriseMap
=
enterpriseResponse
.
getResult
().
stream
().
collect
(
Collectors
.
toMap
(
e
->
e
.
getEnterpriseId
(),
e
->
e
.
getEnterpriseName
()));
...
...
@@ -68,6 +72,7 @@ public class StoreBrandController {
}
Map
<
Integer
,
String
>
finalEnterpriseMap
=
enterpriseMap
;
Map
<
Integer
,
Integer
>
finalBrandIdMap
=
brandIdMap
;
voList
=
list
.
stream
()
.
map
(
e
->
{
StoreWidgetInterfaceShareVO
vo
=
new
StoreWidgetInterfaceShareVO
();
...
...
@@ -75,7 +80,8 @@ public class StoreBrandController {
vo
.
setValue
(
e
.
getStoreBrandId
().
toString
());
//共享类型
if
(
Objects
.
equals
(
e
.
getType
(),
2
))
{
vo
.
setEnterpriseName
(
finalEnterpriseMap
.
get
(
e
.
getEnterpriseId
()));
Integer
tempEnterpriseId
=
finalBrandIdMap
.
get
(
e
.
getStoreBrandId
());
vo
.
setEnterpriseName
(
finalEnterpriseMap
.
get
(
tempEnterpriseId
));
}
return
vo
;
})
...
...
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