From 4b7249bec0661176f3aed3213889dafe4a10a9c3 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Tue, 11 Jul 2023 16:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E5=B9=B6=E7=BB=91=E5=AE=9A=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E4=B9=8B=E5=90=8E=EF=BC=8CApp=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E8=BF=98=E9=9C=80=E8=A6=81=E7=BB=91=E5=AE=9A=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/SystemRouteServices.php | 7 +++++-- crmeb/app/services/wechat/WechatServices.php | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crmeb/app/services/system/SystemRouteServices.php b/crmeb/app/services/system/SystemRouteServices.php index 2a3ce1cb0..a6851ea21 100644 --- a/crmeb/app/services/system/SystemRouteServices.php +++ b/crmeb/app/services/system/SystemRouteServices.php @@ -84,7 +84,7 @@ class SystemRouteServices extends BaseServices */ public function getTreeList(string $appName = 'adminapi', string $name = '') { -// return $this->cacheDriver()->remember('ROUTE_LIST' . strtoupper($appName), function () use ($name, $appName) { + return $this->cacheDriver()->remember('ROUTE_LIST' . strtoupper($appName), function () use ($name, $appName) { $list = app()->make(SystemRouteCateServices::class) ->selectList(['app_name' => $appName], '*', 0, 0, 'id asc,sort desc', [ 'children' => function ($query) use ($name, $appName) { @@ -110,7 +110,7 @@ class SystemRouteServices extends BaseServices } } return get_tree_children($list); -// }, 600); + }, 600); } /** @@ -201,6 +201,9 @@ class SystemRouteServices extends BaseServices { $oneId = app()->make(SystemRouteCateServices::class)->value(['app_name' => $app, 'name' => $cateName, 'pid' => 0], 'id'); if (!$oneId) { + //修复重复同步后反复增加二级文件夹 + $id = app()->make(SystemRouteCateServices::class)->value(['app_name' => $app, 'name' => $cateName, 'pid' => $pid], 'id'); + if ($id) return $id; $res = app()->make(SystemRouteCateServices::class)->save([ 'app_name' => $app, 'name' => $cateName, diff --git a/crmeb/app/services/wechat/WechatServices.php b/crmeb/app/services/wechat/WechatServices.php index a1f83786d..e79af86dc 100644 --- a/crmeb/app/services/wechat/WechatServices.php +++ b/crmeb/app/services/wechat/WechatServices.php @@ -395,8 +395,7 @@ class WechatServices extends BaseServices if (!$uid && !$res) { return false; } - } - if ($openid && $storeUserMobile) { + } elseif ($openid && $storeUserMobile) { /** @var UserServices $userServices */ $userServices = app()->make(UserServices::class); $uid = $this->dao->value(['openid' => $openid], 'uid');