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
c2387863
Commit
c2387863
authored
Sep 03, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
9e2bac91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
17 deletions
+42
-17
AliYunSmsBiz.java
...in/java/com/xxfc/platform/universal/biz/AliYunSmsBiz.java
+1
-1
SmsService.java
.../java/com/xxfc/platform/universal/service/SmsService.java
+41
-16
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/AliYunSmsBiz.java
View file @
c2387863
...
...
@@ -125,7 +125,7 @@ public class AliYunSmsBiz {
SmsService
.
sendTemplateToJson
(
phoneNumbers
,
params
,
TEMPLATE_ID_PAY_D
);
break
;
case
14
:
SmsService
.
sendTemplateToJson
(
phoneNumbers
,
params
,
TEMPLATE_ID_PAY_E
);
SmsService
.
sendTemplateToJson
14
(
phoneNumbers
,
params
,
TEMPLATE_ID_PAY_E
);
break
;
case
15
:
SmsService
.
sendTemplateToJson
(
phoneNumbers
,
params
,
TEMPLATE_ID_PAY_F
);
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/SmsService.java
View file @
c2387863
...
...
@@ -192,22 +192,47 @@ public class SmsService {
}
public
static
void
sendTemplateToJson
(
String
PhoneNumbers
,
String
[]
params
,
String
templateCode
){
try
{
JSONObject
jsonParams
=
new
JSONObject
();
for
(
int
i
=
0
;
i
<
params
.
length
;
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
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
try
{
JSONObject
jsonParams
=
new
JSONObject
();
for
(
int
i
=
0
;
i
<
params
.
length
;
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
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
public
static
void
sendTemplateToJson14
(
String
PhoneNumbers
,
String
[]
params
,
String
templateCode
){
try
{
JSONObject
jsonParams
=
new
JSONObject
();
for
(
int
i
=
0
;
i
<
params
.
length
;
i
++){
String
para
=
params
[
i
];
if
(
para
.
contains
(
"【"
)){
para
=
para
.
replaceAll
(
"【"
,
""
);
}
if
(
para
.
contains
(
"】"
)){
para
=
para
.
replaceAll
(
"】"
,
""
);
}
if
(
i
>
3
){
jsonParams
.
put
(
param
+(
i
+
2
),
para
);
}
else
{
jsonParams
.
put
(
param
+(
i
+
1
),
para
);
}
}
sendTemplate
(
PhoneNumbers
,
jsonParams
.
toJSONString
(),
templateCode
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
...
...
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