Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
5 个修改的文件
包含
65 行增加
和
13 行删除
| @@ -9,16 +9,9 @@ | @@ -9,16 +9,9 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Console\Commands\UpgradeKeyword; | 10 | namespace App\Console\Commands\UpgradeKeyword; |
| 11 | 11 | ||
| 12 | -use App\Helper\Arr; | ||
| 13 | -use App\Helper\Translate; | ||
| 14 | -use App\Models\CustomModule\CustomModuleCategory; | ||
| 15 | -use App\Models\CustomModule\CustomModuleContent; | ||
| 16 | -use App\Models\Product\CategoryRelated; | ||
| 17 | use App\Models\Product\Keyword; | 12 | use App\Models\Product\Keyword; |
| 18 | -use App\Models\Product\Product; | ||
| 19 | use App\Models\Project\Project; | 13 | use App\Models\Project\Project; |
| 20 | use App\Models\RouteMap\RouteMap; | 14 | use App\Models\RouteMap\RouteMap; |
| 21 | -use App\Models\Template\BTemplate; | ||
| 22 | use App\Services\ProjectServer; | 15 | use App\Services\ProjectServer; |
| 23 | use Illuminate\Console\Command; | 16 | use Illuminate\Console\Command; |
| 24 | use Illuminate\Support\Facades\DB; | 17 | use Illuminate\Support\Facades\DB; |
| @@ -56,7 +49,6 @@ class UpdateKeyword extends Command | @@ -56,7 +49,6 @@ class UpdateKeyword extends Command | ||
| 56 | public function handle(){ | 49 | public function handle(){ |
| 57 | $projectModel = new Project(); | 50 | $projectModel = new Project(); |
| 58 | $list = $projectModel->list(['is_upgrade'=>1,'delete_status'=>0]); | 51 | $list = $projectModel->list(['is_upgrade'=>1,'delete_status'=>0]); |
| 59 | - | ||
| 60 | foreach ($list as $v){ | 52 | foreach ($list as $v){ |
| 61 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | 53 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; |
| 62 | ProjectServer::useProject($v['id']); | 54 | ProjectServer::useProject($v['id']); |
| @@ -64,6 +56,7 @@ class UpdateKeyword extends Command | @@ -64,6 +56,7 @@ class UpdateKeyword extends Command | ||
| 64 | DB::disconnect('custom_mysql'); | 56 | DB::disconnect('custom_mysql'); |
| 65 | } | 57 | } |
| 66 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; | 58 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; |
| 59 | + return true; | ||
| 67 | } | 60 | } |
| 68 | 61 | ||
| 69 | 62 |
| @@ -47,7 +47,7 @@ class Kernel extends ConsoleKernel | @@ -47,7 +47,7 @@ class Kernel extends ConsoleKernel | ||
| 47 | // $schedule->command('website_data')->dailyAt('01:00')->withoutOverlapping(1); // 向AICC推送数据 | 47 | // $schedule->command('website_data')->dailyAt('01:00')->withoutOverlapping(1); // 向AICC推送数据 |
| 48 | // $schedule->command('project_file_pdf')->dailyAt('00:00')->withoutOverlapping(1); // 网站项目数据,生成PDF文件 | 48 | // $schedule->command('project_file_pdf')->dailyAt('00:00')->withoutOverlapping(1); // 网站项目数据,生成PDF文件 |
| 49 | $schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次 | 49 | $schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次 |
| 50 | - | 50 | + $schedule->command('update_keyword_route')->dailyAt('01:00')->withoutOverlapping(1); //升级项目--清除路由相同的关键字 |
| 51 | $schedule->command('recommended_suppliers')->dailyAt('03:00')->withoutOverlapping(1); //每天凌晨1点执行一次生成推荐商 | 51 | $schedule->command('recommended_suppliers')->dailyAt('03:00')->withoutOverlapping(1); //每天凌晨1点执行一次生成推荐商 |
| 52 | // 每日推送视频任务 | 52 | // 每日推送视频任务 |
| 53 | $schedule->command('video_task')->dailyAt('02:30')->withoutOverlapping(1); | 53 | $schedule->command('video_task')->dailyAt('02:30')->withoutOverlapping(1); |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :CNoticeController.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2023/9/12 10:04 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Controllers\Aside\Com; | ||
| 11 | + | ||
| 12 | + | ||
| 13 | +use App\Http\Controllers\Aside\BaseController; | ||
| 14 | +use App\Models\Domain\DomainInfo; | ||
| 15 | +use App\Models\Project\DeployBuild; | ||
| 16 | +use Illuminate\Http\Request; | ||
| 17 | + | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * @remark :通知C端 | ||
| 21 | + * @name :CNoticeController | ||
| 22 | + * @author :lyh | ||
| 23 | + * @method :post | ||
| 24 | + * @time :2023/9/12 10:38 | ||
| 25 | + */ | ||
| 26 | +class CNoticeController extends BaseController | ||
| 27 | +{ | ||
| 28 | + /** | ||
| 29 | + * 更新通知C端 | ||
| 30 | + * @param Request $request | ||
| 31 | + * @return \Illuminate\Http\JsonResponse | ||
| 32 | + */ | ||
| 33 | + public function sendNotify(Request $request) | ||
| 34 | + { | ||
| 35 | + //获取当前项目的域名 | ||
| 36 | + $domainModel = new DomainInfo(); | ||
| 37 | + $domainInfo = $domainModel->read(['project_id'=>$this->param['project_id']]); | ||
| 38 | + if($domainInfo === false){ | ||
| 39 | + //获取测试域名 | ||
| 40 | + $deployBuildModel = new DeployBuild(); | ||
| 41 | + $buildInfo = $deployBuildModel->read(['project_id'=>$this->param['project_id']]); | ||
| 42 | + $this->param['domain'] = $buildInfo['test_domain']; | ||
| 43 | + }else{ | ||
| 44 | + $this->param['domain'] = 'https://'.$domainInfo['domain'].'/'; | ||
| 45 | + } | ||
| 46 | + $url = $this->param['domain'].'api/update_page/'; | ||
| 47 | + $param = [ | ||
| 48 | + 'project_id' => $this->param['project_id'], | ||
| 49 | + 'type' => intval($request->input('type', 1)), | ||
| 50 | + 'route' => intval($request->input('page', 1)), | ||
| 51 | + 'url' => $request->input('url', []), | ||
| 52 | + 'language'=> $request->input('language', []), | ||
| 53 | + ]; | ||
| 54 | + http_post($url, json_encode($param)); | ||
| 55 | + $this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!'); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | +} |
| @@ -47,16 +47,16 @@ class ProductLogic extends BaseLogic | @@ -47,16 +47,16 @@ class ProductLogic extends BaseLogic | ||
| 47 | $this->param = $this->handleSaveParam($this->param); | 47 | $this->param = $this->handleSaveParam($this->param); |
| 48 | try { | 48 | try { |
| 49 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 49 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 50 | - $seo_mate = (array)$this->model->read(['id'=>$this->param['id']],['seo_mate'])['seo_mate']; | 50 | + |
| 51 | $is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0 | 51 | $is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0 |
| 52 | $six_read = $this->param['six_read'] ?? 0;//是否按6.0显示 | 52 | $six_read = $this->param['six_read'] ?? 0;//是否按6.0显示 |
| 53 | if($is_upgrade == 0 || $six_read == 1){ | 53 | if($is_upgrade == 0 || $six_read == 1){ |
| 54 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']); | 54 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_PRODUCT, $this->param['id'], $this->user['project_id']); |
| 55 | } | 55 | } |
| 56 | - if(!empty($seo_mate)){ | ||
| 57 | - $seo_mate['title'] = $this->param['title'] ?? ''; | ||
| 58 | - $this->param['seo_mate'] = json_encode($seo_mate,true); | 56 | + if(empty($this->param['seo_mate']['title'])){ |
| 57 | + $this->param['seo_mate']['title'] = $this->param['title'] ?? ''; | ||
| 59 | } | 58 | } |
| 59 | + $this->param['seo_mate'] = json_encode($this->param['seo_mate'],true); | ||
| 60 | $route = $this->param['route']; | 60 | $route = $this->param['route']; |
| 61 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 61 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 62 | $id = $this->param['id']; | 62 | $id = $this->param['id']; |
| @@ -14,6 +14,7 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -14,6 +14,7 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 14 | Route::any('/editPassword', [Aside\Com\IndexController::class, 'editPassword'])->name('admin.editPassword.white'); | 14 | Route::any('/editPassword', [Aside\Com\IndexController::class, 'editPassword'])->name('admin.editPassword.white'); |
| 15 | Route::get('/logout', [Aside\LoginController::class, 'logout'])->name('admin.logout.white'); | 15 | Route::get('/logout', [Aside\LoginController::class, 'logout'])->name('admin.logout.white'); |
| 16 | Route::any('/getAccessAddress', [Aside\LoginController::class, 'getAccessAddress'])->name('admin.getAccessAddress');//获取B端地址 | 16 | Route::any('/getAccessAddress', [Aside\LoginController::class, 'getAccessAddress'])->name('admin.getAccessAddress');//获取B端地址 |
| 17 | + Route::get('/sendNotify', [Aside\Com\CNoticeController::class, 'sendNotify'])->name('admin.sendNotify'); | ||
| 17 | 18 | ||
| 18 | //会员相关 | 19 | //会员相关 |
| 19 | Route::prefix('user')->group(function () { | 20 | Route::prefix('user')->group(function () { |
-
请 注册 或 登录 后发表评论