Commit dc422fdc authored by fuwanli's avatar fuwanli

"去掉尾部,"

parent 9234023a
......@@ -137,6 +137,7 @@ public class DmHubApi {
if (!checkResult) {
return new DmHubResponse("555", "签名校验不通过");
}
response = messageService.send(request);
response.setCode(response.getError().getString("errorCode"));
} catch (Exception e) {
......
......@@ -476,7 +476,7 @@ public class MessageServiceImpl implements MessageService {
String content = templateInfo.getUpContent();
for (String mobile : mobileList) {
JSONObject jsonObject = new JSONObject();
mobiles.append("," + mobile);
mobiles.append(mobile+",");
jsonObject.put("mobile", mobile);
jsonObject.put("content", content);
list.add(jsonObject);
......@@ -487,7 +487,7 @@ public class MessageServiceImpl implements MessageService {
String code = response.getCode();
if (code.equals(ResponseCode.SUCCESS.getCode())) {
sysRecordInfo.setChargeNum(list.size());
sysRecordInfo.setMobile(mobiles.toString());
sysRecordInfo.setMobile(mobiles.deleteCharAt(mobiles.length()-1).toString());
sysRecordInfo.setContent(content);
sysRecordInfo.setStatus(ResponseCode.SUCCESS.getCode());
......@@ -497,7 +497,7 @@ public class MessageServiceImpl implements MessageService {
return new DmHubResponse(ResponseCode.SUCCESS.getCode(), ResponseCode.SUCCESS.getMsg());
} else {
sysRecordInfo.setChargeNum(list.size());
sysRecordInfo.setMobile(mobiles.toString());
sysRecordInfo.setMobile(mobiles.deleteCharAt(mobiles.length()-1).toString());
sysRecordInfo.setContent(content);
sysRecordInfo.setStatus(ResponseCode.UPSTREAM_FAIL.getCode());
......@@ -525,7 +525,7 @@ public class MessageServiceImpl implements MessageService {
String sendMsg = getMsg(templateInfo.getUpContent(), paramsList);
JSONObject jsonObject = new JSONObject();
mobiles.append("," + mobile);
mobiles.append(mobile+",");
jsonObject.put("mobile", mobile);
jsonObject.put("content", sendMsg);
list.add(jsonObject);
......@@ -536,7 +536,7 @@ public class MessageServiceImpl implements MessageService {
String code = response.getCode();
if (code.equals(ResponseCode.SUCCESS.getCode())) {
sysRecordInfo.setChargeNum(list.size());
sysRecordInfo.setMobile(mobiles.toString());
sysRecordInfo.setMobile(mobiles.deleteCharAt(mobiles.length()-1).toString());
sysRecordInfo.setContent(content);
sysRecordInfo.setStatus(ResponseCode.SUCCESS.getCode());
......@@ -546,7 +546,7 @@ public class MessageServiceImpl implements MessageService {
return new DmHubResponse(ResponseCode.SUCCESS.getCode(), ResponseCode.SUCCESS.getMsg());
} else {
sysRecordInfo.setChargeNum(list.size());
sysRecordInfo.setMobile(mobiles.toString());
sysRecordInfo.setMobile(mobiles.deleteCharAt(mobiles.length()-1).toString());
sysRecordInfo.setContent(content);
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