Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
8 个修改的文件
包含
84 行增加
和
3 行删除
| @@ -10,11 +10,14 @@ | @@ -10,11 +10,14 @@ | ||
| 10 | namespace App\Console\Commands; | 10 | namespace App\Console\Commands; |
| 11 | 11 | ||
| 12 | use App\Helper\Arr; | 12 | use App\Helper\Arr; |
| 13 | +use App\Models\CustomModule\CustomModuleCategory; | ||
| 14 | +use App\Models\CustomModule\CustomModuleContent; | ||
| 13 | use App\Models\Product\CategoryRelated; | 15 | use App\Models\Product\CategoryRelated; |
| 14 | use App\Models\Product\Keyword; | 16 | use App\Models\Product\Keyword; |
| 15 | use App\Models\Product\Product; | 17 | use App\Models\Product\Product; |
| 16 | use App\Models\Project\Project; | 18 | use App\Models\Project\Project; |
| 17 | use App\Models\RouteMap\RouteMap; | 19 | use App\Models\RouteMap\RouteMap; |
| 20 | +use App\Models\Template\BTemplate; | ||
| 18 | use App\Services\ProjectServer; | 21 | use App\Services\ProjectServer; |
| 19 | use Illuminate\Console\Command; | 22 | use Illuminate\Console\Command; |
| 20 | use Illuminate\Support\Facades\DB; | 23 | use Illuminate\Support\Facades\DB; |
| @@ -51,20 +54,37 @@ class UpdateRoute extends Command | @@ -51,20 +54,37 @@ class UpdateRoute extends Command | ||
| 51 | */ | 54 | */ |
| 52 | public function handle(){ | 55 | public function handle(){ |
| 53 | $projectModel = new Project(); | 56 | $projectModel = new Project(); |
| 54 | - $list = $projectModel->list(['id'=>51]); | 57 | + $list = $projectModel->list(['id'=>99]); |
| 55 | foreach ($list as $v){ | 58 | foreach ($list as $v){ |
| 56 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | 59 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; |
| 57 | ProjectServer::useProject($v['id']); | 60 | ProjectServer::useProject($v['id']); |
| 58 | // $this->getProduct(); | 61 | // $this->getProduct(); |
| 59 | - $this->setProductKeyword(); | 62 | +// $this->setProductKeyword(); |
| 60 | // $this->getRouteMap(); | 63 | // $this->getRouteMap(); |
| 61 | // $this->getProductCategory(); | 64 | // $this->getProductCategory(); |
| 62 | // $this->delRouteMap(); | 65 | // $this->delRouteMap(); |
| 66 | + $this->setCustomRoute($v['id']); | ||
| 63 | DB::disconnect('custom_mysql'); | 67 | DB::disconnect('custom_mysql'); |
| 64 | } | 68 | } |
| 65 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; | 69 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; |
| 66 | } | 70 | } |
| 67 | 71 | ||
| 72 | + public function setCustomRoute($project_id){ | ||
| 73 | +// $customModel = new CustomModuleContent(); | ||
| 74 | +// $list = $customModel->list(); | ||
| 75 | +// foreach ($list as $v){ | ||
| 76 | +// $route = RouteMap::setRoute($v['name'], RouteMap::SOURCE_MODULE, $v['id'], $project_id); | ||
| 77 | +// $customModel->edit(['route'=>$route],['id'=>$v['id']]); | ||
| 78 | +// } | ||
| 79 | + $cateModel = new CustomModuleCategory(); | ||
| 80 | + $lists = $cateModel->list(); | ||
| 81 | + foreach ($lists as $v1){ | ||
| 82 | + $route = RouteMap::setRoute($v1['name'], RouteMap::SOURCE_MODULE_CATE, $v1['id'], $project_id); | ||
| 83 | + $cateModel->edit(['route'=>$route],['id'=>$v1['id']]); | ||
| 84 | + | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + | ||
| 68 | /** | 88 | /** |
| 69 | * @remark :写入 | 89 | * @remark :写入 |
| 70 | * @name :getProductKeyword | 90 | * @name :getProductKeyword |
| @@ -34,8 +34,10 @@ class PrivateController extends BaseController | @@ -34,8 +34,10 @@ class PrivateController extends BaseController | ||
| 34 | $result = Project::select($field)->leftJoin('gl_project_deploy_optimize as b', 'gl_project.id', '=', 'b.project_id') | 34 | $result = Project::select($field)->leftJoin('gl_project_deploy_optimize as b', 'gl_project.id', '=', 'b.project_id') |
| 35 | ->leftJoin('gl_project_online_check as c', 'gl_project.id', '=', 'c.project_id') | 35 | ->leftJoin('gl_project_online_check as c', 'gl_project.id', '=', 'c.project_id') |
| 36 | ->leftJoin('gl_domain_info as d', 'gl_project.id', '=', 'd.project_id') | 36 | ->leftJoin('gl_domain_info as d', 'gl_project.id', '=', 'd.project_id') |
| 37 | - ->where('c.qa_status', '=', OnlineCheck::STATUS_ONLINE_TRUE) | ||
| 38 | ->whereIn('gl_project.type', [Project::TYPE_TWO, Project::TYPE_FOUR]) | 37 | ->whereIn('gl_project.type', [Project::TYPE_TWO, Project::TYPE_FOUR]) |
| 38 | + ->where(function ($subQuery) { | ||
| 39 | + $subQuery->orwhere('c.qa_status', OnlineCheck::STATUS_ONLINE_TRUE)->orwhere('gl_project.is_upgrade', Project::IS_UPGRADE_TRUE); | ||
| 40 | + }) | ||
| 39 | ->paginate($page_size) | 41 | ->paginate($page_size) |
| 40 | ->toArray(); | 42 | ->toArray(); |
| 41 | return $this->success($result); | 43 | return $this->success($result); |
| @@ -275,4 +275,16 @@ class BlogController extends BaseController | @@ -275,4 +275,16 @@ class BlogController extends BaseController | ||
| 275 | $logic->setSort(); | 275 | $logic->setSort(); |
| 276 | $this->response('success'); | 276 | $this->response('success'); |
| 277 | } | 277 | } |
| 278 | + | ||
| 279 | + /** | ||
| 280 | + * @remark :批量排序 | ||
| 281 | + * @name :allSort | ||
| 282 | + * @author :lyh | ||
| 283 | + * @method :post | ||
| 284 | + * @time :2024/1/11 9:46 | ||
| 285 | + */ | ||
| 286 | + public function allSort(BlogLogic $logic){ | ||
| 287 | + $logic->setAllSort(); | ||
| 288 | + $this->response('success'); | ||
| 289 | + } | ||
| 278 | } | 290 | } |
| @@ -262,4 +262,16 @@ class NewsController extends BaseController | @@ -262,4 +262,16 @@ class NewsController extends BaseController | ||
| 262 | $newsLogic->setSort(); | 262 | $newsLogic->setSort(); |
| 263 | $this->response('success'); | 263 | $this->response('success'); |
| 264 | } | 264 | } |
| 265 | + | ||
| 266 | + /** | ||
| 267 | + * @remark :批量排序 | ||
| 268 | + * @name :allSort | ||
| 269 | + * @author :lyh | ||
| 270 | + * @method :post | ||
| 271 | + * @time :2024/1/11 9:47 | ||
| 272 | + */ | ||
| 273 | + public function allSort(NewsLogic $newsLogic){ | ||
| 274 | + $newsLogic->setAllSort(); | ||
| 275 | + $this->response('success'); | ||
| 276 | + } | ||
| 265 | } | 277 | } |
| @@ -234,6 +234,20 @@ class BlogLogic extends BaseLogic | @@ -234,6 +234,20 @@ class BlogLogic extends BaseLogic | ||
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | /** | 236 | /** |
| 237 | + * @remark : | ||
| 238 | + * @name :setAllSort | ||
| 239 | + * @author :lyh | ||
| 240 | + * @method :post | ||
| 241 | + * @time :2024/1/10 15:40 | ||
| 242 | + */ | ||
| 243 | + public function setAllSort(){ | ||
| 244 | + foreach ($this->param['data'] as $k => $v){ | ||
| 245 | + $this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]); | ||
| 246 | + } | ||
| 247 | + return $this->success(); | ||
| 248 | + } | ||
| 249 | + | ||
| 250 | + /** | ||
| 237 | * 博客导入 | 251 | * 博客导入 |
| 238 | * @param $project_id | 252 | * @param $project_id |
| 239 | * @param $user_id | 253 | * @param $user_id |
| @@ -250,6 +250,21 @@ class NewsLogic extends BaseLogic | @@ -250,6 +250,21 @@ class NewsLogic extends BaseLogic | ||
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | /** | 252 | /** |
| 253 | + * @remark : | ||
| 254 | + * @name :setAllSort | ||
| 255 | + * @author :lyh | ||
| 256 | + * @method :post | ||
| 257 | + * @time :2024/1/10 15:40 | ||
| 258 | + */ | ||
| 259 | + public function setAllSort(){ | ||
| 260 | + foreach ($this->param['data'] as $k => $v){ | ||
| 261 | + $this->model->edit(['sort'=>$v['sort']],['id'=>$v['id']]); | ||
| 262 | + } | ||
| 263 | + return $this->success(); | ||
| 264 | + } | ||
| 265 | + | ||
| 266 | + | ||
| 267 | + /** | ||
| 253 | * @remark :删除路由 | 268 | * @remark :删除路由 |
| 254 | * @name :delRoute | 269 | * @name :delRoute |
| 255 | * @author :lyh | 270 | * @author :lyh |
| @@ -30,6 +30,10 @@ class Project extends Base | @@ -30,6 +30,10 @@ class Project extends Base | ||
| 30 | 30 | ||
| 31 | const TYPE_SEVEN = 7;//错误单 | 31 | const TYPE_SEVEN = 7;//错误单 |
| 32 | const MYSQL_ID = 2;//默认数据库id | 32 | const MYSQL_ID = 2;//默认数据库id |
| 33 | + | ||
| 34 | + const IS_UPGRADE_FALSE = 0; | ||
| 35 | + const IS_UPGRADE_TRUE = 1; | ||
| 36 | + | ||
| 33 | /** | 37 | /** |
| 34 | * 星级客户 | 38 | * 星级客户 |
| 35 | * @return string[] | 39 | * @return string[] |
| @@ -74,6 +74,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -74,6 +74,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 74 | Route::any('/del', [\App\Http\Controllers\Bside\News\NewsController::class, 'del'])->name('news_del'); | 74 | Route::any('/del', [\App\Http\Controllers\Bside\News\NewsController::class, 'del'])->name('news_del'); |
| 75 | Route::any('/status', [\App\Http\Controllers\Bside\News\NewsController::class, 'status'])->name('news_status'); | 75 | Route::any('/status', [\App\Http\Controllers\Bside\News\NewsController::class, 'status'])->name('news_status'); |
| 76 | Route::any('/sort', [\App\Http\Controllers\Bside\News\NewsController::class, 'sort'])->name('news_sort'); | 76 | Route::any('/sort', [\App\Http\Controllers\Bside\News\NewsController::class, 'sort'])->name('news_sort'); |
| 77 | + Route::any('/allSort', [\App\Http\Controllers\Bside\News\NewsController::class, 'allSort'])->name('news_allSort'); | ||
| 77 | Route::any('/statusNum', [\App\Http\Controllers\Bside\News\NewsController::class, 'getStatusNumber'])->name('news_statusNum'); | 78 | Route::any('/statusNum', [\App\Http\Controllers\Bside\News\NewsController::class, 'getStatusNumber'])->name('news_statusNum'); |
| 78 | }); | 79 | }); |
| 79 | 80 | ||
| @@ -89,6 +90,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -89,6 +90,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 89 | Route::any('/del', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'del'])->name('blog_del'); | 90 | Route::any('/del', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'del'])->name('blog_del'); |
| 90 | Route::any('/status', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'status'])->name('blog_status'); | 91 | Route::any('/status', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'status'])->name('blog_status'); |
| 91 | Route::any('/sort', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'sort'])->name('blog_sort'); | 92 | Route::any('/sort', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'sort'])->name('blog_sort'); |
| 93 | + Route::any('/allSort', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'allSort'])->name('blog_allSort'); | ||
| 92 | Route::any('/statusNum', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'getStatusNumber'])->name('blog_statusNum'); | 94 | Route::any('/statusNum', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'getStatusNumber'])->name('blog_statusNum'); |
| 93 | //分类 | 95 | //分类 |
| 94 | Route::any('/category/', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'lists'])->name('blog_category_lists'); | 96 | Route::any('/category/', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'lists'])->name('blog_category_lists'); |
-
请 注册 或 登录 后发表评论