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
9234023a
Commit
9234023a
authored
Jul 08, 2020
by
fuwanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"上2.0"
parent
008568de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
32 deletions
+3
-32
DmHubApi.java
src/main/java/com/bgy/sms/channel/api/DmHubApi.java
+3
-32
No files found.
src/main/java/com/bgy/sms/channel/api/DmHubApi.java
View file @
9234023a
...
@@ -98,26 +98,9 @@ public class DmHubApi {
...
@@ -98,26 +98,9 @@ public class DmHubApi {
DmHubResponse
response
;
DmHubResponse
response
;
try
{
try
{
boolean
checkResult
=
this
.
checkSignature
(
timestamp
,
signature
);
boolean
checkResult
=
this
.
checkSignature
(
timestamp
,
signature
);
/*
if (!checkResult) {
if
(!
checkResult
)
{
return
new
DmHubResponse
(
"555"
,
"接口请求签名校验不通过"
);
return
new
DmHubResponse
(
"555"
,
"接口请求签名校验不通过"
);
}*/
List
<
JSONObject
>
data
=
new
ArrayList
<>();
for
(
int
x
=
0
;
x
<
5
;
x
++)
{
String
a
=
"{\n"
+
"\t\"_audienceId\": \"15323888603\",\n"
+
"\t\"name\": \"大夹子\",\n"
+
"\t\"id\": \"699169968926801920\",\n"
+
"\t\"isRealtime\": false\n"
+
"}"
;
a
=
a
.
replaceAll
(
"15323888603"
,
"1532388860"
+
(
3
+
x
));
JSONObject
c
=
JSON
.
parseObject
(
a
);
data
.
add
(
c
);
}
}
request
.
setData
(
data
);
response
=
messageService
.
batchSendOneByOne
(
request
);
response
=
messageService
.
batchSendOneByOne
(
request
);
response
.
setCode
(
response
.
getError
().
getString
(
"errorCode"
));
response
.
setCode
(
response
.
getError
().
getString
(
"errorCode"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -150,22 +133,10 @@ public class DmHubApi {
...
@@ -150,22 +133,10 @@ public class DmHubApi {
log
.
info
(
"**********单条发送入参*******:{},\r\n appId:{},timestamp:{},signature:{}"
,
JSONObject
.
toJSONString
(
request
),
appId
,
timestamp
,
signature
);
log
.
info
(
"**********单条发送入参*******:{},\r\n appId:{},timestamp:{},signature:{}"
,
JSONObject
.
toJSONString
(
request
),
appId
,
timestamp
,
signature
);
DmHubResponse
response
;
DmHubResponse
response
;
try
{
try
{
/*
boolean checkResult = this.checkSignature(timestamp, signature);
boolean
checkResult
=
this
.
checkSignature
(
timestamp
,
signature
);
if
(!
checkResult
)
{
if
(!
checkResult
)
{
return
new
DmHubResponse
(
"555"
,
"签名校验不通过"
);
return
new
DmHubResponse
(
"555"
,
"签名校验不通过"
);
}*/
}
String
a
=
"{\n"
+
"\t\"_audienceId\": \"15323888603\",\n"
+
"\t\"name\": \"大夹子\",\n"
+
"\t\"id\": \"699169968926801920\",\n"
+
"\t\"isRealtime\": false\n"
+
"}"
;
JSONObject
c
=
JSON
.
parseObject
(
a
);
request
.
setData
(
c
);
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
)
{
...
...
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