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
feb38f65
Commit
feb38f65
authored
Dec 28, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款断电
parent
5ec2a8d4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+10
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+7
-1
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
feb38f65
...
...
@@ -204,7 +204,7 @@ public class RedisTask {
deviceOpService
.
actionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
SEND_CUSTOMER
.
getCode
(),
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
//延时
5
分钟断电
//延时
3
分钟断电
deviceOpService
.
openOrCloseDevice
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
THREE_MINUTES
);
}
}
...
...
@@ -249,6 +249,15 @@ public class RedisTask {
this
.
sOrder
=
sOrder
;
this
.
device
=
device
;
}
}
public
void
yvying
(
Long
roomId
)
{
deviceOpService
.
asyncActionExecute
(
roomId
,
"13724108012"
,
VoiceEnum
.
OPEN
.
getCode
(),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
10L
);
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
feb38f65
...
...
@@ -769,6 +769,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
isRefund
)
{
// 删除redis 缓存信息,防止退款订单自动开始及给用户发送提示短信
redisUtils
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
//房间断电
deviceOpService
.
openOrCloseDevice
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
5
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -916,7 +918,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject
jsonObject
=
new
JSONObject
(
map
);
redisUtils
.
set
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
(),
jsonObject
.
toString
());
baseMapper
.
updateById
(
sOrder
);
//更改房间状态
SRoom
sRoom
=
new
SRoom
();
sRoom
.
setId
(
sOrder
.
getRoomId
());
sRoom
.
setStatus
(
RoomStatusEnum
.
HOLD
.
getValue
());
roomService
.
updateById
(
sRoom
);
Device
device1
=
new
Device
();
device1
.
setRoomId
(
sOrder
.
getRoomId
());
device1
.
setDevType
(
DeviceType
.
DEVICE_0001
.
getCode
());
...
...
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