|
@@ -1,6 +1,7 @@
|
|
|
package com.szwl.model.utils;
|
|
|
|
|
|
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.apache.http.HttpEntity;
|
|
|
import org.apache.http.NameValuePair;
|
|
|
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
|
@@ -194,22 +195,39 @@ public final class YunPianSms {
|
|
|
return message;
|
|
|
}
|
|
|
|
|
|
+ public static String getSzMessage(String sn, String price, String time, String equipmentName, String payTime) {
|
|
|
+ return "【申泽智能】您好,客诉订单平台已帮您进行退款处理\n" +
|
|
|
+ "订单号:" + sn +
|
|
|
+ "\n设备:" + equipmentName +
|
|
|
+ "\n退款时间:" + time +
|
|
|
+ "\n如有疑问,请咨询您的营销经理或微信售后群。";
|
|
|
+ }
|
|
|
+
|
|
|
+ public static String getScMessage(String sn, String price, String time, String equipmentName, String payTime) {
|
|
|
+ return "【七云科技】您好,客诉订单平台已帮您进行退款处理\n" +
|
|
|
+ "订单号:" + sn +
|
|
|
+ "\n设备:" + equipmentName +
|
|
|
+ "\n退款时间:" + time +
|
|
|
+ "\n如有疑问,请咨询您的营销经理或微信售后群。";
|
|
|
+ }
|
|
|
+
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
//String content="【申泽智能】您好,机器二次取棍异常报警,机器名:MG301测试机,设备号:aaa863010031925055";
|
|
|
- String tpl_value = URLEncoder.encode("#content#", ENCODING) + "=" +
|
|
|
- URLEncoder.encode("二次", ENCODING) + "&" + URLEncoder.encode(
|
|
|
- "#name#", ENCODING) + "=" + URLEncoder.encode("MG机",
|
|
|
- ENCODING) + "&" + URLEncoder.encode("#clientId#", ENCODING) + "=" + URLEncoder.encode("aaa8635", ENCODING);
|
|
|
- //您好,机器#content#,机器名:#name#,设备号:#clientId#
|
|
|
- System.out.println(tpl_value.length());
|
|
|
- String content = "您好,机器二次取棍异常警告,机器名:MG301测试机,设备号:aaa863010031925055";
|
|
|
- System.out.println(content.length());
|
|
|
+// String tpl_value = URLEncoder.encode("#content#", ENCODING) + "=" +
|
|
|
+// URLEncoder.encode("二次", ENCODING) + "&" + URLEncoder.encode(
|
|
|
+// "#name#", ENCODING) + "=" + URLEncoder.encode("MG机",
|
|
|
+// ENCODING) + "&" + URLEncoder.encode("#clientId#", ENCODING) + "=" + URLEncoder.encode("aaa8635", ENCODING);
|
|
|
+// //您好,机器#content#,机器名:#name#,设备号:#clientId#
|
|
|
+// System.out.println(tpl_value.length());
|
|
|
+// String content = "您好,机器二次取棍异常警告,机器名:MG301测试机,设备号:aaa863010031925055";
|
|
|
+// System.out.println(content.length());
|
|
|
//String result = tplSendSms("07784f5fedb508046c841b391005b7de", 2890698L, tpl_value, "15875317659");
|
|
|
-
|
|
|
- String result = sendSms("07784f5fedb508046c841b391005b7de", content, "15875317659");
|
|
|
+ String content = getScMessage("67097276473620250724145653", "2.00", "2018-05-09 09:09:09", "测试机", "2018-05-09 09:09:09");
|
|
|
+ System.out.println(content);
|
|
|
+ String result = sendSms("07784f5fedb508046c841b391005b7de", content, "15815278034");
|
|
|
JSONObject resultJson = new JSONObject(result);
|
|
|
System.out.println("短信发送结果:" + resultJson.get("msg"));
|
|
|
} catch (IOException e) {
|