作者 lyh

gx

... ... @@ -151,4 +151,17 @@ class BlogCategoryController extends BaseController
//TODO::写入操作日志
$this->response('success');
}
/**
* @remark :批量排序
* @name :allSort
* @author :lyh
* @method :post
* @time :2024/1/11 9:46
*/
public function allSort(BlogCategoryLogic $blogCategoryLogic){
$blogCategoryLogic->setAllSort();
$this->response('success');
}
}
... ...
... ... @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Bside\CustomModule;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\CustomModule\CustomModuleCategoryLogic;
use App\Http\Logic\Bside\CustomModule\CustomModuleContentLogic;
use App\Models\CustomModule\CustomModule;
use App\Models\CustomModule\CustomModuleCategory;
use App\Models\Template\BTemplate;
... ... @@ -173,4 +174,16 @@ class CustomModuleCategoryController extends BaseController
$logic->categorySort();
$this->response('success');
}
/**
* @remark :批量排序
* @name :allSort
* @author :lyh
* @method :post
* @time :2024/1/11 9:46
*/
public function allSort(CustomModuleContentLogic $logic){
$logic->setAllSort();
$this->response('success');
}
}
... ...
... ... @@ -243,4 +243,16 @@ class CustomModuleContentController extends BaseController
$logic->contentSort();
$this->response('success');
}
/**
* @remark :批量排序
* @name :allSort
* @author :lyh
* @method :post
* @time :2024/1/11 9:46
*/
public function allSort(CustomModuleContentLogic $logic){
$logic->setAllSort();
$this->response('success');
}
}
... ...
... ... @@ -148,4 +148,17 @@ class NewsCategoryController extends BaseController
$this->response('success');
}
/**
* @remark :批量排序
* @name :allSort
* @author :lyh
* @method :post
* @time :2024/1/11 9:46
*/
public function allSort(NewsCategoryLogic $newsCategoryLogic){
$newsCategoryLogic->setAllSort();
$this->response('success');
}
}
... ...
... ... @@ -164,4 +164,17 @@ class CategoryController extends BaseController
$data = $logic->categoryDelete();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :批量更新排序
* @name :allSort
* @author :lyh
* @method :post
* @time :2024/1/10 15:34
*/
public function allSort(CategoryLogic $logic){
$logic->setAllSort();
$this->response('success');
}
}
... ...
... ... @@ -297,7 +297,7 @@ class ProductController extends BaseController
$v = $this->getHandleFileImage($v);
$template_id = $this->getTemplateId(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL);
$v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL,$template_id,$v['id'] ?? 0);
$v['url'] = $this->user['domain'].$v['route'] ?? '';
$v['url'] = $this->user['domain'].($v['route'] ?? '');
//获取当前数据扩展字段及值
$v['extend'] = $this->getExtendInfo($v['id']);
return $v;
... ...
... ... @@ -278,4 +278,19 @@ class BlogCategoryLogic extends BaseLogic
}
return $this->success();
}
/**
* @remark :设置批量排序
* @name :setAllSort
* @author :lyh
* @method :post
* @time :2024/1/10 15:40
*/
public function setAllSort(){
foreach ($this->param['data'] as $k => $v){
$this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]);
}
return $this->success();
}
}
... ...
... ... @@ -377,4 +377,18 @@ class CustomModuleContentLogic extends BaseLogic
$contentExtendModel->del(['content_id'=>$id]);
return $this->success();
}
/**
* @remark :设置批量排序
* @name :setAllSort
* @author :lyh
* @method :post
* @time :2024/1/10 15:40
*/
public function setAllSort(){
foreach ($this->param['data'] as $k => $v){
$this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]);
}
return $this->success();
}
}
... ...
... ... @@ -46,7 +46,7 @@ class CountLogic extends BaseLogic
//获取项目的剩余时长
$projectModel = new Project();
$projectInfo = $projectModel->read(['id'=>$this->user['project_id']],['remain_day','finish_remain_day']);
$info['service_day'] = $this->project['deploy_build']['service_duration'] - $projectInfo['finish_remain_day'];
$info['service_day'] = ($this->project['deploy_build']['service_duration'] ?? 0 - $projectInfo['finish_remain_day'] ?? 0);
$info['compliance_day'] = $projectInfo['finish_remain_day'];
return $this->success($info);
}
... ...
... ... @@ -259,4 +259,18 @@ class NewsCategoryLogic extends BaseLogic
}
return $this->success();
}
/**
* @remark :设置批量排序
* @name :setAllSort
* @author :lyh
* @method :post
* @time :2024/1/10 15:40
*/
public function setAllSort(){
foreach ($this->param['data'] as $k => $v){
$this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]);
}
return $this->success();
}
}
... ...
... ... @@ -270,7 +270,7 @@ class NewsLogic extends BaseLogic
}
/**
* @remark :
* @remark :设置批量排序
* @name :setAllSort
* @author :lyh
* @method :post
... ...
... ... @@ -273,4 +273,18 @@ class CategoryLogic extends BaseLogic
}
return $this->success();
}
/**
* @remark :批量设置排序
* @name :setAllSort
* @author :lyh
* @method :post
* @time :2024/1/10 15:40
*/
public function setAllSort(){
foreach ($this->param['data'] as $k => $v){
$this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]);
}
return $this->success();
}
}
... ...
... ... @@ -133,7 +133,7 @@ class ProjectServer
//初始化模块数据
self::initModule($project_id);
//初始化search页面
self::initSearchPage($project_id);
// self::initSearchPage($project_id);
DB::disconnect('custom_mysql');
return true;
}
... ...
... ... @@ -77,6 +77,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::any('/category/info', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'info'])->name('news_category_info');
Route::any('/category/edit', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'save'])->name('news_category_edit');
Route::any('/category/del', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'del'])->name('news_category_del');
Route::any('/category/allSort', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'allSort'])->name('news_category_allSort');
Route::any('/category/status', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'status'])->name('news_category_status');
Route::any('/category/sort', [\App\Http\Controllers\Bside\News\NewsCategoryController::class, 'sort'])->name('news_category_sort');
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 () {
Route::any('/category/info', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'info'])->name('blog_category_info');
Route::any('/category/edit', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'save'])->name('blog_category_edit');
Route::any('/category/del', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'del'])->name('blog_category_del');
Route::any('/category/allSort', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'allSort'])->name('blog_category_allSort');
Route::any('/category/status', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'status'])->name('blog_category_status');
Route::any('/category/sort', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'sort'])->name('blog_category_sort');
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 () {
Route::post('category/save', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'save'])->name('product_category_save');
Route::post('category/sort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'sort'])->name('product_category_sort');
Route::any('category/delete', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'delete'])->name('product_category_delete');
Route::any('category/allSort', [\App\Http\Controllers\Bside\Product\CategoryController::class, 'allSort'])->name('product_category_allSort');
//产品关键词
Route::get('keyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'index'])->name('product_keyword');
Route::get('keyword/info', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'info'])->name('product_keyword_info');
... ...