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
df069ea1
Commit
df069ea1
authored
Nov 28, 2023
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信提醒代码
parent
8877557e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
SmsTypeEnum.java
...-common/src/main/java/share/common/enums/SmsTypeEnum.java
+3
-1
SmsServiceImpl.java
...c/main/java/share/system/service/impl/SmsServiceImpl.java
+16
-2
No files found.
share-common/src/main/java/share/common/enums/SmsTypeEnum.java
View file @
df069ea1
...
@@ -10,7 +10,9 @@ public enum SmsTypeEnum {
...
@@ -10,7 +10,9 @@ public enum SmsTypeEnum {
SMS_CODE_TEMP
(
1
,
"sms.code.template"
,
"短信验证码"
),
SMS_CODE_TEMP
(
1
,
"sms.code.template"
,
"短信验证码"
),
SMS_CLEAN_RECORDS_TEMP
(
2
,
"sms.clean.records.template"
,
"保洁任务短信提示"
),
SMS_CLEAN_RECORDS_TEMP
(
2
,
"sms.clean.records.template"
,
"保洁任务短信提示"
),
SMS_CLEAN_RECORDS_TEMP_15
(
3
,
"sms.clean.records.template.15"
,
"即将保洁任务短信提醒"
)
SMS_CLEAN_RECORDS_TEMP_15
(
3
,
"sms.clean.records.template.15"
,
"即将保洁任务短信提醒"
),
SMS_ORDER_START_TEMP
(
4
,
"sms.order.start.template"
,
"订单即将开始提示短信"
),
SMS_ORDER_END_TEMP
(
5
,
"sms.order.end.template"
,
"订单即结束始提示短信"
),
;
;
private
Integer
code
;
private
Integer
code
;
...
...
share-system/src/main/java/share/system/service/impl/SmsServiceImpl.java
View file @
df069ea1
...
@@ -123,12 +123,26 @@ public class SmsServiceImpl implements SmsService {
...
@@ -123,12 +123,26 @@ public class SmsServiceImpl implements SmsService {
@Override
@Override
public
boolean
sendSmsOrderStartRemind
(
String
phone
,
SStore
store
,
SRoom
room
)
{
public
boolean
sendSmsOrderStartRemind
(
String
phone
,
SStore
store
,
SRoom
room
)
{
return
false
;
// 通过配置获取短信模版
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_ORDER_START_TEMP
.
getValue
());
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
room
.
getName
(),
store
.
getAddress
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_ORDER_START_TEMP
.
getCode
(),
content
);
}
else
{
return
Boolean
.
FALSE
;
}
}
}
@Override
@Override
public
boolean
sendSmsOrderEndRemind
(
String
phone
,
SStore
store
,
SRoom
room
)
{
public
boolean
sendSmsOrderEndRemind
(
String
phone
,
SStore
store
,
SRoom
room
)
{
return
false
;
// 通过配置获取短信模版
SysConfig
config
=
sysConfigMapper
.
checkConfigKeyUnique
(
SmsTypeEnum
.
SMS_ORDER_END_TEMP
.
getValue
());
if
(
config
!=
null
)
{
String
content
=
MessageFormat
.
format
(
config
.
getConfigValue
(),
room
.
getName
());
return
sendSms
(
phone
,
SmsTypeEnum
.
SMS_ORDER_END_TEMP
.
getCode
(),
content
);
}
else
{
return
Boolean
.
FALSE
;
}
}
}
private
String
getSmsContent
(
String
phone
,
Integer
tag
)
{
private
String
getSmsContent
(
String
phone
,
Integer
tag
)
{
...
...
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