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
2a09370b
Commit
2a09370b
authored
Dec 05, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉小程序消息提醒
parent
694ddcfb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
11 deletions
+27
-11
OrderTask.java
share-quartz/src/main/java/share/quartz/task/OrderTask.java
+9
-9
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+1
-1
ISRoomService.java
...tem/src/main/java/share/system/service/ISRoomService.java
+2
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+1
-1
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+8
-0
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+6
-0
No files found.
share-quartz/src/main/java/share/quartz/task/OrderTask.java
View file @
2a09370b
...
...
@@ -230,11 +230,11 @@ public class OrderTask {
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
String
orderNo
=
jsonObject
.
getStr
(
"orderNo"
);
//时间到期前10分钟到9分
long
expire
=
(
expirationTime
.
getTime
()
-
new
Date
().
getTime
())
/
1000
;
if
(
expire
<
TEN_MINUTES
&&
expire
>
NINE_MINUTES
)
{
SOrder
byOrderNo
=
orderService
.
getByOrderNo
(
String
.
valueOf
(
orderNo
));
wechatNewService
.
sendMiniSubscribeMessage
(
byOrderNo
,
MessageReminderEnum
.
RESERVER
);
}
//
long expire = (expirationTime.getTime() - new Date().getTime()) / 1000;
//
if (expire < TEN_MINUTES && expire > NINE_MINUTES) {
//
SOrder byOrderNo = orderService.getByOrderNo(String.valueOf(orderNo));
//
wechatNewService.sendMiniSubscribeMessage(byOrderNo, MessageReminderEnum.RESERVER);
//
}
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
sOrders
.
add
(
orderService
.
getByOrderNo
(
String
.
valueOf
(
orderNo
)));
}
...
...
@@ -264,10 +264,10 @@ public class OrderTask {
room
.
setUpdateTime
(
new
Date
());
}
});
logger
.
info
(
"开始发送消息!!!!"
);
//推送订单开始预定消息
wechatNewService
.
sendMiniSubscribeMessage
(
item
,
MessageReminderEnum
.
START
);
logger
.
info
(
"发送消息结束!!!!"
);
//
logger.info("开始发送消息!!!!");
//
//推送订单开始预定消息
//
wechatNewService.sendMiniSubscribeMessage(item, MessageReminderEnum.START);
//
logger.info("发送消息结束!!!!");
logger
.
info
(
"开始通电!!!!"
);
//到达预定时间进行通电
deviceOpService
.
openOrCloseDevice
(
item
.
getRoomId
(),
item
.
getConsumerPhone
(),
OpTypeEnum
.
GET_ELECTRIC
.
getCode
(),
false
,
ZERO
);
...
...
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
2a09370b
...
...
@@ -162,7 +162,7 @@ public class RedisTask {
//删除redis中的值
redisUtil
.
delete
(
o
);
//推送订单结束消息
wechatNewService
.
sendMiniSubscribeMessage
(
sOrder
,
MessageReminderEnum
.
END
);
//
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.END);
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"
);
...
...
share-system/src/main/java/share/system/service/ISRoomService.java
View file @
2a09370b
...
...
@@ -105,4 +105,6 @@ public interface ISRoomService extends IService<SRoom>
int
deleteRoomDevice
(
Device
device
);
List
<
Map
>
queryRoomList
();
List
<
SRoom
>
selectByStoreIds
(
List
<
Long
>
storeIds
);
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
2a09370b
...
...
@@ -898,7 +898,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
throw
new
BaseException
(
"设备不存在!"
);
}
redisUtils
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
wechatNewService
.
sendMiniSubscribeMessage
(
sOrder
,
MessageReminderEnum
.
START
);
//
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.START);
//开门、取电
deviceOpService
.
openDoor
(
sRoomVo
.
getId
(),
sOrder
.
getConsumerPhone
());
//语音
...
...
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
2a09370b
...
...
@@ -338,6 +338,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
result
=
roomList
.
stream
().
map
(
store
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>()
{{
put
(
"id"
,
store
.
getId
());
put
(
"storeId"
,
store
.
getStoreId
());
put
(
"name"
,
store
.
getName
());
}};
return
map
;
...
...
@@ -346,6 +347,13 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
return
result
;
}
@Override
public
List
<
SRoom
>
selectByStoreIds
(
List
<
Long
>
storeIds
)
{
LambdaQueryWrapper
<
SRoom
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
in
(
SRoom:
:
getStoreId
,
storeIds
);
return
sRoomMapper
.
selectList
(
queryWrapper
);
}
private
List
<
SRoomVo
>
convertDoListToVoList
(
List
<
SRoom
>
roomList
)
{
List
<
SRoomVo
>
voList
=
new
ArrayList
<>();
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
2a09370b
...
...
@@ -128,6 +128,12 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
*/
@Override
public
int
deleteSStoreByIds
(
Long
[]
ids
)
{
//删除门店前判断门店下是否有房间
List
<
Long
>
storeIds
=
Arrays
.
asList
(
ids
);
List
<
SRoom
>
sRooms
=
sRoomService
.
selectByStoreIds
(
storeIds
);
if
(
CollectionUtils
.
isNotEmpty
(
sRooms
))
{
throw
new
BaseException
(
"当前门店下存在房间,不能删除!"
);
}
return
baseMapper
.
deleteSStoreByIds
(
ids
);
}
...
...
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