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
8c9a7505
Commit
8c9a7505
authored
Nov 15, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务增加异常捕获
parent
e78932ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+9
-5
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
8c9a7505
...
...
@@ -275,7 +275,8 @@ public class RedisTask {
add
(
OrderStatusEnum
.
INUSE
.
getCode
());
}});
List
<
SOrder
>
sOrders
=
isOrderService
.
list
(
queryWrapper
);
keys
.
stream
().
forEach
(
o
->
{
for
(
String
o
:
keys
)
{
try
{
//获取key对应的value
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
o
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
...
...
@@ -299,12 +300,12 @@ public class RedisTask {
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有15分钟"
);
// 从门店集合中判断门店id相同的门店对象
// 从门店集合中判断门店id相同的门店对象
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
(
finalSOrder
.
getRoomId
())).
findFirst
().
orElse
(
null
);
// 通知用户
// 通知用户
smsService
.
sendSmsOrderEndRemind
(
sOrder
.
getConsumerPhone
(),
sStore
,
sRoom
);
//推送订单结束消息
wechatNewService
.
sendMiniSubscribeMessage
(
sOrder
,
MessageReminderEnum
.
END
);
...
...
@@ -375,7 +376,10 @@ public class RedisTask {
redisUtil
.
set
(
ReceiptRdeisEnum
.
ROOM_EXPIRE_TIME
.
getValue
()
+
sOrder
.
getOrderNo
(),
json
.
toString
());
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已结束,更改订单状态为已使用"
);
}
});
}
catch
(
BaseException
e
)
{
continue
;
}
}
logger
.
debug
(
"AutoAddSCleanRecords:自动添加保洁记录结束"
);
}
@XxlJob
(
"autoRoomExpireTime"
)
...
...
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