Commit dc422fdc authored by fuwanli's avatar fuwanli

"去掉尾部,"

parent 9234023a
...@@ -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) {
......
...@@ -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());
......
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