|
@@ -95,6 +95,9 @@ public class SendMessageUtil {
|
|
|
case 17: //17、退款申请通知
|
|
|
WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.refund_application_notice, date, url);
|
|
|
break;
|
|
|
+ case 18: //18、购买失败
|
|
|
+ WeixinUtil.sendTemplateMessage(NameUtils.getConfig("appId"), NameUtils.getConfig("appSecret"), openId, ResultInfo.refund_application_notice, date, url);
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -102,15 +105,21 @@ public class SendMessageUtil {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- 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");
|
|
|
+ /*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 = "{'name':{'color':'#173177','value':'上朵柔羽呵护刷头 (冰川蓝)'}, 'remark':{'color':'#173177','value':'您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)'}}";
|
|
|
+ String openId = "oZ9pv0_3_d3o7n7mye9R0WLZB8QA";
|
|
|
+ String appId = "wxdb090f0af89e0be3";// 应用ID
|
|
|
+ String appSecret = "518114a120274f625530750c1803921b";// 应用密钥
|
|
|
+
|
|
|
+ WeixinUtil.sendTemplateMessage(appId, appSecret, openId, "gnk9JaOkAaumN1qNUjxH5IHTjundAj_-O9_G531FpH4", date, "https://s.iamberry.com/soodo/wechat/index.html");
|
|
|
System.out.println("发送成功");
|
|
|
- }
|
|
|
+
|
|
|
+// SendMessageUtil sendMessageUtil = new SendMessageUtil();
|
|
|
+// sendMessageUtil.failedPurchase("上朵柔羽呵护刷头 (冰川蓝)",
|
|
|
+// "您在soodo上朵购买的刷头未填写收货地址,为了尽快为您发货,麻烦您提供一下您的收货地址。(请您尽快在公众号联系客服人员)","oZ9pv02WMRQgyDVRY1a_daYecwHI","https://s.iamberry.com/soodo/wechat/index.html");
|
|
|
+
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
* 试用进度提醒推送
|
|
@@ -374,4 +383,20 @@ public class SendMessageUtil {
|
|
|
.replaceFirst("remarkValue",remark);
|
|
|
sendTemplateMessageToOpenid(temp, openId, url,17);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 购买失败
|
|
|
+ * @param first
|
|
|
+ * @param remark
|
|
|
+ * @param openId
|
|
|
+ * @param url
|
|
|
+ */
|
|
|
+ public void failedPurchase(String first,String remark,String openId,String url){
|
|
|
+ String temp = ResultInfo.REFUNDAPPLICATIONNOTICE;
|
|
|
+ temp = temp.replaceFirst("nameValueIamberry", first)
|
|
|
+ .replaceFirst("colorValue","#1C86EE")
|
|
|
+ .replaceFirst("remarkValue",remark);
|
|
|
+ sendTemplateMessageToOpenid(temp, openId, url,18);
|
|
|
+ }
|
|
|
}
|