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
7dc7ca1c
Commit
7dc7ca1c
authored
Oct 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
a46d1762
864ac06c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
14 deletions
+22
-14
OrderStatisticsResponse.java
...n/java/share/system/response/OrderStatisticsResponse.java
+2
-2
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+20
-12
No files found.
share-system/src/main/java/share/system/response/OrderStatisticsResponse.java
View file @
7dc7ca1c
...
...
@@ -26,9 +26,9 @@ public class OrderStatisticsResponse {
private
BigDecimal
platformFee
=
BigDecimal
.
ZERO
;
//平台退款
private
BigDecimal
platformRefundFee
=
BigDecimal
.
ZERO
;
//
用户充值
//
赠送余额消费
private
BigDecimal
rechargeFee
=
BigDecimal
.
ZERO
;
//
用户充值
退款
//
赠送余额
退款
private
BigDecimal
rechargeRefundFee
=
BigDecimal
.
ZERO
;
//充值余额支付
private
BigDecimal
rechargeBalance
=
BigDecimal
.
ZERO
;
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
7dc7ca1c
...
...
@@ -3315,15 +3315,15 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
CollectionUtil
.
isEmpty
(
orderList
))
{
return
new
OrderStatisticsResponse
();
}
List
<
Recharge
>
rechargeList
=
rechargeService
.
list
(
new
LambdaQueryWrapper
<
Recharge
>()
.
ge
(
Recharge:
:
getCreateTime
,
request
.
getStartTime
())
.
le
(
Recharge:
:
getCreateTime
,
request
.
getEndTime
())
.
eq
(
Recharge:
:
getStatus
,
YesNoEnum
.
yes
.
getIndex
())
);
//
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
()));
Map
<
Long
,
SStore
>
sStoreMap
=
storeService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SStore:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SRoom
>
sRoomMap
=
roomService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SRoom:
:
getId
,
Function
.
identity
()));
BigDecimal
rechargeAmount
=
rechargeList
.
stream
().
map
(
Recharge:
:
getRechargeAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
//
BigDecimal rechargeAmount = rechargeList.stream().map(Recharge::getRechargeAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
OrderStatisticsResponse
statisticsResponse
=
new
OrderStatisticsResponse
();
Map
<
Long
,
SConsumerCoupon
>
map
=
new
HashMap
<>();
...
...
@@ -3392,10 +3392,18 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
statisticsResponse
.
setPlatformRefundFee
(
statisticsResponse
.
getPlatformRefundFee
().
add
(
order
.
getPayPrice
()));
statisticsResponse
.
setRechargeBalanceRefundFee
(
statisticsResponse
.
getRechargeBalanceRefundFee
().
add
(
order
.
getBalance
()));
statisticsResponse
.
setRechargeBalanceRefundFee
(
statisticsResponse
.
getRechargeBalanceRefundFee
().
add
(
order
.
getRechargeAmount
()));
if
(
order
.
getBalance
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
order
.
getRechargeAmount
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
order
.
getGiftAmount
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
statisticsResponse
.
setRechargeBalanceRefundFee
(
statisticsResponse
.
getRechargeBalanceRefundFee
().
add
(
order
.
getBalance
()));
}
statisticsResponse
.
setRechargeRefundFee
(
statisticsResponse
.
getRechargeRefundFee
().
add
(
order
.
getGiftAmount
()));
}
statisticsResponse
.
setPlatformFee
(
statisticsResponse
.
getPlatformFee
().
add
(
order
.
getPayPrice
()));
statisticsResponse
.
setRechargeBalance
(
statisticsResponse
.
getRechargeBalance
().
add
(
order
.
getRechargeAmount
()));
if
(
order
.
getBalance
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
order
.
getRechargeAmount
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
order
.
getGiftAmount
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
statisticsResponse
.
setRechargeBalance
(
statisticsResponse
.
getRechargeBalance
().
add
(
order
.
getBalance
()));
}
statisticsResponse
.
setRechargeFee
(
statisticsResponse
.
getRechargeFee
().
add
(
order
.
getGiftAmount
()));
if
(!
map
.
isEmpty
())
{
if
(
ObjectUtil
.
isNotEmpty
(
order
.
getCouponId
()))
{
SConsumerCoupon
sConsumerCoupon
=
map
.
get
(
order
.
getCouponId
());
...
...
@@ -3439,15 +3447,15 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
finalOrderVoList
.
add
(
orderVo
);
});
//用户充值
statisticsResponse
.
setRechargeFee
(
rechargeAmount
);
//
statisticsResponse.setRechargeFee(rechargeAmount);
//美团团购金额+抖音团购金额
statisticsResponse
.
setGroupFee
(
statisticsResponse
.
getMeituanFee
().
add
(
statisticsResponse
.
getDouyinFee
()));
//美团团购退款+抖音团购退款
statisticsResponse
.
setGroupRefundFee
(
statisticsResponse
.
getMeituanRefundFee
().
add
(
statisticsResponse
.
getDouyinRefundFee
()));
//团购金额+平台支付
statisticsResponse
.
setStoreFee
(
statisticsResponse
.
getGroupFee
().
add
(
statisticsResponse
.
getPlatformFee
()));
//团购退款+平台退款
statisticsResponse
.
setStoreRefundFee
(
statisticsResponse
.
getGroupRefundFee
().
add
(
statisticsResponse
.
getPlatformRefundFee
()));
//团购金额+平台支付
+充值金额
statisticsResponse
.
setStoreFee
(
statisticsResponse
.
getGroupFee
().
add
(
statisticsResponse
.
getPlatformFee
())
.
add
(
statisticsResponse
.
getRechargeBalance
())
);
//团购退款+平台退款
+充值金额退款
statisticsResponse
.
setStoreRefundFee
(
statisticsResponse
.
getGroupRefundFee
().
add
(
statisticsResponse
.
getPlatformRefundFee
())
.
add
(
statisticsResponse
.
getRechargeBalanceRefundFee
())
);
//团购金额+平台支付
statisticsResponse
.
setTotalFee
(
statisticsResponse
.
getGroupFee
().
add
(
statisticsResponse
.
getPlatformFee
()));
//门店交易-门店交易退款
...
...
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