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
199dcfb3
Commit
199dcfb3
authored
Aug 23, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据统计
parent
e916c699
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
OrderVo.java
...-system/src/main/java/share/system/domain/vo/OrderVo.java
+9
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+7
-0
No files found.
share-system/src/main/java/share/system/domain/vo/OrderVo.java
View file @
199dcfb3
...
@@ -16,6 +16,15 @@ public class OrderVo {
...
@@ -16,6 +16,15 @@ public class OrderVo {
private
Long
consumerId
;
private
Long
consumerId
;
/**
* 用户手机号
*/
private
String
consumerPhone
;
private
String
nickName
;
private
String
avatar
;
private
Long
storeId
;
private
Long
storeId
;
private
Long
roomId
;
private
Long
roomId
;
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
199dcfb3
...
@@ -2940,12 +2940,19 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -2940,12 +2940,19 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
);
);
//优惠券id集合,去掉为null的
//优惠券id集合,去掉为null的
List
<
Long
>
ids
=
orderList
.
stream
().
map
(
SOrder:
:
getCouponId
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
List
<
Long
>
ids
=
orderList
.
stream
().
map
(
SOrder:
:
getCouponId
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
List
<
Long
>
consumerIds
=
orderList
.
stream
().
map
(
SOrder:
:
getConsumerId
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
Map
<
Long
,
SConsumer
>
consumerMap
=
sConsumerService
.
listByIds
(
consumerIds
).
stream
().
collect
(
Collectors
.
toMap
(
SConsumer:
:
getId
,
Function
.
identity
()));
if
(
CollectionUtil
.
isNotEmpty
(
ids
))
{
if
(
CollectionUtil
.
isNotEmpty
(
ids
))
{
map
.
putAll
(
consumerCouponService
.
selectByIds
(
ids
).
stream
().
collect
(
Collectors
.
toMap
(
SConsumerCoupon:
:
getId
,
Function
.
identity
())));
map
.
putAll
(
consumerCouponService
.
selectByIds
(
ids
).
stream
().
collect
(
Collectors
.
toMap
(
SConsumerCoupon:
:
getId
,
Function
.
identity
())));
}
}
List
<
OrderVo
>
finalOrderVoList
=
orderVoList
;
List
<
OrderVo
>
finalOrderVoList
=
orderVoList
;
orderList
.
stream
().
forEach
(
order
->
{
orderList
.
stream
().
forEach
(
order
->
{
OrderVo
orderVo
=
new
OrderVo
();
OrderVo
orderVo
=
new
OrderVo
();
SConsumer
sConsumer
=
consumerMap
.
get
(
order
.
getConsumerId
());
if
(
ObjectUtil
.
isNotEmpty
(
sConsumer
))
{
orderVo
.
setNickName
(
sConsumer
.
getNickName
());
orderVo
.
setAvatar
(
sConsumer
.
getAvatar
());
}
BeanUtils
.
copyProperties
(
order
,
orderVo
);
BeanUtils
.
copyProperties
(
order
,
orderVo
);
orderVo
.
setOrderNo
(
order
.
getOrderNo
());
orderVo
.
setOrderNo
(
order
.
getOrderNo
());
orderVo
.
setPayType
(
order
.
getPayType
());
orderVo
.
setPayType
(
order
.
getPayType
());
...
...
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