正在显示
4 个修改的文件
包含
0 行增加
和
39 行删除
| @@ -4,13 +4,10 @@ namespace App\Http\Controllers\Bside\News; | @@ -4,13 +4,10 @@ namespace App\Http\Controllers\Bside\News; | ||
| 4 | 4 | ||
| 5 | use App\Enums\Common\Code; | 5 | use App\Enums\Common\Code; |
| 6 | use App\Http\Controllers\Bside\BaseController; | 6 | use App\Http\Controllers\Bside\BaseController; |
| 7 | -use App\Http\Logic\Bside\News\NewsCategoryLogic; | ||
| 8 | use App\Http\Logic\Bside\News\NewsLogic; | 7 | use App\Http\Logic\Bside\News\NewsLogic; |
| 9 | use App\Http\Requests\Bside\News\NewsRequest; | 8 | use App\Http\Requests\Bside\News\NewsRequest; |
| 10 | -use App\Models\Com\AssociationCate; | ||
| 11 | use App\Models\News\News as NewsModel; | 9 | use App\Models\News\News as NewsModel; |
| 12 | use App\Models\News\NewsCategory; | 10 | use App\Models\News\NewsCategory; |
| 13 | -use App\Models\RouteMap\RouteMap; | ||
| 14 | use App\Models\User\User; | 11 | use App\Models\User\User; |
| 15 | 12 | ||
| 16 | 13 |
| @@ -2,12 +2,9 @@ | @@ -2,12 +2,9 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Http\Logic\Bside\Blog; | 3 | namespace App\Http\Logic\Bside\Blog; |
| 4 | 4 | ||
| 5 | -use App\Enums\Common\Code; | ||
| 6 | -use App\Helper\Common; | ||
| 7 | use App\Http\Logic\Bside\BaseLogic; | 5 | use App\Http\Logic\Bside\BaseLogic; |
| 8 | use App\Models\Blog\Blog; | 6 | use App\Models\Blog\Blog; |
| 9 | use App\Models\Blog\BlogCategory as BlogCategoryModel; | 7 | use App\Models\Blog\BlogCategory as BlogCategoryModel; |
| 10 | -use App\Models\Com\AssociationCate; | ||
| 11 | use App\Models\RouteMap\RouteMap; | 8 | use App\Models\RouteMap\RouteMap; |
| 12 | use App\Services\CosService; | 9 | use App\Services\CosService; |
| 13 | use Illuminate\Support\Facades\DB; | 10 | use Illuminate\Support\Facades\DB; |
| @@ -136,11 +133,9 @@ class BlogLogic extends BaseLogic | @@ -136,11 +133,9 @@ class BlogLogic extends BaseLogic | ||
| 136 | public function blogDel(){ | 133 | public function blogDel(){ |
| 137 | DB::beginTransaction(); | 134 | DB::beginTransaction(); |
| 138 | try { | 135 | try { |
| 139 | - $assCate = new AssociationCate(); | ||
| 140 | foreach ($this->param['id'] as $id){ | 136 | foreach ($this->param['id'] as $id){ |
| 141 | $this->delRoute($id); | 137 | $this->delRoute($id); |
| 142 | $this->model->del(['id'=>$id]); | 138 | $this->model->del(['id'=>$id]); |
| 143 | - $assCate->del(['type_id'=>$id,'type'=>$assCate::BLOG_CATE]); | ||
| 144 | } | 139 | } |
| 145 | DB::commit(); | 140 | DB::commit(); |
| 146 | }catch (Exception $e){ | 141 | }catch (Exception $e){ |
| @@ -3,9 +3,7 @@ | @@ -3,9 +3,7 @@ | ||
| 3 | namespace App\Http\Logic\Bside\News; | 3 | namespace App\Http\Logic\Bside\News; |
| 4 | 4 | ||
| 5 | use App\Enums\Common\Code; | 5 | use App\Enums\Common\Code; |
| 6 | -use App\Helper\Common; | ||
| 7 | use App\Http\Logic\Bside\BaseLogic; | 6 | use App\Http\Logic\Bside\BaseLogic; |
| 8 | -use App\Models\Com\AssociationCate; | ||
| 9 | use App\Models\News\News; | 7 | use App\Models\News\News; |
| 10 | use App\Models\News\NewsCategory; | 8 | use App\Models\News\NewsCategory; |
| 11 | use App\Models\News\NewsCategory as NewsCategoryModel; | 9 | use App\Models\News\NewsCategory as NewsCategoryModel; |
app/Models/Com/AssociationCate.php
已删除
100644 → 0
| 1 | -<?php | ||
| 2 | -/** | ||
| 3 | - * @remark : | ||
| 4 | - * @name :AssociationCate.php | ||
| 5 | - * @author :lyh | ||
| 6 | - * @method :post | ||
| 7 | - * @time :2023/10/18 15:47 | ||
| 8 | - */ | ||
| 9 | - | ||
| 10 | -namespace App\Models\Com; | ||
| 11 | - | ||
| 12 | -use App\Models\Base; | ||
| 13 | - | ||
| 14 | -/** | ||
| 15 | - * @remark :分类关联表 | ||
| 16 | - * @name :AssociationCate | ||
| 17 | - * @author :lyh | ||
| 18 | - * @method :post | ||
| 19 | - * @time :2023/10/18 15:48 | ||
| 20 | - */ | ||
| 21 | -class AssociationCate extends Base | ||
| 22 | -{ | ||
| 23 | - const BLOG_CATE = 1;//博客 | ||
| 24 | - const NEWS_CATE = 2;//博客 | ||
| 25 | - | ||
| 26 | - protected $table = 'gl_association_cate'; | ||
| 27 | - //连接数据库 | ||
| 28 | - protected $connection = 'custom_mysql'; | ||
| 29 | -} |
-
请 注册 或 登录 后发表评论