Commit 9234023a authored by fuwanli's avatar fuwanli

"上2.0"

parent 008568de
......@@ -98,26 +98,9 @@ public class DmHubApi {
DmHubResponse response;
try {
boolean checkResult = this.checkSignature(timestamp, signature);
/* if (!checkResult) {
if (!checkResult) {
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.setCode(response.getError().getString("errorCode"));
} catch (Exception e) {
......@@ -150,22 +133,10 @@ public class DmHubApi {
log.info("**********单条发送入参*******:{},\r\n appId:{},timestamp:{},signature:{}", JSONObject.toJSONString(request), appId, timestamp, signature);
DmHubResponse response;
try {
/* boolean checkResult = this.checkSignature(timestamp, signature);
boolean checkResult = this.checkSignature(timestamp, signature);
if (!checkResult) {
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.setCode(response.getError().getString("errorCode"));
} catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment