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
58828575
Commit
58828575
authored
Dec 01, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改订阅消息模板ID
parent
ddb22da2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
MessageReminderEnum.java
...src/main/java/share/common/enums/MessageReminderEnum.java
+1
-1
TemplateMessageVo.java
...c/main/java/share/system/domain/vo/TemplateMessageVo.java
+1
-1
WechatNewServiceImpl.java
.../java/share/system/service/impl/WechatNewServiceImpl.java
+8
-5
No files found.
share-common/src/main/java/share/common/enums/MessageReminderEnum.java
View file @
58828575
...
...
@@ -3,7 +3,7 @@ package share.common.enums;
public
enum
MessageReminderEnum
{
//预约到期通知:oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8,订单开始通知:K8fbcKVq46w9o7Ekpesn74WPjwxnbso947YZiYBQw9c,订单结单通知:HB2_moQRQrXC2cKw6zE08NU3AQO9Ggj3aAOg0lIgecg
RESERVER
(
"预约到期通知"
,
"oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8"
),
START
(
"订单开始通知"
,
"K8fbcKVq46w9o7Ekpesn74
WPjwxnbso947YZiYBQw9c
"
),
START
(
"订单开始通知"
,
"K8fbcKVq46w9o7Ekpesn74
RThj_Yw6hFNwA-A5L3XA0
"
),
END
(
"订单结单通知"
,
"HB2_moQRQrXC2cKw6zE08NU3AQO9Ggj3aAOg0lIgecg"
);
private
String
name
;
private
String
value
;
...
...
share-system/src/main/java/share/system/domain/vo/TemplateMessageVo.java
View file @
58828575
...
...
@@ -23,7 +23,7 @@ public class TemplateMessageVo {
private
String
template_id
;
@ApiModelProperty
(
value
=
"模板跳转链接(海外帐号没有跳转能力)"
)
private
String
url
;
private
String
page
;
@ApiModelProperty
(
value
=
"发送内容"
)
private
HashMap
<
String
,
SendTemplateMessageItemVo
>
data
;
...
...
share-system/src/main/java/share/system/service/impl/WechatNewServiceImpl.java
View file @
58828575
...
...
@@ -530,7 +530,7 @@ public class WechatNewServiceImpl implements WechatNewService {
//发送模板消息 预约提醒到期
TemplateMessageVo
templateMessageVo
=
new
TemplateMessageVo
();
String
url
=
"https://www.coujio.com/front-api/order/"
+
byOrderNo
.
getOrderNo
();
templateMessageVo
.
set
Url
(
url
);
templateMessageVo
.
set
Page
(
url
);
HashMap
<
String
,
SendTemplateMessageItemVo
>
data
=
new
HashMap
<>();
SStore
sStore
=
storeService
.
getById
(
byOrderNo
.
getStoreId
());
SRoomVo
sRoomVo
=
roomService
.
selectSRoomById
(
byOrderNo
.
getRoomId
());
...
...
@@ -541,6 +541,7 @@ public class WechatNewServiceImpl implements WechatNewService {
String
preStartDateStr
=
DateUtil
.
format
(
preStartDate
,
DatePattern
.
NORM_DATETIME_MINUTE_FORMATTER
);
String
preEndDateStr
=
DateUtil
.
format
(
preEndDate
,
DatePattern
.
NORM_DATETIME_MINUTE_FORMATTER
);
SConsumerToken
tokenByUserId
=
sConsumerTokenService
.
getTokenByUserId
(
byOrderNo
.
getConsumerId
());
String
date
=
preStartDateStr
+
"~"
+
preEndDateStr
;
templateMessageVo
.
setTouser
(
tokenByUserId
.
getToken
());
if
(
messageReminderEnum
.
equals
(
MessageReminderEnum
.
RESERVER
))
{
templateMessageVo
.
setTemplate_id
(
MessageReminderEnum
.
RESERVER
.
getValue
());
...
...
@@ -549,9 +550,11 @@ public class WechatNewServiceImpl implements WechatNewService {
//服务名称
data
.
put
(
"thing7"
,
new
SendTemplateMessageItemVo
(
sRoomVo
.
getName
()));
//预约时间
data
.
put
(
"date3"
,
new
SendTemplateMessageItemVo
(
preStartDateStr
+
"-"
+
preEndDateStr
));
data
.
put
(
"date3"
,
new
SendTemplateMessageItemVo
(
date
));
//地址
data
.
put
(
"thing5"
,
new
SendTemplateMessageItemVo
(
sStore
.
getAddress
()));
String
address
=
sStore
.
getAddress
();
String
substring
=
address
.
substring
(
0
,
20
);
data
.
put
(
"thing5"
,
new
SendTemplateMessageItemVo
(
substring
));
}
else
if
(
messageReminderEnum
.
equals
(
MessageReminderEnum
.
START
))
{
templateMessageVo
.
setTemplate_id
(
MessageReminderEnum
.
START
.
getValue
());
//预约门店
...
...
@@ -559,7 +562,7 @@ public class WechatNewServiceImpl implements WechatNewService {
//服务名称
data
.
put
(
"thing7"
,
new
SendTemplateMessageItemVo
(
sRoomVo
.
getName
()));
//预约时间
data
.
put
(
"time8"
,
new
SendTemplateMessageItemVo
(
preStartDateStr
+
"-"
+
preEndDateStr
));
data
.
put
(
"time8"
,
new
SendTemplateMessageItemVo
(
date
));
//地址
//截取20个字符
String
address
=
sStore
.
getAddress
();
...
...
@@ -574,7 +577,7 @@ public class WechatNewServiceImpl implements WechatNewService {
//服务名称
data
.
put
(
"thing6"
,
new
SendTemplateMessageItemVo
(
sRoomVo
.
getName
()));
//订单时间
data
.
put
(
"time7"
,
new
SendTemplateMessageItemVo
(
preStartDateStr
+
"-"
+
preEndDateStr
));
data
.
put
(
"time7"
,
new
SendTemplateMessageItemVo
(
date
));
//地址
//截取20个字符
String
address
=
sStore
.
getAddress
();
...
...
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