Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
11d84b53
Commit
11d84b53
authored
Aug 30, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
f5072981
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
SmsService.java
.../java/com/xxfc/platform/universal/service/SmsService.java
+9
-4
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/SmsService.java
View file @
11d84b53
...
@@ -195,21 +195,26 @@ public class SmsService {
...
@@ -195,21 +195,26 @@ public class SmsService {
try
{
try
{
JSONObject
jsonParams
=
new
JSONObject
();
JSONObject
jsonParams
=
new
JSONObject
();
for
(
int
i
=
0
;
i
<
params
.
length
;
i
++){
for
(
int
i
=
0
;
i
<
params
.
length
;
i
++){
jsonParams
.
put
(
param
+(
i
+
1
),
params
[
i
]);
String
para
=
params
[
i
];
if
(
para
.
contains
(
"【"
)){
para
=
para
.
replaceAll
(
"【"
,
""
);
}
if
(
para
.
contains
(
"】"
)){
para
=
para
.
replaceAll
(
"】"
,
""
);
}
jsonParams
.
put
(
param
+(
i
+
1
),
para
);
}
}
sendTemplate
(
PhoneNumbers
,
jsonParams
.
toJSONString
(),
templateCode
);
sendTemplate
(
PhoneNumbers
,
jsonParams
.
toJSONString
(),
templateCode
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
public
static
void
main
(
String
[]
args
)
throws
ClientException
,
InterruptedException
{
public
static
void
main
(
String
[]
args
)
throws
ClientException
,
InterruptedException
{
SmsService
smsService
=
new
SmsService
();
SmsService
smsService
=
new
SmsService
();
//发短信
//发短信
String
[]
params
={
"1"
,
"2"
,
"3"
,
"2019-08-29"
,
"
松山湖
"
};
String
[]
params
={
"1"
,
"2"
,
"3"
,
"2019-08-29"
,
"
【松山湖】
"
};
SmsService
.
sendTemplateToJson
(
"13612688539,13265487972"
,
params
,
"SMS_169904346"
);
SmsService
.
sendTemplateToJson
(
"13612688539,13265487972"
,
params
,
"SMS_169904346"
);
/*System.out.println("短信接口返回的数据----------------");
/*System.out.println("短信接口返回的数据----------------");
System.out.println("Code=" + response.getCode());
System.out.println("Code=" + response.getCode());
...
...
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