Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dmhub-plugin
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
qinxunjia
dmhub-plugin
Commits
dc422fdc
Commit
dc422fdc
authored
Jul 08, 2020
by
fuwanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"去掉尾部,"
parent
9234023a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
DmHubApi.java
src/main/java/com/bgy/sms/channel/api/DmHubApi.java
+1
-0
MessageServiceImpl.java
...ain/java/com/bgy/sms/service/impl/MessageServiceImpl.java
+6
-6
No files found.
src/main/java/com/bgy/sms/channel/api/DmHubApi.java
View file @
dc422fdc
...
@@ -137,6 +137,7 @@ public class DmHubApi {
...
@@ -137,6 +137,7 @@ public class DmHubApi {
if
(!
checkResult
)
{
if
(!
checkResult
)
{
return
new
DmHubResponse
(
"555"
,
"签名校验不通过"
);
return
new
DmHubResponse
(
"555"
,
"签名校验不通过"
);
}
}
response
=
messageService
.
send
(
request
);
response
=
messageService
.
send
(
request
);
response
.
setCode
(
response
.
getError
().
getString
(
"errorCode"
));
response
.
setCode
(
response
.
getError
().
getString
(
"errorCode"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/bgy/sms/service/impl/MessageServiceImpl.java
View file @
dc422fdc
...
@@ -476,7 +476,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -476,7 +476,7 @@ public class MessageServiceImpl implements MessageService {
String
content
=
templateInfo
.
getUpContent
();
String
content
=
templateInfo
.
getUpContent
();
for
(
String
mobile
:
mobileList
)
{
for
(
String
mobile
:
mobileList
)
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
mobiles
.
append
(
","
+
mobile
);
mobiles
.
append
(
mobile
+
","
);
jsonObject
.
put
(
"mobile"
,
mobile
);
jsonObject
.
put
(
"mobile"
,
mobile
);
jsonObject
.
put
(
"content"
,
content
);
jsonObject
.
put
(
"content"
,
content
);
list
.
add
(
jsonObject
);
list
.
add
(
jsonObject
);
...
@@ -487,7 +487,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -487,7 +487,7 @@ public class MessageServiceImpl implements MessageService {
String
code
=
response
.
getCode
();
String
code
=
response
.
getCode
();
if
(
code
.
equals
(
ResponseCode
.
SUCCESS
.
getCode
()))
{
if
(
code
.
equals
(
ResponseCode
.
SUCCESS
.
getCode
()))
{
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setMobile
(
mobiles
.
toString
());
sysRecordInfo
.
setMobile
(
mobiles
.
deleteCharAt
(
mobiles
.
length
()-
1
).
toString
());
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setStatus
(
ResponseCode
.
SUCCESS
.
getCode
());
sysRecordInfo
.
setStatus
(
ResponseCode
.
SUCCESS
.
getCode
());
...
@@ -497,7 +497,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -497,7 +497,7 @@ public class MessageServiceImpl implements MessageService {
return
new
DmHubResponse
(
ResponseCode
.
SUCCESS
.
getCode
(),
ResponseCode
.
SUCCESS
.
getMsg
());
return
new
DmHubResponse
(
ResponseCode
.
SUCCESS
.
getCode
(),
ResponseCode
.
SUCCESS
.
getMsg
());
}
else
{
}
else
{
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setMobile
(
mobiles
.
toString
());
sysRecordInfo
.
setMobile
(
mobiles
.
deleteCharAt
(
mobiles
.
length
()-
1
).
toString
());
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setStatus
(
ResponseCode
.
UPSTREAM_FAIL
.
getCode
());
sysRecordInfo
.
setStatus
(
ResponseCode
.
UPSTREAM_FAIL
.
getCode
());
...
@@ -525,7 +525,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -525,7 +525,7 @@ public class MessageServiceImpl implements MessageService {
String
sendMsg
=
getMsg
(
templateInfo
.
getUpContent
(),
paramsList
);
String
sendMsg
=
getMsg
(
templateInfo
.
getUpContent
(),
paramsList
);
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
mobiles
.
append
(
","
+
mobile
);
mobiles
.
append
(
mobile
+
","
);
jsonObject
.
put
(
"mobile"
,
mobile
);
jsonObject
.
put
(
"mobile"
,
mobile
);
jsonObject
.
put
(
"content"
,
sendMsg
);
jsonObject
.
put
(
"content"
,
sendMsg
);
list
.
add
(
jsonObject
);
list
.
add
(
jsonObject
);
...
@@ -536,7 +536,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -536,7 +536,7 @@ public class MessageServiceImpl implements MessageService {
String
code
=
response
.
getCode
();
String
code
=
response
.
getCode
();
if
(
code
.
equals
(
ResponseCode
.
SUCCESS
.
getCode
()))
{
if
(
code
.
equals
(
ResponseCode
.
SUCCESS
.
getCode
()))
{
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setMobile
(
mobiles
.
toString
());
sysRecordInfo
.
setMobile
(
mobiles
.
deleteCharAt
(
mobiles
.
length
()-
1
).
toString
());
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setStatus
(
ResponseCode
.
SUCCESS
.
getCode
());
sysRecordInfo
.
setStatus
(
ResponseCode
.
SUCCESS
.
getCode
());
...
@@ -546,7 +546,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -546,7 +546,7 @@ public class MessageServiceImpl implements MessageService {
return
new
DmHubResponse
(
ResponseCode
.
SUCCESS
.
getCode
(),
ResponseCode
.
SUCCESS
.
getMsg
());
return
new
DmHubResponse
(
ResponseCode
.
SUCCESS
.
getCode
(),
ResponseCode
.
SUCCESS
.
getMsg
());
}
else
{
}
else
{
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setChargeNum
(
list
.
size
());
sysRecordInfo
.
setMobile
(
mobiles
.
toString
());
sysRecordInfo
.
setMobile
(
mobiles
.
deleteCharAt
(
mobiles
.
length
()-
1
).
toString
());
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setContent
(
content
);
sysRecordInfo
.
setStatus
(
ResponseCode
.
UPSTREAM_FAIL
.
getCode
());
sysRecordInfo
.
setStatus
(
ResponseCode
.
UPSTREAM_FAIL
.
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