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
29341e77
Commit
29341e77
authored
May 07, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改自动添加保洁定时任务
parent
59428dc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+11
-6
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
29341e77
...
@@ -226,11 +226,15 @@ public class RedisTask {
...
@@ -226,11 +226,15 @@ public class RedisTask {
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
o
));
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
o
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
SOrder
sOrder
=
sOrders
.
stream
().
filter
(
item
->
item
.
getOrderNo
().
equals
(
jsonObject
.
getStr
(
"orderNo"
))).
findFirst
().
orElse
(
null
);
SOrder
sOrder
;
sOrder
=
sOrders
.
stream
().
filter
(
item
->
item
.
getOrderNo
().
equals
(
jsonObject
.
getStr
(
"orderNo"
))).
findFirst
().
orElse
(
null
);
if
(
ObjectUtils
.
isEmpty
(
sOrder
))
{
if
(
ObjectUtils
.
isEmpty
(
sOrder
))
{
redisUtil
.
delete
(
o
);
sOrder
=
isOrderService
.
getByOrderNo
(
jsonObject
.
getStr
(
"orderNo"
));
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单不存在"
);
if
(
ObjectUtils
.
isEmpty
(
sOrder
))
{
throw
new
BaseException
(
"订单不存在!"
);
redisUtil
.
delete
(
o
);
logger
.
info
(
"订单号为:{}的订单不存在"
,
jsonObject
.
getStr
(
"orderNo"
));
throw
new
BaseException
(
"订单不存在!"
);
}
}
}
long
expire
=
(
expirationTime
.
getTime
()
-
new
Date
().
getTime
())
/
1000
;
long
expire
=
(
expirationTime
.
getTime
()
-
new
Date
().
getTime
())
/
1000
;
//判断时间是否在15分钟到14分钟
//判断时间是否在15分钟到14分钟
...
@@ -242,9 +246,10 @@ public class RedisTask {
...
@@ -242,9 +246,10 @@ public class RedisTask {
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有15分钟"
);
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有15分钟"
);
// 从门店集合中判断门店id相同的门店对象
// 从门店集合中判断门店id相同的门店对象
SStore
sStore
=
sStoreList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
sOrder
.
getStoreId
())).
findFirst
().
orElse
(
null
);
SOrder
finalSOrder
=
sOrder
;
SStore
sStore
=
sStoreList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
finalSOrder
.
getStoreId
())).
findFirst
().
orElse
(
null
);
// 从房间集合中判断房间id相同的房间对象
// 从房间集合中判断房间id相同的房间对象
SRoom
sRoom
=
sRoomList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
s
Order
.
getRoomId
())).
findFirst
().
orElse
(
null
);
SRoom
sRoom
=
sRoomList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
finalS
Order
.
getRoomId
())).
findFirst
().
orElse
(
null
);
// 通知用户
// 通知用户
smsService
.
sendSmsOrderEndRemind
(
sOrder
.
getConsumerPhone
(),
sStore
,
sRoom
);
smsService
.
sendSmsOrderEndRemind
(
sOrder
.
getConsumerPhone
(),
sStore
,
sRoom
);
//推送订单结束消息
//推送订单结束消息
...
...
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