Explorar el Código

Merge branch 'wx-kw' into feature-wechat

zqwang hace 1 año
padre
commit
cf6be0f764

+ 4 - 3
composer.json

@@ -16,13 +16,13 @@
         "guzzlehttp/guzzle": "^7.2",
         "laravel/framework": "^10.0",
         "laravel/tinker": "^2.8",
+        "overtrue/wechat": "~5.0",
         "phpmailer/phpmailer": "^6.8",
         "phpoffice/phpexcel": "^1.8",
         "phpoffice/phpspreadsheet": "^1.28",
         "predis/predis": "^2.1",
         "qiniu/php-sdk": "^7.4",
-        "vinkla/hashids": "*",
-        "w7corp/easywechat": "^6.12"
+        "vinkla/hashids": "*"
     },
     "require-dev": {
         "fakerphp/faker": "^1.9.1",
@@ -73,7 +73,8 @@
         "preferred-install": "dist",
         "sort-packages": true,
         "allow-plugins": {
-            "pestphp/pest-plugin": true
+            "pestphp/pest-plugin": true,
+            "easywechat-composer/easywechat-composer": true
         }
     },
     "minimum-stability": "dev",

+ 1 - 1
modules/Common/Services/BaseService.php

@@ -29,7 +29,7 @@ class BaseService
         ];
     }
 
-    protected static function throwErrMsg($msg, $code = "")
+    public static function throwErrMsg($msg, $code = "")
     {
         if ($code) {
             throw  new FailedException($msg, $code);

+ 1 - 1
modules/Video/Http/Controllers/EpisodeController.php

@@ -32,7 +32,7 @@ class EpisodeController extends CatchController
                 'is_enabled' => 1
             ])->select('series_name', 'series_sequence', 'video_key', 'duration', 'id', 'video_id');
         if ($isFee == 1){
-            $videoSeries-where('series_sequence',"<",$video->charge_sequence);
+            $videoSeries->where('series_sequence',"<",$video->charge_sequence);
         }
         $videoSeries->orderBy('series_sequence', 'asc')
             ->paginate($request->integer('limit', 15));

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

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

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

+ 3 - 0
modules/WechatPlatform/Services/WechatKeywordsService.php

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

+ 3 - 0
modules/WechatPlatform/Services/WechatSubscribeService.php

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