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
f59dae0e
Commit
f59dae0e
authored
Aug 26, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据统计
parent
199dcfb3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
OrderStatisticsResponse.java
...n/java/share/system/response/OrderStatisticsResponse.java
+3
-2
RoomStatusServiceImpl.java
...java/share/system/service/impl/RoomStatusServiceImpl.java
+4
-2
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+12
-8
No files found.
share-system/src/main/java/share/system/response/OrderStatisticsResponse.java
View file @
f59dae0e
...
...
@@ -5,6 +5,7 @@ import share.system.domain.SOrder;
import
share.system.domain.vo.OrderVo
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
@Data
...
...
@@ -50,7 +51,7 @@ public class OrderStatisticsResponse {
//积分退款
private
BigDecimal
integralRefundFee
=
BigDecimal
.
ZERO
;
//订单集合
private
List
<
SOrder
>
orderList
;
private
List
<
OrderVo
>
orderVoList
;
private
List
<
SOrder
>
orderList
=
new
ArrayList
<>()
;
private
List
<
OrderVo
>
orderVoList
=
new
ArrayList
<>()
;
}
share-system/src/main/java/share/system/service/impl/RoomStatusServiceImpl.java
View file @
f59dae0e
...
...
@@ -112,7 +112,7 @@ public class RoomStatusServiceImpl implements RoomStatusService {
queryWrapper
.
ge
(
SOrder:
:
getEndDate
,
DateUtils
.
addMinutes
(
DateUtils
.
getNowDate
(),
-
15
));
SOrder
one
=
orderService
.
getOne
(
queryWrapper
);
if
(
ObjectUtils
.
isEmpty
(
one
))
{
isAvailable
=
fals
e
;
isAvailable
=
tru
e
;
}
else
{
isAvailable
=
true
;
}
...
...
@@ -298,7 +298,9 @@ public class RoomStatusServiceImpl implements RoomStatusService {
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
orderId
))
{
if
(!
order
.
getId
().
equals
(
orderId
))
{
orderEndDate
=
DateUtils
.
addMinutes
(
orderEndDate
,
Constants
.
ROOM_LOCK_DELAY_MINUTE
);
if
(
order
.
getOrderType
().
equals
(
OrderTypeEnum
.
RENEW
.
getCode
()))
{
orderEndDate
=
DateUtils
.
addMinutes
(
orderEndDate
,
Constants
.
OPEN_DOOR_AHEAD_HOUR
);
}
}
}
else
{
orderEndDate
=
DateUtils
.
addMinutes
(
orderEndDate
,
Constants
.
ROOM_LOCK_DELAY_MINUTE
);
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
f59dae0e
...
...
@@ -2919,6 +2919,17 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(!
longs
.
contains
(
request
.
getStoreId
()))
{
throw
new
RuntimeException
(
"当前用户不是该门店管理人员"
);
}
List
<
SOrder
>
orderList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
SOrder
>()
.
eq
(
SOrder:
:
getStoreId
,
request
.
getStoreId
())
.
eq
(
SOrder:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
())
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
())
.
ge
(
SOrder:
:
getCreateTime
,
request
.
getStartTime
())
.
le
(
SOrder:
:
getCreateTime
,
request
.
getEndTime
())
.
orderByDesc
(
SOrder:
:
getCreateTime
)
);
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
())
...
...
@@ -2930,14 +2941,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
BigDecimal
rechargeAmount
=
rechargeList
.
stream
().
map
(
Recharge:
:
getRechargeAmount
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
OrderStatisticsResponse
statisticsResponse
=
new
OrderStatisticsResponse
();
Map
<
Long
,
SConsumerCoupon
>
map
=
new
HashMap
<>();
List
<
SOrder
>
orderList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
SOrder
>()
.
eq
(
SOrder:
:
getStoreId
,
request
.
getStoreId
())
.
eq
(
SOrder:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
())
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
())
.
ge
(
SOrder:
:
getCreateTime
,
request
.
getStartTime
())
.
le
(
SOrder:
:
getCreateTime
,
request
.
getEndTime
())
.
orderByDesc
(
SOrder:
:
getCreateTime
)
);
//优惠券id集合,去掉为null的
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
());
...
...
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