Quellcode durchsuchen

关键词关注回复列表增加小程序联动

zqwang vor 1 Jahr
Ursprung
Commit
0beb64eb9f

+ 3 - 0
modules/WechatPlatform/Http/Controllers/WechatKeywordsController.php

@@ -30,6 +30,9 @@ class WechatKeywordsController extends CatchController
     public function List(Request $request)
     {
         $param  = $request->all();
+        if(!getProp($param,'miniprogram_id')){
+            WechatKeywordsService::throwErrMsg("参数错误");
+        }
         $userContext = $this->getUserContext(null);
         $param['user_id'] = $userContext['loginUser']->id;
         $param['puser_id'] = $userContext['loginUser']->pid;

+ 1 - 1
modules/WechatPlatform/Http/Controllers/WechatSubscribeController.php

@@ -33,7 +33,7 @@ class WechatSubscribeController extends CatchController
     public function list(Request $request)
     {
         $param  = $request->all();
-        if(!getProp('miniprogram_id')){
+        if(!getProp($param,'miniprogram_id')){
             WechatSubscribeService::throwErrMsg("参数错误");
         }
         $userContext = $this->getUserContext(null);

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

@@ -67,7 +67,7 @@ class WechatKeywordsService extends BaseService
         if (getProp($param, 'keyword')) {
             $sql->where('keyword', "like", "%" . $param['keyword'] . "%");
         }
-        if(getProp('miniprogram_id')){
+        if(getProp($param,'miniprogram_id')){
             $sql->where('miniprogram_id',  $param['miniprogram_id']);
         }
         if(getProp($param,'wechat_authorization_info_id')){

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

@@ -256,7 +256,7 @@ class WechatSubscribeService extends BaseService
         if (getProp($param, 'keyword')) {
             $sql->where('keyword', "like", "%" . $param['keyword'] . "%");
         }
-        if(getProp('miniprogram_id')){
+        if(getProp($param,'miniprogram_id')){
             $sql->where('miniprogram_id',  $param['miniprogram_id']);
         }
         if(getProp($param,'wechat_authorization_info_id')){