|
@@ -116,7 +116,10 @@ public class SendMessageUtil {
|
|
result = true;
|
|
result = true;
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ //基本样式:
|
|
|
|
+ //{"topcolor":"#173177","data":{"first":{"color":"#173177","value":"biaosti"},"keyword1":{"color":"#173177","value":"biaosti"},"keyword2":{"color":"#173177","value":"biaosti"},"keyword3":{"color":"#173177","value":"biaosti"},"keyword4":{"color":"#173177","value":"biaosti"},"remark":{"color":"#173177","value":"xx"}},"template_id":"EAHie4LJAWr82FfNiClPCr9zA4OEiiqvB2wINfUaT_k","touser":"oZ9pv02WMRQgyDVRY1a_daYecwHI","url":"https://s.iamberry.com/soodo/wechat/index.html"}
|
|
|
|
+
|
|
/*public static void main(String[] args) {
|
|
/*public static void main(String[] args) {
|
|
// String date = "{'first':{'color':'#173177', 'value':'尊敬的客户您好~您的订单已发货~'}, 'order_id':{'color':'#173177','value':'1009145345B11792L'}, 'package_id':{'color':'#173177','value':'yuantong:34234234'}, 'remark':{'color':'#173177', 'value':'点击进入商城查看-->>'}}";
|
|
// String date = "{'first':{'color':'#173177', 'value':'尊敬的客户您好~您的订单已发货~'}, 'order_id':{'color':'#173177','value':'1009145345B11792L'}, 'package_id':{'color':'#173177','value':'yuantong:34234234'}, 'remark':{'color':'#173177', 'value':'点击进入商城查看-->>'}}";
|
|
String date = "{'name':{'color':'#173177','value':'上朵柔羽呵护刷头 (冰川蓝)'}, 'remark':{'color':'#173177','value':'您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)'}}";
|
|
String date = "{'name':{'color':'#173177','value':'上朵柔羽呵护刷头 (冰川蓝)'}, 'remark':{'color':'#173177','value':'您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)'}}";
|
|
@@ -130,8 +133,30 @@ public class SendMessageUtil {
|
|
// SendMessageUtil sendMessageUtil = new SendMessageUtil();
|
|
// SendMessageUtil sendMessageUtil = new SendMessageUtil();
|
|
// sendMessageUtil.failedPurchase("上朵柔羽呵护刷头 (冰川蓝)",
|
|
// sendMessageUtil.failedPurchase("上朵柔羽呵护刷头 (冰川蓝)",
|
|
// "您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)","oZ9pv02WMRQgyDVRY1a_daYecwHI","https://s.iamberry.com/soodo/wechat/index.html");
|
|
// "您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)","oZ9pv02WMRQgyDVRY1a_daYecwHI","https://s.iamberry.com/soodo/wechat/index.html");
|
|
-
|
|
|
|
}*/
|
|
}*/
|
|
|
|
+
|
|
|
|
+ public static void main(String[] args) {
|
|
|
|
+ // {{first.DATA}}用户名:{{keyword1.DATA}} 活动主题:{{keyword2.DATA}} 活动时间:{{keyword3.DATA}} 活动地点:{{keyword4.DATA}} {{remark.DATA}}
|
|
|
|
+ String date = "{'first':{'color':'#173177','value':'biaosti'},'keyword1':{'color':'#173177','value':'biaosti'},'keyword2':{'color':'#173177','value':'biaosti'},'keyword3':{'color':'#173177','value':'biaosti'},'keyword4':{'color':'#173177','value':'biaosti'}, 'remark':{'color':'#1C86EE','value':'xx'}}";
|
|
|
|
+ String openId = "oZ9pv02WMRQgyDVRY1a_daYecwHI";
|
|
|
|
+ String appId = "wxdb090f0af89e0be3";// 应用ID
|
|
|
|
+ String appSecret = "518114a120274f625530750c1803921b";// 应用密钥
|
|
|
|
+
|
|
|
|
+ WeixinUtil.sendTemplateMessage(appId, appSecret, openId, "EAHie4LJAWr82FfNiClPCr9zA4OEiiqvB2wINfUaT_k", date, "https://s.iamberry.com/soodo/wechat/index.html");
|
|
|
|
+ System.out.println("发送成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+// public static void main(String[] args) {
|
|
|
|
+// String date = "{'first':{'color':'#173177', 'value':'尊敬的客户您好~您的订单已发货~'}, 'order_id':{'color':'#173177','value':'1009145345B11792L'}, 'package_id':{'color':'#173177','value':'yuantong:34234234'}, 'remark':{'color':'#173177', 'value':'点击进入商城查看-->>'}}";
|
|
|
|
+// String openId = "o-icas0dRzE7WYAEAmcX4BQCUyFo";
|
|
|
|
+// String appId = "wxd995fb95b97ece1b";// 应用ID
|
|
|
|
+// String appSecret = "34922854462fba23cf54ce859349fcf4";// 应用密钥
|
|
|
|
+//
|
|
|
|
+// WeixinUtil.sendTemplateMessage(appId, appSecret, openId, "744KA1PdB1I5PzRcjtxqbEz5t2bp8vdsi4I2ytW1rbE", date, "xx");
|
|
|
|
+// System.out.println("发送成功");
|
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 试用进度提醒推送
|
|
* 试用进度提醒推送
|
|
@@ -461,7 +486,7 @@ public class SendMessageUtil {
|
|
.replaceFirst("keyword4Value",keyword4)
|
|
.replaceFirst("keyword4Value",keyword4)
|
|
.replaceFirst("colorValue","#1C86EE")
|
|
.replaceFirst("colorValue","#1C86EE")
|
|
.replaceFirst("remarkValue",remark);
|
|
.replaceFirst("remarkValue",remark);
|
|
- sendTemplateMessageToOpenid(temp, openId, url,20);
|
|
|
|
|
|
+ sendTemplateMessageToOpenid(temp, openId, url,21);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -477,7 +502,7 @@ public class SendMessageUtil {
|
|
.replaceFirst("keyword2Value",keyword2)
|
|
.replaceFirst("keyword2Value",keyword2)
|
|
.replaceFirst("colorValue","#1C86EE")
|
|
.replaceFirst("colorValue","#1C86EE")
|
|
.replaceFirst("remarkValue",remark);
|
|
.replaceFirst("remarkValue",remark);
|
|
- sendTemplateMessageToOpenid(temp, openId, url,20);
|
|
|
|
|
|
+ sendTemplateMessageToOpenid(temp, openId, url,22);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|