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
864b6977
Commit
864b6977
authored
Nov 27, 2023
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动生成保洁定时任务添加修改房间状态为空闲
parent
86a15486
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+14
-4
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
864b6977
package
share
.
quartz
.
task
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
com.alibaba.fastjson2.JSON
;
import
com.dianping.openapi.sdk.api.oauth.entity.CustomerRefreshTokenResponse
;
...
...
@@ -19,11 +20,10 @@ import share.common.core.redis.RedisUtil;
import
share.common.enums.OrderStatusEnum
;
import
share.common.enums.OrderTypeEnum
;
import
share.common.enums.ReceiptRdeisEnum
;
import
share.common.enums.RoomStatusEnum
;
import
share.system.domain.SOrder
;
import
share.system.service.ISCleanRecordsService
;
import
share.system.service.ISConsumerCouponService
;
import
share.system.service.ISOrderService
;
import
share.system.service.QPService
;
import
share.system.domain.SRoom
;
import
share.system.service.*
;
import
java.io.IOException
;
import
java.util.Date
;
...
...
@@ -51,6 +51,9 @@ public class RedisTask {
@Autowired
private
ISOrderService
isOrderService
;
@Autowired
private
ISRoomService
roomService
;
public
void
AuToReceiptCode
()
{
//获取redis中所有以tuangou.receipt.prepare开头的key
...
...
@@ -128,6 +131,13 @@ public class RedisTask {
//更改订单状态
sOrder
.
setStatus
(
OrderStatusEnum
.
USED
.
getCode
());
isOrderService
.
updateById
(
sOrder
);
// 修改房间状态
SRoom
room
=
roomService
.
getById
(
sOrder
.
getRoomId
());
if
(
ObjectUtil
.
isNotEmpty
(
room
))
{
room
.
setStatus
(
RoomStatusEnum
.
FREE
.
getValue
());
room
.
setUpdateTime
(
new
Date
());
roomService
.
updateById
(
room
);
}
//判断订单是否已经添加保洁记录
boolean
b
=
isCleanRecordsService
.
addSCleanRecords
(
sOrder
.
getStoreId
(),
sOrder
.
getRoomId
());
if
(
b
)
{
...
...
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