瀏覽代碼

no message

FengChaoYu 4 周之前
父節點
當前提交
45754a1796
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      src/main/java/com/gree/mall/miniapp/logic/common/CommonLogic.java

+ 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;