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
cbb2cf93
Commit
cbb2cf93
authored
Aug 19, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据统计
parent
eefddff0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+38
-6
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
cbb2cf93
...
...
@@ -2909,7 +2909,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
List
<
Recharge
>
rechargeList
=
rechargeService
.
list
(
new
LambdaQueryWrapper
<
Recharge
>()
.
ge
(
Recharge:
:
getCreateTime
,
request
.
getStartTime
())
.
le
(
Recharge:
:
getCreateTime
,
request
.
getEndTime
())
.
eq
(
Recharge:
:
getStatus
,
YesNoEnum
.
yes
.
getIndex
())
);
Map
<
Long
,
SCoupon
>
sCouponMap
=
sCouponService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SCoupon:
:
getId
,
Function
.
identity
()));
//获取rechargeList中的所有rechargeAmount的和
BigDecimal
rechargeAmount
=
rechargeList
.
stream
().
map
(
Recharge:
:
getRechargeAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
OrderStatisticsResponse
statisticsResponse
=
new
OrderStatisticsResponse
();
...
...
@@ -2932,28 +2934,58 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(!
map
.
isEmpty
())
{
if
(
ObjectUtil
.
isNotEmpty
(
order
.
getCouponId
()))
{
SConsumerCoupon
sConsumerCoupon
=
map
.
get
(
order
.
getCouponId
());
if
(
ObjectUtil
.
isEmpty
(
sConsumerCoupon
))
{
return
;
}
if
(
sConsumerCoupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
CASH
.
getCode
()))
{
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
MEITUAN
.
getCode
()))
{
statisticsResponse
.
setMeituanFee
(
statisticsResponse
.
getMeituanFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
if
(
ObjectUtil
.
isNotEmpty
(
sConsumerCoupon
.
getCouponPayPrice
()))
{
statisticsResponse
.
setMeituanRefundFee
(
statisticsResponse
.
getMeituanRefundFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
}
else
{
SCoupon
sCoupon
=
sCouponMap
.
get
(
sConsumerCoupon
.
getCouponId
());
statisticsResponse
.
setMeituanRefundFee
(
statisticsResponse
.
getMeituanRefundFee
().
add
(
sCoupon
.
getCouponPayPrice
()));
}
}
else
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
TIKTOK
.
getCode
()))
{
statisticsResponse
.
setDouyinFee
(
statisticsResponse
.
getDouyinFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
if
(
ObjectUtil
.
isNotEmpty
(
sConsumerCoupon
.
getCouponPayPrice
()))
{
statisticsResponse
.
setDouyinRefundFee
(
statisticsResponse
.
getDouyinRefundFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
}
else
{
SCoupon
sCoupon
=
sCouponMap
.
get
(
sConsumerCoupon
.
getCouponId
());
statisticsResponse
.
setDouyinRefundFee
(
statisticsResponse
.
getDouyinRefundFee
().
add
(
sCoupon
.
getCouponPayPrice
()));
}
// statisticsResponse.setDouyinRefundFee(statisticsResponse.getDouyinRefundFee().add(sConsumerCoupon.getCouponPayPrice()));
}
}
}
}
statisticsResponse
.
setPlatform
Fee
(
statisticsResponse
.
getPlatform
Fee
().
add
(
order
.
getPayPrice
()));
statisticsResponse
.
setPlatform
RefundFee
(
statisticsResponse
.
getPlatformRefund
Fee
().
add
(
order
.
getPayPrice
()));
statisticsResponse
.
setRechargeBalanceRefundFee
(
statisticsResponse
.
getRechargeBalanceRefundFee
().
add
(
order
.
getBalance
()));
}
else
{
statisticsResponse
.
setPlatform
RefundFee
(
statisticsResponse
.
getPlatformRefund
Fee
().
add
(
order
.
getPayPrice
()));
statisticsResponse
.
setPlatform
Fee
(
statisticsResponse
.
getPlatform
Fee
().
add
(
order
.
getPayPrice
()));
statisticsResponse
.
setRechargeBalance
(
statisticsResponse
.
getRechargeBalance
().
add
(
order
.
getBalance
()));
if
(!
map
.
isEmpty
())
{
if
(
ObjectUtil
.
isNotEmpty
(
order
.
getCouponId
()))
{
SConsumerCoupon
sConsumerCoupon
=
map
.
get
(
order
.
getCouponId
());
if
(
sConsumerCoupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
CASH
.
getCode
()))
{
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
MEITUAN
.
getCode
()))
{
statisticsResponse
.
setMeituanRefundFee
(
statisticsResponse
.
getMeituanRefundFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
if
(
ObjectUtil
.
isNotEmpty
(
sConsumerCoupon
.
getCouponPayPrice
()))
{
statisticsResponse
.
setMeituanFee
(
statisticsResponse
.
getMeituanFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
}
else
{
SCoupon
sCoupon
=
sCouponMap
.
get
(
sConsumerCoupon
.
getCouponId
());
statisticsResponse
.
setMeituanFee
(
statisticsResponse
.
getMeituanFee
().
add
(
sCoupon
.
getCouponPayPrice
()));
// statisticsResponse.setMeituanRefundFee(statisticsResponse.getMeituanRefundFee().add(sCoupon.getCouponPayPrice()));
}
// statisticsResponse.setMeituanFee(statisticsResponse.getMeituanFee().add(sConsumerCoupon.getCouponPayPrice()));
}
else
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
TIKTOK
.
getCode
()))
{
statisticsResponse
.
setDouyinRefundFee
(
statisticsResponse
.
getDouyinRefundFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
if
(
ObjectUtil
.
isNotEmpty
(
sConsumerCoupon
.
getCouponPayPrice
()))
{
statisticsResponse
.
setDouyinFee
(
statisticsResponse
.
getDouyinFee
().
add
(
sConsumerCoupon
.
getCouponPayPrice
()));
}
else
{
SCoupon
sCoupon
=
sCouponMap
.
get
(
sConsumerCoupon
.
getCouponId
());
statisticsResponse
.
setDouyinFee
(
statisticsResponse
.
getDouyinFee
().
add
(
sCoupon
.
getCouponPayPrice
()));
}
// statisticsResponse.setDouyinFee(statisticsResponse.getDouyinFee().add(sConsumerCoupon.getCouponPayPrice()));
}
}
}
...
...
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