作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -129,25 +129,23 @@ class OnlineController extends BaseController @@ -129,25 +129,23 @@ class OnlineController extends BaseController
129 * @time :2023/8/18 10:58 129 * @time :2023/8/18 10:58
130 */ 130 */
131 public function searchParam(&$query){ 131 public function searchParam(&$query){
  132 + if(isset($this->map['id'])){
  133 + $query->where('gl_project.id',$this->map['id']);
  134 + }
132 if(!empty($this->map['message']) && !empty($this->map['type'])){ 135 if(!empty($this->map['message']) && !empty($this->map['type'])){
133 - // 搜索域名  
134 if($this->map['type'] == 'test_domain'){ 136 if($this->map['type'] == 'test_domain'){
135 $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['message'].'%'); 137 $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['message'].'%');
136 } else { 138 } else {
137 - // 搜索名称  
138 $query->where('gl_project.title', 'like', '%' . $this->map['message'] . '%'); 139 $query->where('gl_project.title', 'like', '%' . $this->map['message'] . '%');
139 } 140 }
140 } 141 }
141 if(isset($this->map['qa_status'])){ 142 if(isset($this->map['qa_status'])){
142 - // 搜索状态  
143 $query->where('gl_project_online_check.qa_status',$this->map['qa_status']); 143 $query->where('gl_project_online_check.qa_status',$this->map['qa_status']);
144 } 144 }
145 if(isset($this->map['all_status'])){ 145 if(isset($this->map['all_status'])){
146 - // 搜索状态  
147 $query->where('gl_project_online_check.qa_status',$this->map['all_status']); 146 $query->where('gl_project_online_check.qa_status',$this->map['all_status']);
148 } 147 }
149 if(isset($this->map['optimist_status'])){ 148 if(isset($this->map['optimist_status'])){
150 - // 搜索状态  
151 $query->where('gl_project_online_check.optimist_status',$this->map['optimist_status']); 149 $query->where('gl_project_online_check.optimist_status',$this->map['optimist_status']);
152 } 150 }
153 $query = $query->where('gl_project.status',1);//TODO::已提交审核 151 $query = $query->where('gl_project.status',1);//TODO::已提交审核
@@ -24,7 +24,7 @@ class BlogController extends BaseController @@ -24,7 +24,7 @@ class BlogController extends BaseController
24 * @time :2023/9/14 10:45 24 * @time :2023/9/14 10:45
25 */ 25 */
26 public function lists(BlogModel $blogModel){ 26 public function lists(BlogModel $blogModel){
27 - $filed = ['id','category_id','operator_id','status','created_at','label_id','image','updated_at','name','sort','url','release_at','is_upgrade']; 27 + $filed = ['id','category_id','operator_id','status','created_at','label_id','image','updated_at','name','sort','url','release_at','is_upgrade','six_read'];
28 $this->order = 'sort'; 28 $this->order = 'sort';
29 $query = $blogModel->orderBy($this->order ,'desc')->orderBy('id','desc'); 29 $query = $blogModel->orderBy($this->order ,'desc')->orderBy('id','desc');
30 $query = $this->searchParam($query); 30 $query = $this->searchParam($query);
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 9
10 namespace App\Http\Controllers\Bside\CustomModule; 10 namespace App\Http\Controllers\Bside\CustomModule;
11 11
  12 +use App\Enums\Common\Code;
12 use App\Http\Controllers\Bside\BaseController; 13 use App\Http\Controllers\Bside\BaseController;
13 use App\Http\Logic\Bside\CustomModule\CustomModuleCategoryLogic; 14 use App\Http\Logic\Bside\CustomModule\CustomModuleCategoryLogic;
14 use App\Models\CustomModule\CustomModuleCategory; 15 use App\Models\CustomModule\CustomModuleCategory;
@@ -16,7 +17,7 @@ use App\Models\CustomModule\CustomModuleCategory; @@ -16,7 +17,7 @@ use App\Models\CustomModule\CustomModuleCategory;
16 class CustomModuleCategoryController extends BaseController 17 class CustomModuleCategoryController extends BaseController
17 { 18 {
18 /** 19 /**
19 - * @remark :获取自定义模块列表 20 + * @remark :获取自定义模块分类列表
20 * @name :ModuleList 21 * @name :ModuleList
21 * @author :lyh 22 * @author :lyh
22 * @method :post 23 * @method :post
@@ -29,8 +30,35 @@ class CustomModuleCategoryController extends BaseController @@ -29,8 +30,35 @@ class CustomModuleCategoryController extends BaseController
29 'module_id.required' => 'module_id不能为空', 30 'module_id.required' => 'module_id不能为空',
30 ]); 31 ]);
31 $this->map['project_id'] = $this->user['project_id']; 32 $this->map['project_id'] = $this->user['project_id'];
32 - $lists = $customModuleCategory->lists($this->map,$this->page,$this->row,$this->order);  
33 - $this->response('success',Code::SUCCESS,$lists); 33 + $this->map['status'] = 0;
  34 + $list = $customModuleCategory->list($this->map);
  35 + if(!empty($list)){
  36 + foreach ($list as $k => $v){
  37 + $v['url'] = $this->user['domain'].$v['route'];
  38 + $list[$k] = $v;
  39 + }
  40 + }
  41 + $data = $this->getListSon($list);
  42 + $this->response('success',Code::SUCCESS,$data);
  43 + }
  44 +
  45 + /**
  46 + * @remark :无分页子集处理
  47 + * @name :getListSon
  48 + * @author :lyh
  49 + * @method :post
  50 + * @time :2023/8/17 11:12
  51 + */
  52 + public function getListSon($list){
  53 + $data = array();
  54 + foreach ($list as $v){
  55 + $v = (array)$v;
  56 + if ($v['pid'] == 0) {
  57 + $v['sub'] = _get_child($v['id'], $list);
  58 + $data[] = $v;
  59 + }
  60 + }
  61 + return $data;
34 } 62 }
35 63
36 /** 64 /**
@@ -73,11 +101,13 @@ class CustomModuleCategoryController extends BaseController @@ -73,11 +101,13 @@ class CustomModuleCategoryController extends BaseController
73 $this->request->validate([ 101 $this->request->validate([
74 'name'=>['required'], 102 'name'=>['required'],
75 'route'=>['required'], 103 'route'=>['required'],
76 - 'module_id'=>['required'] 104 + 'module_id'=>['required'],
  105 + 'pid'=>['required']
77 ],[ 106 ],[
78 'name.required' => '分类名称不能为空', 107 'name.required' => '分类名称不能为空',
79 'route.required' => '分类路由不能为空', 108 'route.required' => '分类路由不能为空',
80 - 'module_id.required' => '所选模块id不能为空' 109 + 'module_id.required' => '所选模块id不能为空',
  110 + 'pid.required' => '上级不能为空'
81 ]); 111 ]);
82 $logic->categorySave(); 112 $logic->categorySave();
83 $this->response('success'); 113 $this->response('success');
@@ -11,6 +11,7 @@ namespace App\Http\Controllers\Bside\CustomModule; @@ -11,6 +11,7 @@ namespace App\Http\Controllers\Bside\CustomModule;
11 11
12 use App\Http\Controllers\Bside\BaseController; 12 use App\Http\Controllers\Bside\BaseController;
13 use App\Http\Logic\Bside\CustomModule\CustomModuleContentLogic; 13 use App\Http\Logic\Bside\CustomModule\CustomModuleContentLogic;
  14 +use App\Models\CustomModule\CustomModuleCategory;
14 use App\Models\CustomModule\CustomModuleContent; 15 use App\Models\CustomModule\CustomModuleContent;
15 16
16 class CustomModuleContentController extends BaseController 17 class CustomModuleContentController extends BaseController
@@ -34,6 +35,19 @@ class CustomModuleContentController extends BaseController @@ -34,6 +35,19 @@ class CustomModuleContentController extends BaseController
34 } 35 }
35 36
36 /** 37 /**
  38 + * @remark :添加/编辑内容时获取分类
  39 + * @name :getCategoryList
  40 + * @author :lyh
  41 + * @method :post
  42 + * @time :2023/12/7 15:19
  43 + */
  44 + public function getCategoryList(){
  45 + $categoryModel = new CustomModuleCategory();
  46 + $list = $categoryModel->list(['project_id'=>$this->user['project_id'],'module_id'=>$this->param['module_id']],['id','name']);
  47 + $this->response('success',Code::SUCCESS,$list);
  48 + }
  49 +
  50 + /**
37 * @remark :获取当前数据详情 51 * @remark :获取当前数据详情
38 * @name :info 52 * @name :info
39 * @author :lyh 53 * @author :lyh
@@ -46,7 +60,7 @@ class CustomModuleContentController extends BaseController @@ -46,7 +60,7 @@ class CustomModuleContentController extends BaseController
46 ],[ 60 ],[
47 'id.required' => 'ID不能为空', 61 'id.required' => 'ID不能为空',
48 ]); 62 ]);
49 - $info = $logic->getCustomModuleContentInfo(); 63 + $info = $logic->getContentInfo();
50 $this->response('success',Code::SUCCESS,$info); 64 $this->response('success',Code::SUCCESS,$info);
51 } 65 }
52 66
@@ -67,7 +81,7 @@ class CustomModuleContentController extends BaseController @@ -67,7 +81,7 @@ class CustomModuleContentController extends BaseController
67 'route.required' => '分类路由不能为空', 81 'route.required' => '分类路由不能为空',
68 'module_id.required' => '所选模块id不能为空' 82 'module_id.required' => '所选模块id不能为空'
69 ]); 83 ]);
70 - $logic->customModuleContentSave(); 84 + $logic->contentSave();
71 $this->response('success'); 85 $this->response('success');
72 } 86 }
73 87
@@ -84,7 +98,7 @@ class CustomModuleContentController extends BaseController @@ -84,7 +98,7 @@ class CustomModuleContentController extends BaseController
84 ],[ 98 ],[
85 'id.required' => 'ID不能为空', 99 'id.required' => 'ID不能为空',
86 ]); 100 ]);
87 - $logic->customModuleContentDel(); 101 + $logic->contentDel();
88 $this->response('success'); 102 $this->response('success');
89 } 103 }
90 } 104 }
@@ -32,6 +32,7 @@ class CustomModuleController extends BaseController @@ -32,6 +32,7 @@ class CustomModuleController extends BaseController
32 */ 32 */
33 public function lists(CustomModule $customModule){ 33 public function lists(CustomModule $customModule){
34 $this->map['project_id'] = $this->user['project_id']; 34 $this->map['project_id'] = $this->user['project_id'];
  35 + $this->map['status'] = 0;
35 $lists = $customModule->lists($this->map,$this->page,$this->row,$this->order); 36 $lists = $customModule->lists($this->map,$this->page,$this->row,$this->order);
36 $this->response('success',Code::SUCCESS,$lists); 37 $this->response('success',Code::SUCCESS,$lists);
37 } 38 }
@@ -22,9 +22,15 @@ class CustomModuleExtentController extends BaseController @@ -22,9 +22,15 @@ class CustomModuleExtentController extends BaseController
22 * @method :post 22 * @method :post
23 * @time :2023/12/4 15:43 23 * @time :2023/12/4 15:43
24 */ 24 */
25 - public function list(CustomModuleExtend $customModuleExtend){ 25 + public function lists(CustomModuleExtend $customModuleExtend){
  26 + $this->request->validate([
  27 + 'module_id'=>['required'],
  28 + ],[
  29 + 'module_id.required' => 'module_id不能为空',
  30 + ]);
26 $this->map['project_id'] = $this->user['project_id']; 31 $this->map['project_id'] = $this->user['project_id'];
27 - $lists = $customModuleExtend->lists($this->map,$this->page,$this->row,$this->order); 32 + $filed = ['id','title','status','type','operator_id','project_id','module_id','created_at','updated_at'];
  33 + $lists = $customModuleExtend->lists($this->map,$this->page,$this->row,$this->order,$filed);
28 $this->response('success',Code::SUCCESS,$lists); 34 $this->response('success',Code::SUCCESS,$lists);
29 } 35 }
30 36
@@ -41,7 +47,7 @@ class CustomModuleExtentController extends BaseController @@ -41,7 +47,7 @@ class CustomModuleExtentController extends BaseController
41 ],[ 47 ],[
42 'id.required' => 'ID不能为空', 48 'id.required' => 'ID不能为空',
43 ]); 49 ]);
44 - $info = $logic->getCustomModuleExtendInfo(); 50 + $info = $logic->getExtendInfo();
45 $this->response('success',Code::SUCCESS,$info); 51 $this->response('success',Code::SUCCESS,$info);
46 } 52 }
47 53
@@ -53,7 +59,7 @@ class CustomModuleExtentController extends BaseController @@ -53,7 +59,7 @@ class CustomModuleExtentController extends BaseController
53 * @time :2023/12/4 15:45 59 * @time :2023/12/4 15:45
54 */ 60 */
55 public function save(CustomModuleExtendLogic $logic){ 61 public function save(CustomModuleExtendLogic $logic){
56 - $logic->customModuleExtendSave(); 62 + $logic->extendSave();
57 $this->response('success'); 63 $this->response('success');
58 } 64 }
59 65
@@ -70,7 +76,7 @@ class CustomModuleExtentController extends BaseController @@ -70,7 +76,7 @@ class CustomModuleExtentController extends BaseController
70 ],[ 76 ],[
71 'id.required' => 'ID不能为空', 77 'id.required' => 'ID不能为空',
72 ]); 78 ]);
73 - $logic->customModuleExtendDel(); 79 + $logic->extendDel();
74 $this->response('success'); 80 $this->response('success');
75 } 81 }
76 } 82 }
@@ -24,7 +24,7 @@ class NewsController extends BaseController @@ -24,7 +24,7 @@ class NewsController extends BaseController
24 * @method 24 * @method
25 */ 25 */
26 public function lists(NewsModel $news){ 26 public function lists(NewsModel $news){
27 - $filed = ['id','category_id','operator_id','status','created_at','image','updated_at','name','sort','url', 'release_at','is_upgrade']; 27 + $filed = ['id','category_id','operator_id','status','created_at','image','updated_at','name','sort','url', 'release_at','is_upgrade','six_read'];
28 $this->order = 'sort'; 28 $this->order = 'sort';
29 $query = $news->orderBy($this->order ,'desc')->orderBy('id','desc'); 29 $query = $news->orderBy($this->order ,'desc')->orderBy('id','desc');
30 $query = $this->searchParam($query); 30 $query = $this->searchParam($query);
@@ -43,7 +43,7 @@ class ProductController extends BaseController @@ -43,7 +43,7 @@ class ProductController extends BaseController
43 public function index(Product $product) 43 public function index(Product $product)
44 { 44 {
45 $filed = ['id', 'project_id', 'title', 'sort' ,'thumb', 'gallery' ,'product_type' , 'route' , 45 $filed = ['id', 'project_id', 'title', 'sort' ,'thumb', 'gallery' ,'product_type' , 'route' ,
46 - 'category_id', 'keyword_id', 'status', 'created_uid', 'is_upgrade' ,'created_at', 'updated_at']; 46 + 'category_id', 'keyword_id', 'status', 'created_uid', 'is_upgrade' ,'created_at', 'updated_at','six_read'];
47 $this->order = 'sort'; 47 $this->order = 'sort';
48 $query = $product->orderBy($this->order ,'desc')->orderBy('id','desc'); 48 $query = $product->orderBy($this->order ,'desc')->orderBy('id','desc');
49 $query = $this->searchParam($query); 49 $query = $this->searchParam($query);
@@ -82,6 +82,7 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -82,6 +82,7 @@ class CustomModuleCategoryLogic extends BaseLogic
82 if($info === false){ 82 if($info === false){
83 $this->fail('当前数据不存在或已被删除'); 83 $this->fail('当前数据不存在或已被删除');
84 } 84 }
  85 + $info['image_link'] = getImageUrl($info['image']);
85 return $this->success($info); 86 return $this->success($info);
86 } 87 }
87 88
@@ -93,6 +94,7 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -93,6 +94,7 @@ class CustomModuleCategoryLogic extends BaseLogic
93 * @time :2023/12/4 15:47 94 * @time :2023/12/4 15:47
94 */ 95 */
95 public function categorySave(){ 96 public function categorySave(){
  97 + $this->param = $this->handleParam($this->param);
96 if(isset($this->param['id']) && !empty($this->param['id'])){ 98 if(isset($this->param['id']) && !empty($this->param['id'])){
97 $this->categoryEdit(); 99 $this->categoryEdit();
98 }else{ 100 }else{
@@ -102,6 +104,24 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -102,6 +104,24 @@ class CustomModuleCategoryLogic extends BaseLogic
102 } 104 }
103 105
104 /** 106 /**
  107 + * @name :(参数处理)paramProcessing
  108 + * @author :lyh
  109 + * @method :post
  110 + * @time :2023/6/13 11:30
  111 + */
  112 + public function handleParam($param)
  113 + {
  114 + $param['operator_id'] = $this->user['id'];
  115 + if(!isset($param['id']) || empty($param['id'])){
  116 + $param['project_id'] = $this->user['project_id'];
  117 + }
  118 + if(isset($param['image']) && !empty($param['image'])){
  119 + $param['image'] = str_replace_url($param['image']);
  120 + }
  121 + return $this->success($param);
  122 + }
  123 +
  124 + /**
105 * @remark :添加分类 125 * @remark :添加分类
106 * @name :categoryAdd 126 * @name :categoryAdd
107 * @author :lyh 127 * @author :lyh
@@ -116,7 +136,7 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -116,7 +136,7 @@ class CustomModuleCategoryLogic extends BaseLogic
116 $this->handleAddSon($id); 136 $this->handleAddSon($id);
117 $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'],$route); 137 $this->addUpdateNotify(RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'],$route);
118 $this->curlDelRoute(['new_route'=>$route]); 138 $this->curlDelRoute(['new_route'=>$route]);
119 - $this->edit(['url' => $route], ['id' => $id]); 139 + $this->edit(['route' => $route], ['id' => $id]);
120 //处理上级分类商品 140 //处理上级分类商品
121 $this->handleAddSon($id); 141 $this->handleAddSon($id);
122 }catch (\Exception $e){ 142 }catch (\Exception $e){
@@ -135,7 +155,8 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -135,7 +155,8 @@ class CustomModuleCategoryLogic extends BaseLogic
135 public function categoryEdit(){ 155 public function categoryEdit(){
136 $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'], 156 $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'],
137 $this->param['id'], $this->user['project_id']); 157 $this->param['id'], $this->user['project_id']);
138 - $this->editNewsRoute($this->param['id'],$route); 158 + $this->editHandleCategory($this->param['id'],$this->param['pid']);
  159 + $this->editRoute($this->param['id'],$route);
139 $rs = $this->model->edit($this->param,['id'=>$this->param['id']]); 160 $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
140 if($rs === false){ 161 if($rs === false){
141 $this->fail('系统错误,请连续管理员'); 162 $this->fail('系统错误,请连续管理员');
@@ -153,16 +174,16 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -153,16 +174,16 @@ class CustomModuleCategoryLogic extends BaseLogic
153 public function editHandleCategory($id,$pid){ 174 public function editHandleCategory($id,$pid){
154 $info = $this->model->read(['id'=>$id],['id','pid']); 175 $info = $this->model->read(['id'=>$id],['id','pid']);
155 if($info['pid'] != $pid){ 176 if($info['pid'] != $pid){
156 - //修改勒上级,先查看上级是否拥有博客 177 + //修改勒上级,先查看上级是否拥有产品
157 $contentModel = new CustomModuleContent(); 178 $contentModel = new CustomModuleContent();
158 - $newsCount = $contentModel->formatQuery(['category_id'=>['like','%,'.$pid.',%']])->count(); 179 + $contentCount = $contentModel->formatQuery(['category_id'=>['like','%,'.$pid.',%']])->count();
  180 + if($contentCount > 0){
159 //随机获取最后一级id 181 //随机获取最后一级id
160 $replacement = $this->getLastId($id); 182 $replacement = $this->getLastId($id);
161 - if($newsCount > 0){  
162 //存在博客时,移动所有博客到当前分类最后一级 183 //存在博客时,移动所有博客到当前分类最后一级
163 - $newsCount->where('category_id', 'like', '%,' . $pid . ',%')->where('category_id', 'like', '%,' . $replacement . ',%') 184 + $contentModel->where('category_id', 'like', '%,' . $pid . ',%')->where('category_id', 'like', '%,' . $replacement . ',%')
164 ->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',')")]); 185 ->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',')")]);
165 - $newsCount->where('category_id', 'like', '%,' . $pid . ',%') 186 + $contentModel->where('category_id', 'like', '%,' . $pid . ',%')
166 ->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',$replacement,')")]); 187 ->update(['category_id' => DB::raw("REPLACE(category_id, ',$pid,', ',$replacement,')")]);
167 } 188 }
168 } 189 }
@@ -170,13 +191,29 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -170,13 +191,29 @@ class CustomModuleCategoryLogic extends BaseLogic
170 } 191 }
171 192
172 /** 193 /**
  194 + * @remark :随机获取当前id下最后一级的id
  195 + * @name :getLastId
  196 + * @author :lyh
  197 + * @method :post
  198 + * @time :2023/10/20 9:45
  199 + */
  200 + public function getLastId($id){
  201 + $info = $this->model->read(['pid'=>$id],['id']);
  202 + if($info !== false){
  203 + return $this->getLastId($info['id']);
  204 + }else{
  205 + return $id;
  206 + }
  207 + }
  208 +
  209 + /**
173 * @remark :查看是否编辑路由 210 * @remark :查看是否编辑路由
174 * @name :editCategoryRoute 211 * @name :editCategoryRoute
175 * @author :lyh 212 * @author :lyh
176 * @method :post 213 * @method :post
177 * @time :2023/9/7 11:05 214 * @time :2023/9/7 11:05
178 */ 215 */
179 - public function editNewsRoute($id, $route) 216 + public function editRoute($id, $route)
180 { 217 {
181 //生成一条删除路由记录 218 //生成一条删除路由记录
182 $info = $this->model->read(['id' => $id], ['id', 'route']); 219 $info = $this->model->read(['id' => $id], ['id', 'route']);
@@ -235,14 +272,37 @@ class CustomModuleCategoryLogic extends BaseLogic @@ -235,14 +272,37 @@ class CustomModuleCategoryLogic extends BaseLogic
235 * @time :2023/12/4 15:47 272 * @time :2023/12/4 15:47
236 */ 273 */
237 public function categoryDel(){ 274 public function categoryDel(){
238 - $info = $this->model->read(['pid' => $this->param['id']], ['id', 'route']);  
239 - if($info === false){  
240 - $this->fail('当前分类拥有下级'); 275 + $ids = $this->param['id'];
  276 + foreach ($ids as $id){
  277 + $info = $this->model->read(['pid'=>$id],['id']);
  278 + if($info !== false){
  279 + $this->fail('分类id:'.$id.'拥有子集不允许删除');
241 } 280 }
242 - $rs = $this->model->del($this->param);  
243 - if($rs === false){  
244 - $this->fail('系统错误,请连续管理员'); 281 + $contentModel = new CustomModuleContent();
  282 + $contentInfo = $contentModel->read(['category_id'=>['like','%,'.$id.',%']]);
  283 + if($contentInfo !== false){
  284 + $this->fail('当前分类拥有产品不允许删除');
  285 + }
  286 + //删除路由
  287 + $this->delRoute($id);
  288 + $this->model->del(['id'=>$id]);
  289 + }
  290 + return $this->success();
245 } 291 }
  292 +
  293 + /**
  294 + * @remark :删除路由
  295 + * @name :delRoute
  296 + * @author :lyh
  297 + * @method :post
  298 + * @time :2023/9/7 10:50
  299 + */
  300 + public function delRoute($id)
  301 + {
  302 + RouteMap::delRoute(RouteMap::SOURCE_MODULE_CATE.$this->param['module_id'], $id, $this->user['project_id']);
  303 + //通知
  304 + $info = $this->model->read(['id' => $id], ['id', 'route']);
  305 + $this->curlDelRoute(['route'=>$info['route']]);
246 return $this->success(); 306 return $this->success();
247 } 307 }
248 } 308 }
@@ -10,7 +10,15 @@ @@ -10,7 +10,15 @@
10 namespace App\Http\Logic\Bside\CustomModule; 10 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\CustomModule\CustomModuleCategory;
13 use App\Models\CustomModule\CustomModuleContent; 14 use App\Models\CustomModule\CustomModuleContent;
  15 +use App\Models\CustomModule\CustomModuleExtend;
  16 +use App\Models\CustomModule\CustomModuleExtentContent;
  17 +use App\Models\Product\Extend;
  18 +use App\Models\Product\ExtendInfo;
  19 +use App\Models\RouteMap\RouteMap;
  20 +use Illuminate\Support\Facades\DB;
  21 +use mysql_xdevapi\Exception;
14 22
15 class CustomModuleContentLogic extends BaseLogic 23 class CustomModuleContentLogic extends BaseLogic
16 { 24 {
@@ -28,23 +36,257 @@ class CustomModuleContentLogic extends BaseLogic @@ -28,23 +36,257 @@ class CustomModuleContentLogic extends BaseLogic
28 * @method :post 36 * @method :post
29 * @time :2023/12/4 16:10 37 * @time :2023/12/4 16:10
30 */ 38 */
31 - public function getCustomModuleContentInfo(){ 39 + public function getContentInfo(){
32 $info = $this->model->read($this->param); 40 $info = $this->model->read($this->param);
33 if($info === false){ 41 if($info === false){
34 $this->fail('当前数据不存在或已被删除'); 42 $this->fail('当前数据不存在或已被删除');
35 } 43 }
  44 + $info['image_link'] = getImageUrl($info['image']);
  45 + $info['extend'] = $this->getExtendInfo($info['module_id'],$info['id']);
36 return $this->success($info); 46 return $this->success($info);
37 } 47 }
38 48
39 /** 49 /**
  50 + * @remark :获取扩展字段详情
  51 + * @name :getExtendInfo
  52 + * @author :lyh
  53 + * @method :post
  54 + * @time :2023/11/14 9:45
  55 + */
  56 + public function getExtendInfo($module_id,$content_id){
  57 + $extendModel = new CustomModuleExtend();
  58 + $list = $extendModel->list(['module_id'=>$module_id],'id',['id','type','key','title']);
  59 + if(empty($list)){
  60 + return [];
  61 + }
  62 + $extendContentModel = new CustomModuleExtentContent();
  63 + foreach ($list as $k=>$v){
  64 + $info = $extendContentModel->read(['key'=>$v['key'],'content_id'=>$content_id]);
  65 + if($info === false){
  66 + if($v['type'] == 3 || $v['type'] == 4){
  67 + $v['values'] = [];
  68 + }else{
  69 + $v['values'] = '';
  70 + }
  71 + }else{
  72 + $v = $this->setTypValues($v,$info);
  73 + }
  74 + $list[$k] = $v;
  75 + }
  76 + return $this->success($list);
  77 + }
  78 +
  79 + /**
  80 + * @remark :扩展字段根据type返回类型
  81 + * @name :setTypValues
  82 + * @author :lyh
  83 + * @method :post
  84 + * @time :2023/12/6 14:43
  85 + */
  86 + public function setTypValues($v,$info){
  87 + if($v['type'] == 3){
  88 + $arr = json_decode($info['values']);
  89 + foreach ($arr as $k1=>$v1){
  90 + $v1 = (array)$v1;
  91 + $v1['url'] = getImageUrl($v1['url']);
  92 + $arr[$k1] = $v1;
  93 + }
  94 + $v['values'] = $arr;
  95 + }elseif($v['type'] == 4){
  96 + $arr1 = json_decode($info['values']);
  97 + foreach ($arr1 as $k1=>$v1){
  98 + $v1 = getFileUrl($v1);
  99 + $arr1[$k1] = $v1;
  100 + }
  101 + $v['values'] = $arr1;
  102 + }else{
  103 + $v['values'] = $info['values'];
  104 + }
  105 + return $this->success($v);
  106 + }
  107 +
  108 + /**
40 * @remark :保存数据 109 * @remark :保存数据
41 * @name :ModuleSave 110 * @name :ModuleSave
42 * @author :lyh 111 * @author :lyh
43 * @method :post 112 * @method :post
44 * @time :2023/12/4 15:47 113 * @time :2023/12/4 15:47
45 */ 114 */
46 - public function customModuleContentSave(){ 115 + public function contentSave(){
  116 + $extend = $this->handleExtent();
  117 + $this->param = $this->handleParam($this->param);
  118 + if(isset($this->param['id']) && !empty($this->param['id'])){
  119 + $id = $this->contentEdit();
  120 + }else{
  121 + $id = $this->contentAdd();
  122 + }
  123 + //保存扩展字段
  124 + $this->saveExtendInfo($id,$extend);
  125 + return $this->success();
  126 + }
  127 +
  128 + /**
  129 + * @remark :处理扩展字段
  130 + * @name :handleExtent
  131 + * @author :lyh
  132 + * @method :post
  133 + * @time :2023/12/6 15:06
  134 + */
  135 + public function handleExtent(){
  136 + //扩展字段
  137 + $extend = [];
  138 + if(!empty($this->param['extend'])){
  139 + $extend = $this->param['extend'];
  140 + unset($this->param['extend']);
  141 + }
  142 + return $extend;
  143 + }
  144 +
  145 + /**
  146 + * @remark :添加数据
  147 + * @name :contentAdd
  148 + * @author :lyh
  149 + * @method :post
  150 + * @time :2023/12/7 15:04
  151 + */
  152 + public function contentAdd(){
  153 + try {
  154 + $id = $this->model->addReturnId($this->param);
  155 + $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE.$this->param['module_id'],
  156 + $id, $this->user['project_id']);
  157 + $this->addUpdateNotify(RouteMap::SOURCE_MODULE.$this->param['module_id'],$route);
  158 + $this->curlDelRoute(['new_route'=>$route]);
  159 + $this->edit(['route' => $route], ['id' => $id]);
  160 + }catch (\Exception $e){
  161 + $this->fail('系统错误,请联系管理员');
  162 + }
  163 + return $id;
  164 + }
  165 +
  166 + /**
  167 + * @remark :编辑数据
  168 + * @name :contentEdit
  169 + * @author :lyh
  170 + * @method :post
  171 + * @time :2023/12/7 15:04
  172 + */
  173 + public function contentEdit(){
  174 + $route = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_MODULE.$this->param['module_id'],
  175 + $this->param['id'], $this->user['project_id']);
  176 + $this->editRoute($this->param['id'],$route);
  177 + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
  178 + if($rs === false){
  179 + $this->fail('系统错误,请连续管理员');
  180 + }
  181 + return $this->param['id'];
  182 + }
  183 +
  184 + /**
  185 + * @name :(参数处理)paramProcessing
  186 + * @author :lyh
  187 + * @method :post
  188 + * @time :2023/6/13 11:30
  189 + */
  190 + public function handleParam($param)
  191 + {
  192 + $param['operator_id'] = $this->user['id'];
  193 + if(!isset($param['id']) || empty($param['id'])){
  194 + $param['project_id'] = $this->user['project_id'];
  195 + }
  196 + if(isset($param['category_id']) && !empty($param['category_id'])){
  197 + $param['category_id'] = $this->getLastCategory($param['category_id']);
  198 + }
  199 + if(isset($param['image']) && !empty($param['image'])){
  200 + $param['image'] = str_replace_url($param['image']);
  201 + }
  202 + return $this->success($param);
  203 + }
  204 +
  205 + /**
  206 + * @remark :查看是否编辑路由
  207 + * @name :editCategoryRoute
  208 + * @author :lyh
  209 + * @method :post
  210 + * @time :2023/9/7 11:05
  211 + */
  212 + public function editRoute($id, $route)
  213 + {
  214 + //生成一条删除路由记录
  215 + $info = $this->model->read(['id' => $id], ['id', 'route']);
  216 + if ($info['route'] != $route) {
  217 + $this->addUpdateNotify(RouteMap::SOURCE_MODULE.$this->param['module_id'],$route);
  218 + $this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]);
  219 + }
  220 + return true;
  221 + }
47 222
  223 + /**
  224 + * @remark :获取最后一级分类id
  225 + * @name :getLastCategory
  226 + * @author :lyh
  227 + * @method :post
  228 + * @time :2023/10/20 9:02
  229 + */
  230 + public function getLastCategory($category){
  231 + $str = '';
  232 + $cateModel = new CustomModuleCategory();
  233 + foreach ($category as $v){
  234 + $info = $cateModel->read(['pid'=>$v]);
  235 + if($info === false){
  236 + $str .= $v.',';
  237 + }
  238 + }
  239 + return ','.$str;
  240 + }
  241 +
  242 + /**
  243 + * @remark :保存扩展字段
  244 + * @name :saveExtend
  245 + * @author :lyh
  246 + * @method :post
  247 + * @time :2023/11/9 15:02
  248 + */
  249 + public function saveExtendInfo($content_id,$extend){
  250 + //先删除以前的数据
  251 + $extendInfoModel = new ExtendInfo();
  252 + $extendInfoModel->del(['content_id'=>$content_id]);
  253 + if(empty($extend)) {
  254 + return $this->success();
  255 + }
  256 + foreach ($extend as $v){
  257 + if(empty($v['values'])){
  258 + continue;
  259 + }
  260 + $v = $this->saveHandleExtend($v,$content_id);
  261 + $extendInfoModel->add($v);
  262 + }
  263 + return $this->success();
  264 + }
  265 +
  266 + /**
  267 + * @remark :保存扩展字段时处理数据
  268 + * @name :saveHandleExtend
  269 + * @author :lyh
  270 + * @method :post
  271 + * @time :2023/12/6 15:11
  272 + */
  273 + public function saveHandleExtend(&$v,$content_id){
  274 + if($v['type'] == 3){
  275 + foreach ($v['values'] as $k1=>$v1){
  276 + $v1['url'] = str_replace_url($v1['url']);
  277 + $v['values'][$k1] = $v1;
  278 + }
  279 + $v['values'] = json_encode($v['values']);
  280 + }elseif ($v['type'] == 4){
  281 + foreach ($v['values'] as $k1=>$v1){
  282 + $v1 = str_replace_url($v1);
  283 + $v['values'][$k1] = $v1;
  284 + }
  285 + $v['values'] = json_encode($v['values']);
  286 + }
  287 + $v['project_id'] = $this->user['project_id'];
  288 + $v['content_id'] = $content_id;
  289 + return $this->success($v);
48 } 290 }
49 291
50 /** 292 /**
@@ -54,7 +296,34 @@ class CustomModuleContentLogic extends BaseLogic @@ -54,7 +296,34 @@ class CustomModuleContentLogic extends BaseLogic
54 * @method :post 296 * @method :post
55 * @time :2023/12/4 15:47 297 * @time :2023/12/4 15:47
56 */ 298 */
57 - public function customModuleContentDel(){ 299 + public function contentDel(){
  300 + DB::beginTransaction();
  301 + try {
  302 + foreach ($this->param['id'] as $id) {
  303 + $this->delRoute($id);
  304 + $this->model->del(['id' => $id]);
  305 + }
  306 + DB::commit();
  307 + } catch (Exception $e) {
  308 + DB::rollBack();
  309 + $this->fail('系统错误,请联系管理员');
  310 + }
  311 + return $this->success();
  312 + }
58 313
  314 + /**
  315 + * @remark :删除路由
  316 + * @name :delRoute
  317 + * @author :lyh
  318 + * @method :post
  319 + * @time :2023/9/7 10:50
  320 + */
  321 + public function delRoute($id)
  322 + {
  323 + RouteMap::delRoute(RouteMap::SOURCE_MODULE.$this->param['module_id'], $id, $this->user['project_id']);
  324 + //通知
  325 + $info = $this->model->read(['id' => $id], ['id', 'url']);
  326 + $this->curlDelRoute(['route'=>$info['url']]);
  327 + return $this->success();
59 } 328 }
60 } 329 }
@@ -28,8 +28,12 @@ class CustomModuleExtendLogic extends BaseLogic @@ -28,8 +28,12 @@ class CustomModuleExtendLogic extends BaseLogic
28 * @method :post 28 * @method :post
29 * @time :2023/12/4 16:10 29 * @time :2023/12/4 16:10
30 */ 30 */
31 - public function getCustomModuleExtendInfo(){  
32 - 31 + public function getExtendInfo(){
  32 + $info = $this->model->read($this->param,['id','title','status','type','operator_id','project_id','module_id']);
  33 + if($info === false){
  34 + $this->fail('当前数据不存在或者已被删除');
  35 + }
  36 + return $this->success($info);
33 } 37 }
34 38
35 /** 39 /**
@@ -39,8 +43,68 @@ class CustomModuleExtendLogic extends BaseLogic @@ -39,8 +43,68 @@ class CustomModuleExtendLogic extends BaseLogic
39 * @method :post 43 * @method :post
40 * @time :2023/12/4 15:47 44 * @time :2023/12/4 15:47
41 */ 45 */
42 - public function customModuleExtendSave(){ 46 + public function extendSave(){
  47 + if(isset($this->param['id']) && !empty($this->param['id'])){
  48 + $this->extendEdit();
  49 + }else{
  50 + $this->extendAdd();
  51 + }
  52 + return $this->success();
  53 + }
  54 +
  55 + /**
  56 + * @remark :添加
  57 + * @name :extendAdd
  58 + * @author :lyh
  59 + * @method :post
  60 + * @time :2023/12/7 14:09
  61 + */
  62 + public function extendAdd(){
  63 + $info = $this->model->read(['title'=>$this->param['title']]);
  64 + if($info !== false){
  65 + $this->fail('当前扩展名称已存在');
  66 + }
  67 + $key = 'pd_extended_field_';
  68 + $this->param['key'] = $this->getKey($key);
  69 + $this->param['project_id'] = $this->user['project_id'];
  70 + $this->param['operator_id'] = $this->user['id'];
  71 + $rs = $this->model->add($this->param);
  72 + if($rs === false){
  73 + $this->fail('系统错误,请联系管理员');
  74 + }
  75 + return $this->success();
  76 + }
  77 +
  78 + /**
  79 + * @remark :获取唯一key
  80 + * @name :getKey
  81 + * @author :lyh
  82 + * @method :post
  83 + * @time :2023/11/9 15:55
  84 + */
  85 + public function getKey($key,$i = 1){
  86 + $info = $this->model->read(['key'=>$key.$i]);
  87 + if($info !== false){
  88 + return $this->getKey($key,$i+1);
  89 + }else{
  90 + return $key.$i;
  91 + }
  92 + }
43 93
  94 + /**
  95 + * @remark :编辑
  96 + * @name :extendEdit
  97 + * @author :lyh
  98 + * @method :post
  99 + * @time :2023/12/7 14:09
  100 + */
  101 + public function extendEdit(){
  102 + $this->param['operator_id'] = $this->user['id'];
  103 + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
  104 + if($rs === false){
  105 + $this->fail('系统错误,请联系管理员');
  106 + }
  107 + return $this->success();
44 } 108 }
45 109
46 /** 110 /**
@@ -50,7 +114,11 @@ class CustomModuleExtendLogic extends BaseLogic @@ -50,7 +114,11 @@ class CustomModuleExtendLogic extends BaseLogic
50 * @method :post 114 * @method :post
51 * @time :2023/12/4 15:47 115 * @time :2023/12/4 15:47
52 */ 116 */
53 - public function customModuleExtendDel(){  
54 - 117 + public function extendDel(){
  118 + $rs = $this->model->del($this->param);
  119 + if($rs === false){
  120 + $this->fail('系统错误,请联系管理员');
  121 + }
  122 + return $this->success();
55 } 123 }
56 } 124 }
@@ -46,6 +46,7 @@ class CustomModuleLogic extends BaseLogic @@ -46,6 +46,7 @@ class CustomModuleLogic extends BaseLogic
46 * @time :2023/12/4 15:47 46 * @time :2023/12/4 15:47
47 */ 47 */
48 public function customModuleSave(){ 48 public function customModuleSave(){
  49 + $this->param = $this->handleParam($this->param);
49 if(isset($this->param['id']) && !empty($this->param['id'])){ 50 if(isset($this->param['id']) && !empty($this->param['id'])){
50 $this->moduleEdit(); 51 $this->moduleEdit();
51 }else{ 52 }else{
@@ -55,6 +56,21 @@ class CustomModuleLogic extends BaseLogic @@ -55,6 +56,21 @@ class CustomModuleLogic extends BaseLogic
55 } 56 }
56 57
57 /** 58 /**
  59 + * @name :(参数处理)paramProcessing
  60 + * @author :lyh
  61 + * @method :post
  62 + * @time :2023/6/13 11:30
  63 + */
  64 + public function handleParam($param)
  65 + {
  66 + $param['operator_id'] = $this->user['id'];
  67 + if(!isset($param['id']) || empty($param['id'])){
  68 + $param['project_id'] = $this->user['project_id'];
  69 + }
  70 + return $this->success($param);
  71 + }
  72 +
  73 + /**
58 * @remark :新增 74 * @remark :新增
59 * @name :moduleAdd 75 * @name :moduleAdd
60 * @author :lyh 76 * @author :lyh
@@ -62,7 +78,6 @@ class CustomModuleLogic extends BaseLogic @@ -62,7 +78,6 @@ class CustomModuleLogic extends BaseLogic
62 * @time :2023/12/5 9:39 78 * @time :2023/12/5 9:39
63 */ 79 */
64 public function moduleAdd(){ 80 public function moduleAdd(){
65 - $this->param['project_id'] = $this->user['project_id'];  
66 $rs = $this->model->add($this->param); 81 $rs = $this->model->add($this->param);
67 if($rs === false){ 82 if($rs === false){
68 $this->fail('系统错误,请联系管理员'); 83 $this->fail('系统错误,请联系管理员');
@@ -106,6 +106,7 @@ class ProductLogic extends BaseLogic @@ -106,6 +106,7 @@ class ProductLogic extends BaseLogic
106 } 106 }
107 return $category_ids; 107 return $category_ids;
108 } 108 }
  109 +
109 /** 110 /**
110 * @remark :新增时处理字段 111 * @remark :新增时处理字段
111 * @name :addHandleParam 112 * @name :addHandleParam
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 9
10 namespace App\Models\CustomModule; 10 namespace App\Models\CustomModule;
11 11
  12 +use App\Helper\Arr;
12 use App\Models\Base; 13 use App\Models\Base;
13 14
14 class CustomModuleContent extends Base 15 class CustomModuleContent extends Base
@@ -16,4 +17,8 @@ class CustomModuleContent extends Base @@ -16,4 +17,8 @@ class CustomModuleContent extends Base
16 protected $table = 'gl_custom_module_content'; 17 protected $table = 'gl_custom_module_content';
17 //连接数据库 18 //连接数据库
18 protected $connection = 'custom_mysql'; 19 protected $connection = 'custom_mysql';
  20 +
  21 + public function getCategoryIdAttribute($value){
  22 + return Arr::setToArr(trim($value,','));
  23 + }
19 } 24 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :CustomModuleExtentContent.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/12/7 14:38
  8 + */
  9 +
  10 +namespace App\Models\CustomModule;
  11 +
  12 +use App\Models\Base;
  13 +
  14 +class CustomModuleExtentContent extends Base
  15 +{
  16 + protected $table = 'gl_custom_module_extent_content';
  17 + //连接数据库
  18 + protected $connection = 'custom_mysql';
  19 +}
@@ -164,14 +164,13 @@ class RouteMap extends Base @@ -164,14 +164,13 @@ class RouteMap extends Base
164 * @time :2023/11/21 18:48 164 * @time :2023/11/21 18:48
165 */ 165 */
166 public static function setProductRoute($route,$i = 0){ 166 public static function setProductRoute($route,$i = 0){
167 - $routes = $route.'-product'; 167 + $routes = $route.'-'.$i.'-product';
168 $routeMapModel = new RouteMap(); 168 $routeMapModel = new RouteMap();
169 $routeInfo = $routeMapModel->read(['route'=>$routes]); 169 $routeInfo = $routeMapModel->read(['route'=>$routes]);
170 if($routeInfo === false){ 170 if($routeInfo === false){
171 return $routes; 171 return $routes;
172 }else{ 172 }else{
173 $i = $i + 1; 173 $i = $i + 1;
174 - $route = $route.'-'.$i;  
175 return self::setProductRoute($route,$i); 174 return self::setProductRoute($route,$i);
176 } 175 }
177 } 176 }
@@ -184,14 +183,13 @@ class RouteMap extends Base @@ -184,14 +183,13 @@ class RouteMap extends Base
184 * @time :2023/11/21 18:48 183 * @time :2023/11/21 18:48
185 */ 184 */
186 public static function setKeywordRoute($route,$i = 0){ 185 public static function setKeywordRoute($route,$i = 0){
187 - $routes = $route.'-tag'; 186 + $routes = $route.'-'.$i.'-tag';
188 $routeMapModel = new RouteMap(); 187 $routeMapModel = new RouteMap();
189 $routeInfo = $routeMapModel->read(['route'=>$routes]); 188 $routeInfo = $routeMapModel->read(['route'=>$routes]);
190 if($routeInfo === false){ 189 if($routeInfo === false){
191 return $routes; 190 return $routes;
192 }else{ 191 }else{
193 $i = $i + 1; 192 $i = $i + 1;
194 - $route = $route.'-'.$i;  
195 return self::setProductRoute($route,$i); 193 return self::setProductRoute($route,$i);
196 } 194 }
197 } 195 }
@@ -440,10 +440,18 @@ Route::middleware(['bloginauth'])->group(function () { @@ -440,10 +440,18 @@ Route::middleware(['bloginauth'])->group(function () {
440 440
441 Route::prefix('content')->group(function () { 441 Route::prefix('content')->group(function () {
442 Route::any('/', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'lists'])->name('custom_content_lists'); 442 Route::any('/', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'lists'])->name('custom_content_lists');
  443 + Route::any('/getCategoryList', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'getCategoryList'])->name('custom_content_getCategoryList');
443 Route::any('/info', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'info'])->name('custom_content_info'); 444 Route::any('/info', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'info'])->name('custom_content_info');
444 Route::any('/save', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'save'])->name('custom_content_save'); 445 Route::any('/save', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'save'])->name('custom_content_save');
445 Route::any('/del', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'del'])->name('custom_content_del'); 446 Route::any('/del', [\App\Http\Controllers\Bside\CustomModule\CustomModuleContentController::class, 'del'])->name('custom_content_del');
446 }); 447 });
  448 +
  449 + Route::prefix('extend')->group(function () {
  450 + Route::any('/', [\App\Http\Controllers\Bside\CustomModule\CustomModuleExtentController::class, 'lists'])->name('custom_extend_lists');
  451 + Route::any('/info', [\App\Http\Controllers\Bside\CustomModule\CustomModuleExtentController::class, 'info'])->name('custom_extend_info');
  452 + Route::any('/save', [\App\Http\Controllers\Bside\CustomModule\CustomModuleExtentController::class, 'save'])->name('custom_extend_save');
  453 + Route::any('/del', [\App\Http\Controllers\Bside\CustomModule\CustomModuleExtentController::class, 'del'])->name('custom_extend_del');
  454 + });
447 }); 455 });
448 }); 456 });
449 //无需登录验证的路由组 457 //无需登录验证的路由组