FengChaoYu 4 minggu lalu
induk
melakukan
45754a1796

+ 11 - 0
src/main/java/com/gree/mall/miniapp/logic/common/CommonLogic.java

@@ -56,6 +56,12 @@ public class CommonLogic {
     GoodsService goodsService;
     @Value("${spring.profiles.active}")
     private String profiles;
+    @Value("${wechat.appid}")
+    private String wechatAppid;
+    @Value("${wechat.sub.appid}")
+    private String wechatSubAppid;
+    @Value("${wechat.sub.secret}")
+    private String wechatSubSecret;
 
 
     //高德的webkey
@@ -96,6 +102,11 @@ public class CommonLogic {
 //        BeanUtils.copyProperties(adminCompanyWechat,currentCompanyWechat);
         currentCompanyWechat.setCurrentCompanyWechatId("0");
         currentCompanyWechat.setCurrentCompanyName("平台");
+        currentCompanyWechat.setAppId(wechatAppid);
+        currentCompanyWechat.setMchId(null);
+        currentCompanyWechat.setMchKey(null);
+        currentCompanyWechat.setSubAppId(wechatSubAppid);
+        currentCompanyWechat.setSubSecret(wechatSubSecret);
         currentCompanyWechat.setUserId(CommonUtils.getUserId(request));
         currentCompanyWechat.setUser(user);
         return currentCompanyWechat;