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
99488c83
Commit
99488c83
authored
Jan 14, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动增加保洁订单增加提示
parent
b4be7beb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+5
-1
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
99488c83
...
...
@@ -209,6 +209,7 @@ public class RedisTask {
SOrder
sOrder
=
sOrders
.
stream
().
filter
(
item
->
item
.
getOrderNo
().
equals
(
jsonObject
.
getStr
(
"orderNo"
))).
findFirst
().
orElse
(
null
);
if
(
ObjectUtils
.
isEmpty
(
sOrder
))
{
redisUtil
.
delete
(
o
);
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单不存在"
);
throw
new
BaseException
(
"订单不存在!"
);
}
long
expire
=
(
expirationTime
.
getTime
()
-
new
Date
().
getTime
())
/
1000
;
...
...
@@ -218,6 +219,7 @@ public class RedisTask {
deviceOpService
.
actionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
RENEWAL_REMINDER1
.
getCode
(),
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有15分钟"
);
//从门店集合中判断门店id相同的门店对象
// SStore sStore = sStoreList.stream().filter(item -> item.getId().equals(sOrder.getStoreId())).findFirst().orElse(null);
//从房间集合中判断房间id相同的房间对象
...
...
@@ -237,6 +239,7 @@ public class RedisTask {
deviceOpService
.
actionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
RENEWAL_REMINDER2
.
getCode
(),
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有5分钟"
);
}
//判断是否过期
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
...
...
@@ -267,7 +270,7 @@ public class RedisTask {
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
//延时3分钟断电
deviceOpService
.
openOrCloseDevice
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
THREE_MINUTES
);
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已结束,更改订单状态为已使用"
);
}
});
...
...
@@ -288,6 +291,7 @@ public class RedisTask {
//更改订单状态
sOrder
.
setStatus
(
OrderStatusEnum
.
USED
.
getCode
());
isOrderService
.
updateById
(
sOrder
);
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已有续单,更改订单状态为已使用"
);
return
true
;
}
return
false
;
...
...
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