Browse Source

Merge remote-tracking branch 'origin/master'

Administrator 2 years ago
parent
commit
d0ced89bf0

+ 8 - 4
mhotel/src/com/happy/Model/weixin/WeiXinUtil.java

@@ -2,12 +2,16 @@ package com.happy.Model.weixin;
 
 public class WeiXinUtil {
 
-    // 创海公众号
-    public static String appid_c = "wx2fc3f45732fae5d3";
-    public static String screct_c = "7eee4a49a4470a77f9222995e8511547";
+    // 民宿小程序
+    public static String appid_c = "wxb064310cc85cf115";
+    public static String screct_c = "6f99b6724ad5714d3f253d524aa8d365";
+    // 民宿公众号
+    public static String appid_g = "wx3f20e656effd6400";
+    public static String screct_g = "5c30468b960221b1edf443030d20eebc";
+    // 民宿商户
     public static String APIid = "chuanghaikeji1612274012888888888";  // 商户密钥
     public static String key = "chuanghaikeji1612274012888888888"; // 商户密钥
-    public static String account = "1612274012";  // 商户号
+    public static String account = "1650403896";  // 商户号
 
     public static String ip = "172.16.20.88";
     public static String ip_h = "https://chtech.ncjti.edu.cn/hotelReservation/mhotel";

File diff suppressed because it is too large
+ 543 - 528
mhotel/src/com/happy/common/http/Message.java


+ 7 - 5
mhotel/src/com/happy/common/http/Message2.java

@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.happy.Model.Message.Mp_template_msg;
+import com.happy.Model.weixin.WeiXinUtil;
+
 import java.util.HashMap;
 
 /**
@@ -22,8 +24,8 @@ public class Message2 {
             throws Exception {
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("grant_type", "client_credential");
-        jsonObject.put("appid", "wx2fc3f45732fae5d3"); // 小程序
-        jsonObject.put("secret","7eee4a49a4470a77f9222995e8511547");
+        jsonObject.put("appid", WeiXinUtil.appid_c); // 小程序
+        jsonObject.put("secret",WeiXinUtil.screct_c);
         String msg3 = HttpsClient.sendJson2("https://api.weixin.qq.com/cgi-bin/stable_token",jsonObject);
         Gson gson = new Gson();
         HashMap<String, String> userMap = gson.fromJson(msg3.toString(), new TypeToken<HashMap<String, String>>() {}.getType());
@@ -32,11 +34,11 @@ public class Message2 {
         message.put("touser", openid);
 
         Mp_template_msg mp_template_msg = new Mp_template_msg();
-        mp_template_msg.setAppid("wxa46ef222053a1047");  // 公众号
-        mp_template_msg.setTemplate_id("2qQLkDrxBpMcao35jONQSo8GIY6wwzFna-LLU7Q7qRM");
+        mp_template_msg.setAppid(WeiXinUtil.appid_g);  // 公众号
+        mp_template_msg.setTemplate_id("pQLY-9pKW-lD-6PuOlxieatGmuCHOezubTxI99cs7Zo");
         mp_template_msg.setUrl("index");
         JSONObject jsonObject1 = new JSONObject();
-        jsonObject1.put("appid","wx2fc3f45732fae5d3");
+        jsonObject1.put("appid",WeiXinUtil.appid_c);
         jsonObject1.put("pagepath","/pages/orderDetail/orderDetail?id="+id);
         mp_template_msg.setMiniprogram(jsonObject1);
         // 订单号