正在显示
14 个修改的文件
包含
128 行增加
和
5 行删除
| @@ -151,4 +151,17 @@ class BlogCategoryController extends BaseController | @@ -151,4 +151,17 @@ class BlogCategoryController extends BaseController | ||
| 151 | //TODO::写入操作日志 | 151 | //TODO::写入操作日志 |
| 152 | $this->response('success'); | 152 | $this->response('success'); |
| 153 | } | 153 | } |
| 154 | + | ||
| 155 | + | ||
| 156 | + /** | ||
| 157 | + * @remark :批量排序 | ||
| 158 | + * @name :allSort | ||
| 159 | + * @author :lyh | ||
| 160 | + * @method :post | ||
| 161 | + * @time :2024/1/11 9:46 | ||
| 162 | + */ | ||
| 163 | + public function allSort(BlogCategoryLogic $blogCategoryLogic){ | ||
| 164 | + $blogCategoryLogic->setAllSort(); | ||
| 165 | + $this->response('success'); | ||
| 166 | + } | ||
| 154 | } | 167 | } |
| @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\CustomModule; | @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\CustomModule; | ||
| 12 | use App\Enums\Common\Code; | 12 | use App\Enums\Common\Code; |
| 13 | use App\Http\Controllers\Bside\BaseController; | 13 | use App\Http\Controllers\Bside\BaseController; |
| 14 | use App\Http\Logic\Bside\CustomModule\CustomModuleCategoryLogic; | 14 | use App\Http\Logic\Bside\CustomModule\CustomModuleCategoryLogic; |
| 15 | +use App\Http\Logic\Bside\CustomModule\CustomModuleContentLogic; | ||
| 15 | use App\Models\CustomModule\CustomModule; | 16 | use App\Models\CustomModule\CustomModule; |
| 16 | use App\Models\CustomModule\CustomModuleCategory; | 17 | use App\Models\CustomModule\CustomModuleCategory; |
| 17 | use App\Models\Template\BTemplate; | 18 | use App\Models\Template\BTemplate; |
| @@ -173,4 +174,16 @@ class CustomModuleCategoryController extends BaseController | @@ -173,4 +174,16 @@ class CustomModuleCategoryController extends BaseController | ||
| 173 | $logic->categorySort(); | 174 | $logic->categorySort(); |
| 174 | $this->response('success'); | 175 | $this->response('success'); |
| 175 | } | 176 | } |
| 177 | + | ||
| 178 | + /** | ||
| 179 | + * @remark :批量排序 | ||
| 180 | + * @name :allSort | ||
| 181 | + * @author :lyh | ||
| 182 | + * @method :post | ||
| 183 | + * @time :2024/1/11 9:46 | ||
| 184 | + */ | ||
| 185 | + public function allSort(CustomModuleContentLogic $logic){ | ||
| 186 | + $logic->setAllSort(); | ||
| 187 | + $this->response('success'); | ||
| 188 | + } | ||
| 176 | } | 189 | } |
| @@ -243,4 +243,16 @@ class CustomModuleContentController extends BaseController | @@ -243,4 +243,16 @@ class CustomModuleContentController extends BaseController | ||
| 243 | $logic->contentSort(); | 243 | $logic->contentSort(); |
| 244 | $this->response('success'); | 244 | $this->response('success'); |
| 245 | } | 245 | } |
| 246 | + | ||
| 247 | + /** | ||
| 248 | + * @remark :批量排序 | ||
| 249 | + * @name :allSort | ||
| 250 | + * @author :lyh | ||
| 251 | + * @method :post | ||
| 252 | + * @time :2024/1/11 9:46 | ||
| 253 | + */ | ||
| 254 | + public function allSort(CustomModuleContentLogic $logic){ | ||
| 255 | + $logic->setAllSort(); | ||
| 256 | + $this->response('success'); | ||
| 257 | + } | ||
| 246 | } | 258 | } |
| @@ -148,4 +148,17 @@ class NewsCategoryController extends BaseController | @@ -148,4 +148,17 @@ class NewsCategoryController extends BaseController | ||
| 148 | $this->response('success'); | 148 | $this->response('success'); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * @remark :批量排序 | ||
| 154 | + * @name :allSort | ||
| 155 | + * @author :lyh | ||
| 156 | + * @method :post | ||
| 157 | + * @time :2024/1/11 9:46 | ||
| 158 | + */ | ||
| 159 | + public function allSort(NewsCategoryLogic $newsCategoryLogic){ | ||
| 160 | + $newsCategoryLogic->setAllSort(); | ||
| 161 | + $this->response('success'); | ||
| 162 | + } | ||
| 163 | + | ||
| 151 | } | 164 | } |
| @@ -164,4 +164,17 @@ class CategoryController extends BaseController | @@ -164,4 +164,17 @@ class CategoryController extends BaseController | ||
| 164 | $data = $logic->categoryDelete(); | 164 | $data = $logic->categoryDelete(); |
| 165 | $this->response('success',Code::SUCCESS,$data); | 165 | $this->response('success',Code::SUCCESS,$data); |
| 166 | } | 166 | } |
| 167 | + | ||
| 168 | + | ||
| 169 | + /** | ||
| 170 | + * @remark :批量更新排序 | ||
| 171 | + * @name :allSort | ||
| 172 | + * @author :lyh | ||
| 173 | + * @method :post | ||
| 174 | + * @time :2024/1/10 15:34 | ||
| 175 | + */ | ||
| 176 | + public function allSort(CategoryLogic $logic){ | ||
| 177 | + $logic->setAllSort(); | ||
| 178 | + $this->response('success'); | ||
| 179 | + } | ||
| 167 | } | 180 | } |
| @@ -297,7 +297,7 @@ class ProductController extends BaseController | @@ -297,7 +297,7 @@ class ProductController extends BaseController | ||
| 297 | $v = $this->getHandleFileImage($v); | 297 | $v = $this->getHandleFileImage($v); |
| 298 | $template_id = $this->getTemplateId(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL); | 298 | $template_id = $this->getTemplateId(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL); |
| 299 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL,$template_id,$v['id'] ?? 0); | 299 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL,$template_id,$v['id'] ?? 0); |
| 300 | - $v['url'] = $this->user['domain'].$v['route'] ?? ''; | 300 | + $v['url'] = $this->user['domain'].($v['route'] ?? ''); |
| 301 | //获取当前数据扩展字段及值 | 301 | //获取当前数据扩展字段及值 |
| 302 | $v['extend'] = $this->getExtendInfo($v['id']); | 302 | $v['extend'] = $this->getExtendInfo($v['id']); |
| 303 | return $v; | 303 | return $v; |
| @@ -278,4 +278,19 @@ class BlogCategoryLogic extends BaseLogic | @@ -278,4 +278,19 @@ class BlogCategoryLogic extends BaseLogic | ||
| 278 | } | 278 | } |
| 279 | return $this->success(); | 279 | return $this->success(); |
| 280 | } | 280 | } |
| 281 | + | ||
| 282 | + | ||
| 283 | + /** | ||
| 284 | + * @remark :设置批量排序 | ||
| 285 | + * @name :setAllSort | ||
| 286 | + * @author :lyh | ||
| 287 | + * @method :post | ||
| 288 | + * @time :2024/1/10 15:40 | ||
| 289 | + */ | ||
| 290 | + public function setAllSort(){ | ||
| 291 | + foreach ($this->param['data'] as $k => $v){ | ||
| 292 | + $this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]); | ||
| 293 | + } | ||
| 294 | + return $this->success(); | ||
| 295 | + } | ||
| 281 | } | 296 | } |
| @@ -377,4 +377,18 @@ class CustomModuleContentLogic extends BaseLogic | @@ -377,4 +377,18 @@ class CustomModuleContentLogic extends BaseLogic | ||
| 377 | $contentExtendModel->del(['content_id'=>$id]); | 377 | $contentExtendModel->del(['content_id'=>$id]); |
| 378 | return $this->success(); | 378 | return $this->success(); |
| 379 | } | 379 | } |
| 380 | + | ||
| 381 | + /** | ||
| 382 | + * @remark :设置批量排序 | ||
| 383 | + * @name :setAllSort | ||
| 384 | + * @author :lyh | ||
| 385 | + * @method :post | ||
| 386 | + * @time :2024/1/10 15:40 | ||
| 387 | + */ | ||
| 388 | + public function setAllSort(){ | ||
| 389 | + foreach ($this->param['data'] as $k => $v){ | ||
| 390 | + $this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]); | ||
| 391 | + } | ||
| 392 | + return $this->success(); | ||
| 393 | + } | ||
| 380 | } | 394 | } |
| @@ -46,7 +46,7 @@ class CountLogic extends BaseLogic | @@ -46,7 +46,7 @@ class CountLogic extends BaseLogic | ||
| 46 | //获取项目的剩余时长 | 46 | //获取项目的剩余时长 |
| 47 | $projectModel = new Project(); | 47 | $projectModel = new Project(); |
| 48 | $projectInfo = $projectModel->read(['id'=>$this->user['project_id']],['remain_day','finish_remain_day']); | 48 | $projectInfo = $projectModel->read(['id'=>$this->user['project_id']],['remain_day','finish_remain_day']); |
| 49 | - $info['service_day'] = $this->project['deploy_build']['service_duration'] - $projectInfo['finish_remain_day']; | 49 | + $info['service_day'] = ($this->project['deploy_build']['service_duration'] ?? 0 - $projectInfo['finish_remain_day'] ?? 0); |
| 50 | $info['compliance_day'] = $projectInfo['finish_remain_day']; | 50 | $info['compliance_day'] = $projectInfo['finish_remain_day']; |
| 51 | return $this->success($info); | 51 | return $this->success($info); |
| 52 | } | 52 | } |
| @@ -259,4 +259,18 @@ class NewsCategoryLogic extends BaseLogic | @@ -259,4 +259,18 @@ class NewsCategoryLogic extends BaseLogic | ||
| 259 | } | 259 | } |
| 260 | return $this->success(); | 260 | return $this->success(); |
| 261 | } | 261 | } |
| 262 | + | ||
| 263 | + /** | ||
| 264 | + * @remark :设置批量排序 | ||
| 265 | + * @name :setAllSort | ||
| 266 | + * @author :lyh | ||
| 267 | + * @method :post | ||
| 268 | + * @time :2024/1/10 15:40 | ||
| 269 | + */ | ||
| 270 | + public function setAllSort(){ | ||
| 271 | + foreach ($this->param['data'] as $k => $v){ | ||
| 272 | + $this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]); | ||
| 273 | + } | ||
| 274 | + return $this->success(); | ||
| 275 | + } | ||
| 262 | } | 276 | } |
| @@ -270,7 +270,7 @@ class NewsLogic extends BaseLogic | @@ -270,7 +270,7 @@ class NewsLogic extends BaseLogic | ||
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | /** | 272 | /** |
| 273 | - * @remark : | 273 | + * @remark :设置批量排序 |
| 274 | * @name :setAllSort | 274 | * @name :setAllSort |
| 275 | * @author :lyh | 275 | * @author :lyh |
| 276 | * @method :post | 276 | * @method :post |
| @@ -273,4 +273,18 @@ class CategoryLogic extends BaseLogic | @@ -273,4 +273,18 @@ class CategoryLogic extends BaseLogic | ||
| 273 | } | 273 | } |
| 274 | return $this->success(); | 274 | return $this->success(); |
| 275 | } | 275 | } |
| 276 | + | ||
| 277 | + /** | ||
| 278 | + * @remark :批量设置排序 | ||
| 279 | + * @name :setAllSort | ||
| 280 | + * @author :lyh | ||
| 281 | + * @method :post | ||
| 282 | + * @time :2024/1/10 15:40 | ||
| 283 | + */ | ||
| 284 | + public function setAllSort(){ | ||
| 285 | + foreach ($this->param['data'] as $k => $v){ | ||
| 286 | + $this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]); | ||
| 287 | + } | ||
| 288 | + return $this->success(); | ||
| 289 | + } | ||
| 276 | } | 290 | } |
| @@ -133,7 +133,7 @@ class ProjectServer | @@ -133,7 +133,7 @@ class ProjectServer | ||
| 133 | //初始化模块数据 | 133 | //初始化模块数据 |
| 134 | self::initModule($project_id); | 134 | self::initModule($project_id); |
| 135 | //初始化search页面 | 135 | //初始化search页面 |
| 136 | - self::initSearchPage($project_id); | 136 | +// self::initSearchPage($project_id); |
| 137 | DB::disconnect('custom_mysql'); | 137 | DB::disconnect('custom_mysql'); |
| 138 | return true; | 138 | return true; |
| 139 | } | 139 | } |
| @@ -77,6 +77,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -77,6 +77,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 77 | Route::any('/category/info', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'info'])->name('news_category_info'); | 77 | Route::any('/category/info', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'info'])->name('news_category_info'); |
| 78 | Route::any('/category/edit', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'save'])->name('news_category_edit'); | 78 | Route::any('/category/edit', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'save'])->name('news_category_edit'); |
| 79 | Route::any('/category/del', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'del'])->name('news_category_del'); | 79 | Route::any('/category/del', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'del'])->name('news_category_del'); |
| 80 | + Route::any('/category/allSort', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'allSort'])->name('news_category_allSort'); | ||
| 80 | Route::any('/category/status', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'status'])->name('news_category_status'); | 81 | Route::any('/category/status', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'status'])->name('news_category_status'); |
| 81 | Route::any('/category/sort', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'sort'])->name('news_category_sort'); | 82 | Route::any('/category/sort', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'sort'])->name('news_category_sort'); |
| 82 | Route::any('/category/categoryTopList', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'categoryTopList'])->name('news_category_categoryTopList'); | 83 | Route::any('/category/categoryTopList', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'categoryTopList'])->name('news_category_categoryTopList'); |
| @@ -118,6 +119,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -118,6 +119,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 118 | Route::any('/category/info', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'info'])->name('blog_category_info'); | 119 | Route::any('/category/info', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'info'])->name('blog_category_info'); |
| 119 | Route::any('/category/edit', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'save'])->name('blog_category_edit'); | 120 | Route::any('/category/edit', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'save'])->name('blog_category_edit'); |
| 120 | Route::any('/category/del', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'del'])->name('blog_category_del'); | 121 | Route::any('/category/del', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'del'])->name('blog_category_del'); |
| 122 | + Route::any('/category/allSort', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'allSort'])->name('blog_category_allSort'); | ||
| 121 | Route::any('/category/status', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'status'])->name('blog_category_status'); | 123 | Route::any('/category/status', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'status'])->name('blog_category_status'); |
| 122 | Route::any('/category/sort', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'sort'])->name('blog_category_sort'); | 124 | Route::any('/category/sort', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'sort'])->name('blog_category_sort'); |
| 123 | Route::any('/category/categoryTopList', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'categoryTopList'])->name('blog_category_categoryTopList'); | 125 | Route::any('/category/categoryTopList', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'categoryTopList'])->name('blog_category_categoryTopList'); |
| @@ -250,7 +252,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -250,7 +252,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 250 | Route::post('category/save', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'save'])->name('product_category_save'); | 252 | Route::post('category/save', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'save'])->name('product_category_save'); |
| 251 | Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort'); | 253 | Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort'); |
| 252 | Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete'); | 254 | Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete'); |
| 253 | - | 255 | + Route::any('category/allSort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'allSort'])->name('product_category_allSort'); |
| 254 | //产品关键词 | 256 | //产品关键词 |
| 255 | Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword'); | 257 | Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword'); |
| 256 | Route::get('keyword/info', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'info'])->name('product_keyword_info'); | 258 | Route::get('keyword/info', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'info'])->name('product_keyword_info'); |
-
请 注册 或 登录 后发表评论