Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
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
曲欣亮
shop
Commits
4d207ea7
Commit
4d207ea7
authored
Jun 14, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
723d22c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
GoodsServiceImpl.java
...ava/com/egolm/shop/api/service/impl/GoodsServiceImpl.java
+13
-5
No files found.
src/main/java/com/egolm/shop/api/service/impl/GoodsServiceImpl.java
View file @
4d207ea7
...
...
@@ -193,10 +193,18 @@ public class GoodsServiceImpl implements GoodsService {
specList
=
jdbcTemplate
.
queryForList
(
sql
,
orgNo
,
contractNo
,
custTypeId
,
goodsId
);
}
Map
<
String
,
Map
<
String
,
Object
>>
specMap
=
Util
.
listToMM
(
specList
,
";"
,
"sSpecName"
,
"sSpec"
);
Set
<
String
>
specNames
=
specList
.
stream
().
map
(
o
->
(
String
)
o
.
get
(
"sSpecName"
)).
collect
(
Collectors
.
toSet
());
Set
<
String
>
specs
=
specList
.
stream
().
map
(
o
->
(
String
)
o
.
get
(
"sSpec"
)).
collect
(
Collectors
.
toSet
());
Rjx
rjx
=
Rjx
.
jsonOk
();
if
(
specList
.
size
()
>
0
)
{
Map
<
String
,
Map
<
String
,
Object
>>
specMap
=
Util
.
listToMM
(
specList
,
";"
,
"sSpecName"
,
"sSpec"
);
Set
<
String
>
specNames
=
specList
.
stream
().
map
(
o
->
(
String
)
o
.
get
(
"sSpecName"
)).
collect
(
Collectors
.
toSet
());
Set
<
String
>
specs
=
specList
.
stream
().
map
(
o
->
(
String
)
o
.
get
(
"sSpec"
)).
collect
(
Collectors
.
toSet
());
rjx
.
set
(
"specList"
,
specList
).
set
(
"specMap"
,
specMap
).
set
(
"specNames"
,
specNames
).
set
(
"specs"
,
specs
);
}
else
{
rjx
.
set
(
"specList"
,
null
).
set
(
"specMap"
,
null
).
set
(
"specNames"
,
null
).
set
(
"specs"
,
null
);
}
BigDecimal
nMarketPrice
=
(
BigDecimal
)
detail
.
get
(
"nMarketPrice"
);
BigDecimal
nRealSalePrice
=
(
BigDecimal
)
detail
.
get
(
"nRealSalePrice"
);
BigDecimal
nProfitMargin
=
BigDecimal
.
ZERO
;
...
...
@@ -234,7 +242,7 @@ public class GoodsServiceImpl implements GoodsService {
detail
.
put
(
"promoList"
,
promoList
);
Rjx
rjx
=
Rjx
.
jsonOk
().
set
(
"goodsDetail"
,
detail
).
set
(
"specList"
,
specList
).
set
(
"specMap"
,
specMap
).
set
(
"specNames"
,
specNames
).
set
(
"specs"
,
specs
);
rjx
.
set
(
"goodsDetail"
,
detail
);
rjx
.
putAll
(
picList
);
return
rjx
.
toJson
();
}
...
...
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