|
@@ -535,18 +535,16 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
body.set("touser", order.getOpenid());
|
|
|
JSONObject content = new JSONObject();
|
|
|
if (type.equals("酒店预订成功通知")) {
|
|
|
- body.set("template_id", "Lh41ftWaZxG8mycje0XQLpylac30ftS4nAXM28iwi8I");
|
|
|
- content.set("thing4", new JSONObject().set("value", order.getName()));
|
|
|
- content.set("phone_number5", new JSONObject().set("value", order.getPhone()));
|
|
|
- content.set("time2", new JSONObject().set("value", order.getMin()));
|
|
|
+ body.set("template_id", "n8RXfziuC2B1UmBThhxNuo45QufO8xd5QepzghBfVJc");
|
|
|
+ content.set("thing1", new JSONObject().set("value", order.getShopName()));
|
|
|
+ content.set("thing4", new JSONObject().set("value", order.getAddres()));
|
|
|
+ content.set("date5", new JSONObject().set("value", order.getMin()));
|
|
|
}
|
|
|
if (type.equals("酒店预订失败通知")) {
|
|
|
- body.set("template_id", "iEMHyeeuqs-MFa1J4QgT7n0mfnOb-h93oc21b1O3pK8");
|
|
|
- content.set("thing2", new JSONObject().set("value", order.getMin().substring(5, 10) + "至" + order.getMax().substring(5, 10)));
|
|
|
- content.set("thing3", new JSONObject().set("value", order.getShopRoom().getTitle()));
|
|
|
- content.set("thing5", new JSONObject().set("value", order.getMsg()));
|
|
|
+ body.set("template_id", "-7bgeC4AoVA-GHLmVCVnPB6Ja_1Tru54qsYnQK4baOE");
|
|
|
+ content.set("thing5", new JSONObject().set("value", "预订" + order.getShopName() + order.getShopRoom().getTitle()));
|
|
|
+ content.set("thing6", new JSONObject().set("value", order.getMsg()));
|
|
|
}
|
|
|
- content.set("thing1", new JSONObject().set("value", order.getShopName()));
|
|
|
body.set("data", content);
|
|
|
String result = HttpUtil.post("https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + jsonObject.getStr("access_token"), body.toString());
|
|
|
System.out.println("订单信息:" + content.toString());
|