浏览代码

Merge branch 'wx-kw' into test

zqwang 1 年之前
父节点
当前提交
4f08f0cdc9

+ 1 - 1
modules/WechatPlatform/Services/WechatKeywordsService.php

@@ -137,7 +137,7 @@ class WechatKeywordsService extends BaseService
         $list = DB::table('wechat_authorization_infos')
             ->where('user_id', $userId)
             ->select('id', 'nick_name', 'is_enabled')->get();
-        $authList = WechatAccountKeywordLog::where('weacht_keyworld_id', $id)->get();
+        $authList = WechatAccountKeywordLog::where('weacht_keyworld_id', $id)->where('status' , 1)->distinct('appid')->get();
         if (!$list->isEmpty()) {
             foreach ($list as $val) {
                 $val->is_auth = 0;

+ 1 - 1
modules/WechatPlatform/Services/WechatMenuService.php

@@ -141,7 +141,7 @@ class WechatMenuService extends BaseService
         $list = DB::table('wechat_authorization_infos')
             ->where('user_id', $userId)
             ->select('id', 'nick_name', 'is_enabled')->get();
-        $authList = WechatAccountMenuDetail::where('menu_id', $id)->get();
+        $authList = WechatAccountMenuDetail::where('menu_id', $id)->where('status' , 1)->distinct('appid')->get();
         if (!$list->isEmpty()) {
             foreach ($list as $val) {
                 $val->is_auth = 0;

+ 1 - 1
modules/WechatPlatform/Services/WechatSubscribeService.php

@@ -208,7 +208,7 @@ class WechatSubscribeService extends BaseService
         $list = DB::table('wechat_authorization_infos')
             ->where('user_id', $userId)
             ->select('id', 'nick_name', 'is_enabled')->get();
-        $authList = WechatAccountSubscribeDetail::where('subscribe_id', $id)->get();
+        $authList = WechatAccountSubscribeDetail::where('subscribe_id', $id)->where('status' , 1)->distinct('appid')->get();
         if (!$list->isEmpty()) {
             foreach ($list as $val) {
                 $val->is_auth = 0;