Commit 9744bce5 authored by qinxunjia's avatar qinxunjia

优化接口参数。

parent bdd91a6e
...@@ -128,7 +128,7 @@ public class DmHubApi { ...@@ -128,7 +128,7 @@ 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", "签名校验不通过");
} }
......
...@@ -22,6 +22,10 @@ public class DmHubBatchSendRequest implements Serializable { ...@@ -22,6 +22,10 @@ public class DmHubBatchSendRequest implements Serializable {
// 短信数据 // 短信数据
private List<JSONObject> data; private List<JSONObject> data;
private String channelAccount;
private String channelType;
public String getTemplateId() { public String getTemplateId() {
return templateId; return templateId;
...@@ -54,4 +58,20 @@ public class DmHubBatchSendRequest implements Serializable { ...@@ -54,4 +58,20 @@ public class DmHubBatchSendRequest implements Serializable {
public void setAudienceIdType(String audienceIdType) { public void setAudienceIdType(String audienceIdType) {
this.audienceIdType = audienceIdType; this.audienceIdType = audienceIdType;
} }
public String getChannelAccount() {
return channelAccount;
}
public void setChannelAccount(String channelAccount) {
this.channelAccount = channelAccount;
}
public String getChannelType() {
return channelType;
}
public void setChannelType(String channelType) {
this.channelType = channelType;
}
} }
...@@ -22,6 +22,10 @@ public class DmHubSendRequest implements Serializable { ...@@ -22,6 +22,10 @@ public class DmHubSendRequest implements Serializable {
// 发送数据 // 发送数据
private JSONObject data; private JSONObject data;
private String channelAccount;
private String channelType;
public String getTemplateId() { public String getTemplateId() {
return templateId; return templateId;
...@@ -54,4 +58,20 @@ public class DmHubSendRequest implements Serializable { ...@@ -54,4 +58,20 @@ public class DmHubSendRequest implements Serializable {
public void setData(JSONObject data) { public void setData(JSONObject data) {
this.data = data; this.data = data;
} }
public String getChannelAccount() {
return channelAccount;
}
public void setChannelAccount(String channelAccount) {
this.channelAccount = channelAccount;
}
public String getChannelType() {
return channelType;
}
public void setChannelType(String channelType) {
this.channelType = channelType;
}
} }
...@@ -246,6 +246,9 @@ public class MessageServiceImpl implements MessageService { ...@@ -246,6 +246,9 @@ public class MessageServiceImpl implements MessageService {
List<String> paramList = new ArrayList<>(); List<String> paramList = new ArrayList<>();
String mobile = data.getString("_audienceId"); String mobile = data.getString("_audienceId");
data.remove("name"); data.remove("name");
data.remove("smsMessage");
data.remove("inWhiteList");
data.remove("isRealtime");
data.remove("id"); data.remove("id");
data.remove("_audienceId"); data.remove("_audienceId");
...@@ -376,6 +379,9 @@ public class MessageServiceImpl implements MessageService { ...@@ -376,6 +379,9 @@ public class MessageServiceImpl implements MessageService {
Set<String> keys = json.keySet(); Set<String> keys = json.keySet();
String mobile = json.getString("_audienceId"); String mobile = json.getString("_audienceId");
json.remove("name"); json.remove("name");
json.remove("smsMessage");
json.remove("inWhiteList");
json.remove("isRealtime");
json.remove("id"); json.remove("id");
json.remove("_audienceId"); json.remove("_audienceId");
mobileList.add(mobile); mobileList.add(mobile);
......
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