合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !2175
正在显示
11 个修改的文件
包含
26 行增加
和
45 行删除
| @@ -9,37 +9,17 @@ | @@ -9,37 +9,17 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Console\Commands\LyhTest; | 10 | namespace App\Console\Commands\LyhTest; |
| 11 | 11 | ||
| 12 | -use App\Console\Commands\Domain\DomainInfo; | ||
| 13 | -use App\Helper\OaGlobalsoApi; | ||
| 14 | -use App\Http\Logic\Aside\Project\ProjectLogic; | ||
| 15 | use App\Models\Ai\AiBlog; | 12 | use App\Models\Ai\AiBlog; |
| 16 | -use App\Models\Ai\AiBlogAuthor; | ||
| 17 | -use App\Models\Ai\AiCommand; | ||
| 18 | -use App\Models\Com\NoticeLog; | ||
| 19 | -use App\Models\Com\V6WeeklyReport; | ||
| 20 | use App\Models\Product\Category; | 13 | use App\Models\Product\Category; |
| 21 | use App\Models\Project\AggregateKeywordAffix; | 14 | use App\Models\Project\AggregateKeywordAffix; |
| 22 | use App\Models\Project\AiBlogTask; | 15 | use App\Models\Project\AiBlogTask; |
| 23 | -use App\Models\Project\DeployBuild; | ||
| 24 | -use App\Models\Project\DeployOptimize; | ||
| 25 | -use App\Models\Project\OnlineCheck; | ||
| 26 | use App\Models\Project\Project; | 16 | use App\Models\Project\Project; |
| 27 | use App\Models\Project\ProjectAiSetting; | 17 | use App\Models\Project\ProjectAiSetting; |
| 28 | -use App\Models\ProjectAssociation\ProjectAssociation; | ||
| 29 | -use App\Models\RouteMap\RouteMap; | ||
| 30 | use App\Models\Template\BTemplateMain; | 18 | use App\Models\Template\BTemplateMain; |
| 31 | use App\Models\Template\TemplateTypeMain; | 19 | use App\Models\Template\TemplateTypeMain; |
| 32 | -use App\Models\Visit\Visit; | ||
| 33 | -use App\Models\WebSetting\TranslateBigProject; | ||
| 34 | -use App\Models\WebSetting\WebLanguage; | ||
| 35 | -use App\Models\WebSetting\WebSetting; | ||
| 36 | -use App\Models\Workchat\MessagePush; | ||
| 37 | use App\Services\AiBlogService; | 20 | use App\Services\AiBlogService; |
| 38 | -use App\Services\AiCommandService; | ||
| 39 | use App\Services\ProjectServer; | 21 | use App\Services\ProjectServer; |
| 40 | use Illuminate\Console\Command; | 22 | use Illuminate\Console\Command; |
| 41 | -use Illuminate\Support\Facades\Schema; | ||
| 42 | -use Illuminate\Support\Facades\Artisan; | ||
| 43 | use Illuminate\Support\Facades\DB; | 23 | use Illuminate\Support\Facades\DB; |
| 44 | 24 | ||
| 45 | class lyhDemo extends Command | 25 | class lyhDemo extends Command |
| @@ -59,21 +39,6 @@ class lyhDemo extends Command | @@ -59,21 +39,6 @@ class lyhDemo extends Command | ||
| 59 | protected $description = '更新路由'; | 39 | protected $description = '更新路由'; |
| 60 | 40 | ||
| 61 | public function handle(){ | 41 | public function handle(){ |
| 62 | - $aggregateKeywordAffixModel = new AggregateKeywordAffix(); | ||
| 63 | - $info = $aggregateKeywordAffixModel->read(['project_id'=>3298]); | ||
| 64 | - $projectModel = new Project(); | ||
| 65 | - $lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>2], 'id', ['id']); | ||
| 66 | - foreach ($lists as $item){ | ||
| 67 | - if(in_array($item['id'],[467,110,3298])){ | ||
| 68 | - continue; | ||
| 69 | - } | ||
| 70 | - $data = [ | ||
| 71 | - 'project_id'=>$item['id'], | ||
| 72 | - 'prefix'=>$info['prefix'], | ||
| 73 | - 'suffix'=>$info['suffix'] | ||
| 74 | - ]; | ||
| 75 | - $aggregateKeywordAffixModel->addReturnId($data); | ||
| 76 | - } | ||
| 77 | return true; | 42 | return true; |
| 78 | } | 43 | } |
| 79 | 44 |
| @@ -836,6 +836,13 @@ function ends_with($string, $suffix) | @@ -836,6 +836,13 @@ function ends_with($string, $suffix) | ||
| 836 | return substr($string, -strlen($suffix)) === $suffix; | 836 | return substr($string, -strlen($suffix)) === $suffix; |
| 837 | } | 837 | } |
| 838 | 838 | ||
| 839 | +/** | ||
| 840 | + * @remark :扩展模块分类路由 | ||
| 841 | + * @name :getCustomRouteMap | ||
| 842 | + * @author :lyh | ||
| 843 | + * @method :post | ||
| 844 | + * @time :2025/6/21 9:57 | ||
| 845 | + */ | ||
| 839 | function getCustomRouteMap($module_route,$route = '') | 846 | function getCustomRouteMap($module_route,$route = '') |
| 840 | { | 847 | { |
| 841 | if($module_route == $route){ | 848 | if($module_route == $route){ |
| @@ -202,7 +202,7 @@ class BlogCategoryLogic extends BaseLogic | @@ -202,7 +202,7 @@ class BlogCategoryLogic extends BaseLogic | ||
| 202 | RouteMap::delRoute(RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); | 202 | RouteMap::delRoute(RouteMap::SOURCE_BLOG_CATE, $id, $this->user['project_id']); |
| 203 | //生成一条删除路由记录 | 203 | //生成一条删除路由记录 |
| 204 | $info = $this->model->read(['id'=>$id],['id','alias']); | 204 | $info = $this->model->read(['id'=>$id],['id','alias']); |
| 205 | - $this->curlDelRoute(['old_route'=>$info['alias']]); | 205 | + $this->curlDelRoute(['old_route'=>$info['alias'],'source'=>RouteMap::SOURCE_BLOG_CATE]); |
| 206 | return $this->success(); | 206 | return $this->success(); |
| 207 | } | 207 | } |
| 208 | 208 |
| @@ -161,7 +161,7 @@ class BlogLogic extends BaseLogic | @@ -161,7 +161,7 @@ class BlogLogic extends BaseLogic | ||
| 161 | public function delRoute($id){ | 161 | public function delRoute($id){ |
| 162 | //生成一条删除路由记录 | 162 | //生成一条删除路由记录 |
| 163 | $info = $this->model->read(['id'=>$id],['id','url']); | 163 | $info = $this->model->read(['id'=>$id],['id','url']); |
| 164 | - $this->curlDelRoute(['old_route'=>$info['url']]); | 164 | + $this->curlDelRoute(['old_route'=>$info['url'],'source'=>RouteMap::SOURCE_BLOG]); |
| 165 | return $this->success(); | 165 | return $this->success(); |
| 166 | } | 166 | } |
| 167 | 167 |
| @@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\CustomModule; | @@ -11,6 +11,7 @@ namespace App\Http\Logic\Bside\CustomModule; | ||
| 11 | 11 | ||
| 12 | use App\Http\Logic\Bside\BaseLogic; | 12 | use App\Http\Logic\Bside\BaseLogic; |
| 13 | use App\Models\Com\NoticeLog; | 13 | use App\Models\Com\NoticeLog; |
| 14 | +use App\Models\CustomModule\CustomModule; | ||
| 14 | use App\Models\CustomModule\CustomModuleCategory; | 15 | use App\Models\CustomModule\CustomModuleCategory; |
| 15 | use App\Models\RouteMap\RouteMap; | 16 | use App\Models\RouteMap\RouteMap; |
| 16 | use App\Models\Template\BTemplate; | 17 | use App\Models\Template\BTemplate; |
| @@ -221,7 +222,10 @@ class CustomModuleCategoryLogic extends BaseLogic | @@ -221,7 +222,10 @@ class CustomModuleCategoryLogic extends BaseLogic | ||
| 221 | } | 222 | } |
| 222 | RouteMap::delRoute(RouteMap::SOURCE_MODULE_CATE, $id, $this->user['project_id']); | 223 | RouteMap::delRoute(RouteMap::SOURCE_MODULE_CATE, $id, $this->user['project_id']); |
| 223 | //通知 | 224 | //通知 |
| 224 | - $this->curlDelRoute(['old_route'=>$info['route']]); | 225 | + //获取模块路由 |
| 226 | + $customModuleModel = new CustomModule(); | ||
| 227 | + $moduleInfo = $customModuleModel->read(['id'=>$info['module_id']]); | ||
| 228 | + $this->curlDelRoute(['old_route'=>$info['route'],'path'=>getCustomRouteMap($moduleInfo['route'],$info['route'])]); | ||
| 225 | return $this->success(); | 229 | return $this->success(); |
| 226 | } | 230 | } |
| 227 | 231 |
| @@ -355,8 +355,13 @@ class CustomModuleContentLogic extends BaseLogic | @@ -355,8 +355,13 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 355 | { | 355 | { |
| 356 | RouteMap::delRoute(RouteMap::SOURCE_MODULE, $id, $this->user['project_id']); | 356 | RouteMap::delRoute(RouteMap::SOURCE_MODULE, $id, $this->user['project_id']); |
| 357 | //通知 | 357 | //通知 |
| 358 | - $info = $this->model->read(['id' => $id], ['id', 'route']); | ||
| 359 | - $this->curlDelRoute(['old_route'=>$info['route']]); | 358 | + $info = $this->model->read(['id' => $id], ['id', 'route','category_id']); |
| 359 | + $categoryIdArr = $info['category_id']; | ||
| 360 | + $cate_id = (int)array_shift($categoryIdArr); | ||
| 361 | + $routeMapModel = new RouteMap(); | ||
| 362 | + $routeInfo = $routeMapModel->read(['source'=>RouteMap::SOURCE_MODULE_CATE,'source_id'=>$cate_id]); | ||
| 363 | + $path = ($routeInfo['route'] ?? ''); | ||
| 364 | + $this->curlDelRoute(['old_route'=>$info['route'],'path'=>$path]); | ||
| 360 | return $this->success(); | 365 | return $this->success(); |
| 361 | } | 366 | } |
| 362 | 367 |
| @@ -216,7 +216,7 @@ class NewsCategoryLogic extends BaseLogic | @@ -216,7 +216,7 @@ class NewsCategoryLogic extends BaseLogic | ||
| 216 | //删除路由映射 | 216 | //删除路由映射 |
| 217 | RouteMap::delRoute(RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']); | 217 | RouteMap::delRoute(RouteMap::SOURCE_NEWS_CATE, $id, $this->user['project_id']); |
| 218 | $info = $this->model->read(['id'=>$id],['id','alias']); | 218 | $info = $this->model->read(['id'=>$id],['id','alias']); |
| 219 | - $this->curlDelRoute(['old_route'=>$info['alias']]); | 219 | + $this->curlDelRoute(['old_route'=>$info['alias'],'source'=>RouteMap::SOURCE_NEWS_CATE]); |
| 220 | return $this->success(); | 220 | return $this->success(); |
| 221 | } | 221 | } |
| 222 | 222 |
| @@ -357,7 +357,7 @@ class NewsLogic extends BaseLogic | @@ -357,7 +357,7 @@ class NewsLogic extends BaseLogic | ||
| 357 | { | 357 | { |
| 358 | //生成一条删除路由记录 | 358 | //生成一条删除路由记录 |
| 359 | $info = $this->model->read(['id' => $id], ['id', 'url']); | 359 | $info = $this->model->read(['id' => $id], ['id', 'url']); |
| 360 | - $this->curlDelRoute(['old_route'=>$info['url']]); | 360 | + $this->curlDelRoute(['old_route'=>$info['url'],'source'=>RouteMap::SOURCE_NEWS]); |
| 361 | return $this->success(); | 361 | return $this->success(); |
| 362 | } | 362 | } |
| 363 | 363 |
| @@ -199,7 +199,7 @@ class CategoryLogic extends BaseLogic | @@ -199,7 +199,7 @@ class CategoryLogic extends BaseLogic | ||
| 199 | //生成一条删除路由记录 | 199 | //生成一条删除路由记录 |
| 200 | $info = $this->model->read(['id'=>$id],['id','route']); | 200 | $info = $this->model->read(['id'=>$id],['id','route']); |
| 201 | if($info !== false){ | 201 | if($info !== false){ |
| 202 | - $this->curlDelRoute(['old_route'=>$info['route']]); | 202 | + $this->curlDelRoute(['old_route'=>$info['route'],'source'=>RouteMap::SOURCE_PRODUCT_CATE]); |
| 203 | } | 203 | } |
| 204 | return $this->success(); | 204 | return $this->success(); |
| 205 | } | 205 | } |
| @@ -188,7 +188,7 @@ class KeywordLogic extends BaseLogic | @@ -188,7 +188,7 @@ class KeywordLogic extends BaseLogic | ||
| 188 | //生成一条删除路由记录 | 188 | //生成一条删除路由记录 |
| 189 | $info = $this->model->read(['id'=>$id],['id','route']); | 189 | $info = $this->model->read(['id'=>$id],['id','route']); |
| 190 | if($info !== false){ | 190 | if($info !== false){ |
| 191 | - $this->curlDelRoute(['old_route'=>$info['route']]); | 191 | + $this->curlDelRoute(['old_route'=>$info['route'],'source'=>RouteMap::SOURCE_PRODUCT_KEYWORD]); |
| 192 | } | 192 | } |
| 193 | return $this->success(); | 193 | return $this->success(); |
| 194 | } | 194 | } |
| @@ -472,7 +472,7 @@ class ProductLogic extends BaseLogic | @@ -472,7 +472,7 @@ class ProductLogic extends BaseLogic | ||
| 472 | public function delRoute($id){ | 472 | public function delRoute($id){ |
| 473 | //生成一条删除路由记录 | 473 | //生成一条删除路由记录 |
| 474 | $info = $this->model->read(['id'=>$id],['id','route']); | 474 | $info = $this->model->read(['id'=>$id],['id','route']); |
| 475 | - $this->curlDelRoute(['old_route'=>$info['route']]); | 475 | + $this->curlDelRoute(['old_route'=>$info['route'],'source'=>RouteMap::SOURCE_PRODUCT]); |
| 476 | return $this->success(); | 476 | return $this->success(); |
| 477 | } | 477 | } |
| 478 | 478 |
-
请 注册 或 登录 后发表评论