Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
bcf1895b
Commit
bcf1895b
authored
Dec 29, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消费记录BUG
parent
e5c0ec0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
SConsumptionRecordsServiceImpl.java
...e/system/service/impl/SConsumptionRecordsServiceImpl.java
+10
-0
No files found.
share-system/src/main/java/share/system/service/impl/SConsumptionRecordsServiceImpl.java
View file @
bcf1895b
...
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -58,10 +59,19 @@ public class SConsumptionRecordsServiceImpl implements ISConsumptionRecordsServi
public
List
<
SConsumptionRecordsVo
>
selectSConsumptionRecordsList
(
SConsumptionRecords
sConsumptionRecords
)
{
List
<
SConsumptionRecordsVo
>
sConsumptionRecordsList
=
sConsumptionRecordsMapper
.
selectSConsumptionRecordsList
(
sConsumptionRecords
);
if
(
CollectionUtils
.
isEmpty
(
sConsumptionRecordsList
))
{
return
new
ArrayList
<>();
}
//获取消费记录的用户id集合
List
<
Long
>
collect
=
sConsumptionRecordsList
.
stream
().
map
(
SConsumptionRecords:
:
getConsumerId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
collect
))
{
return
new
ArrayList
<>();
}
//获取用户id集合的用户信息
List
<
SConsumer
>
sConsumers
=
sConsumerMapper
.
selectBatchIds
(
collect
);
if
(
CollectionUtils
.
isEmpty
(
sConsumers
))
{
return
new
ArrayList
<>();
}
List
<
Long
>
oredrIds
=
sConsumptionRecordsList
.
stream
().
map
(
SConsumptionRecords:
:
getOrderId
).
collect
(
Collectors
.
toList
());
List
<
SOrder
>
sOrders
=
sOrderMapper
.
selectBatchIds
(
oredrIds
);
sConsumptionRecordsList
.
stream
().
forEach
(
item
->
{
...
...
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