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
a046d5ea
Commit
a046d5ea
authored
Jan 16, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开放短信通知
parent
683b9cc1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
32 deletions
+36
-32
QPServiceImplAspect.java
...ain/java/share/framework/aspectj/QPServiceImplAspect.java
+5
-1
OrderTask.java
share-quartz/src/main/java/share/quartz/task/OrderTask.java
+3
-3
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+11
-11
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+5
-5
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+12
-12
No files found.
share-framework/src/main/java/share/framework/aspectj/QPServiceImplAspect.java
View file @
a046d5ea
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
share.common.enums.UserStatusEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.enums.YesNoEnum
;
import
share.system.domain.CouponLog
;
import
share.system.domain.CouponLog
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SConsumerCoupon
;
...
@@ -151,7 +152,10 @@ public class QPServiceImplAspect {
...
@@ -151,7 +152,10 @@ public class QPServiceImplAspect {
couponLog
.
setCode
(
jsonObject
.
getString
(
"code"
));
couponLog
.
setCode
(
jsonObject
.
getString
(
"code"
));
LambdaQueryWrapper
<
SConsumerCoupon
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SConsumerCoupon
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
SConsumerCoupon:
:
getCouponCode
,
couponLog
.
getCode
());
lambdaQueryWrapper
.
eq
(
SConsumerCoupon:
:
getCouponCode
,
couponLog
.
getCode
());
SConsumerCoupon
one
=
sConsumerCouponService
.
getOne
(
lambdaQueryWrapper
);
lambdaQueryWrapper
.
in
(
SConsumerCoupon:
:
getUseStatus
,
UserStatusEnum
.
UNUSED
.
getCode
(),
UserStatusEnum
.
USED
.
getCode
());
List
<
SConsumerCoupon
>
list
=
sConsumerCouponService
.
list
(
lambdaQueryWrapper
);
//过滤只有已使用
SConsumerCoupon
one
=
list
.
stream
().
filter
(
sConsumerCoupon
->
sConsumerCoupon
.
getUseStatus
().
equals
(
UserStatusEnum
.
USED
.
getCode
())).
findFirst
().
orElse
(
null
);
couponLog
.
setConsumerId
(
one
.
getConsumerId
());
couponLog
.
setConsumerId
(
one
.
getConsumerId
());
couponLog
.
setCouponId
(
one
.
getId
());
couponLog
.
setCouponId
(
one
.
getId
());
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SStore
>
sStoreLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
share-quartz/src/main/java/share/quartz/task/OrderTask.java
View file @
a046d5ea
...
@@ -256,9 +256,9 @@ public class OrderTask {
...
@@ -256,9 +256,9 @@ public class OrderTask {
// }
// }
//判断时间是否在15分钟到14分钟
//判断时间是否在15分钟到14分钟
if
(
expire
<
FIFTEEN_MINUTES
&&
expire
>
FOURTEEN_MINUTES
)
{
if
(
expire
<
FIFTEEN_MINUTES
&&
expire
>
FOURTEEN_MINUTES
)
{
//
SStore sStore = storeService.getById(byOrderNo.getStoreId());
SStore
sStore
=
storeService
.
getById
(
byOrderNo
.
getStoreId
());
//
SRoom sRoom = roomService.getById(byOrderNo.getRoomId());
SRoom
sRoom
=
roomService
.
getById
(
byOrderNo
.
getRoomId
());
//
smsService.sendSmsOrderStartRemind(byOrderNo.getConsumerPhone(), sStore, sRoom);
smsService
.
sendSmsOrderStartRemind
(
byOrderNo
.
getConsumerPhone
(),
sStore
,
sRoom
);
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单开始预定时间到15分钟"
);
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单开始预定时间到15分钟"
);
return
;
return
;
}
}
...
...
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
a046d5ea
...
@@ -220,17 +220,17 @@ public class RedisTask {
...
@@ -220,17 +220,17 @@ public class RedisTask {
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
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);
SStore
sStore
=
sStoreList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
sOrder
.
getStoreId
())).
findFirst
().
orElse
(
null
);
//
从房间集合中判断房间id相同的房间对象
//
从房间集合中判断房间id相同的房间对象
//
SRoom sRoom = sRoomList.stream().filter(item -> item.getId().equals(sOrder.getRoomId())).findFirst().orElse(null);
SRoom
sRoom
=
sRoomList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
sOrder
.
getRoomId
())).
findFirst
().
orElse
(
null
);
//
通知用户
//
通知用户
//
smsService.sendSmsOrderEndRemind(sOrder.getConsumerPhone(), sStore, sRoom);
smsService
.
sendSmsOrderEndRemind
(
sOrder
.
getConsumerPhone
(),
sStore
,
sRoom
);
//
//通知保洁人员
//通知保洁人员
//
sConsumerService.selectListByStoreId(sOrder.getStoreId()).stream().forEach(item -> {
sConsumerService
.
selectListByStoreId
(
sOrder
.
getStoreId
()).
stream
().
forEach
(
item
->
{
//
// 循环发送短信提示门店保洁打扫卫生
// 循环发送短信提示门店保洁打扫卫生
//
smsService.sendSmsCleanRecordsRemind15(item.getPhone(), sStore, sRoom);
smsService
.
sendSmsCleanRecordsRemind15
(
item
.
getPhone
(),
sStore
,
sRoom
);
//
});
});
return
;
return
;
}
}
//判断时间是否在5分钟到4分钟
//判断时间是否在5分钟到4分钟
...
...
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
a046d5ea
...
@@ -147,11 +147,11 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
...
@@ -147,11 +147,11 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
sCleanRecords
.
setStatus
(
0
);
sCleanRecords
.
setStatus
(
0
);
sCleanRecords
.
setCreateTime
(
DateUtils
.
getNowDate
());
sCleanRecords
.
setCreateTime
(
DateUtils
.
getNowDate
());
boolean
b
=
0
<
baseMapper
.
insertSCleanRecords
(
sCleanRecords
);
boolean
b
=
0
<
baseMapper
.
insertSCleanRecords
(
sCleanRecords
);
//
if (b) {
if
(
b
)
{
//
SStore store = sStoreMapper.selectSStoreById(storeId);
SStore
store
=
sStoreMapper
.
selectSStoreById
(
storeId
);
//
SRoom room = sRoomMapper.selectSRoomById(roomId);
SRoom
room
=
sRoomMapper
.
selectSRoomById
(
roomId
);
//
sendSms(storeId, store, room);
sendSms
(
storeId
,
store
,
room
);
//
}
}
return
b
;
return
b
;
}
}
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
a046d5ea
...
@@ -378,12 +378,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -378,12 +378,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
deviceOpService
.
actionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
RENEWAL_SUCCESS
.
getCode
(),
deviceOpService
.
actionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
RENEWAL_SUCCESS
.
getCode
(),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
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"
);
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
//
SRoom sRoom = roomService.getById(sOrder.getRoomId());
SRoom
sRoom
=
roomService
.
getById
(
sOrder
.
getRoomId
());
//
//通知保洁人员
//通知保洁人员
//
sConsumerService.selectListByStoreId(sOrder.getStoreId()).stream().forEach(item -> {
sConsumerService
.
selectListByStoreId
(
sOrder
.
getStoreId
()).
stream
().
forEach
(
item
->
{
//
// 循环发送短信提示门店保洁打扫卫生
// 循环发送短信提示门店保洁打扫卫生
//
smsService.sendSmsCleanRecordsStopRemind(item.getPhone(), sStore, sRoom);
smsService
.
sendSmsCleanRecordsStopRemind
(
item
.
getPhone
(),
sStore
,
sRoom
);
//
});
});
}
}
}
}
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
...
@@ -764,12 +764,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -764,12 +764,12 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
deviceOpService
.
actionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
RENEWAL_SUCCESS
.
getCode
(),
deviceOpService
.
actionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
RENEWAL_SUCCESS
.
getCode
(),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
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"
);
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
);
//
SRoom sRoom = roomService.getById(sOrder.getRoomId());
SRoom
sRoom
=
roomService
.
getById
(
sOrder
.
getRoomId
());
//
//通知保洁人员
//通知保洁人员
//
sConsumerService.selectListByStoreId(sOrder.getStoreId()).stream().forEach(item -> {
sConsumerService
.
selectListByStoreId
(
sOrder
.
getStoreId
()).
stream
().
forEach
(
item
->
{
//
// 循环发送短信提示门店保洁打扫卫生
// 循环发送短信提示门店保洁打扫卫生
//
smsService.sendSmsCleanRecordsStopRemind(item.getPhone(), sStore, sRoom);
smsService
.
sendSmsCleanRecordsStopRemind
(
item
.
getPhone
(),
sStore
,
sRoom
);
//
});
});
}
}
sConsumptionRecordsService
.
insertSConsumptionRecords
(
sOrder
);
sConsumptionRecordsService
.
insertSConsumptionRecords
(
sOrder
);
}
}
...
...
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