Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
7 个修改的文件
包含
26 行增加
和
14 行删除
| @@ -44,9 +44,9 @@ class ShareUser extends Command | @@ -44,9 +44,9 @@ class ShareUser extends Command | ||
| 44 | //获取所有ayr_share用户 | 44 | //获取所有ayr_share用户 |
| 45 | $ayr_share_model = new AyrShareModel(); | 45 | $ayr_share_model = new AyrShareModel(); |
| 46 | $ayr_release = new AyrReleaseModel(); | 46 | $ayr_release = new AyrReleaseModel(); |
| 47 | - $ayr_share_list = $ayr_share_model->list(['profile_key'=>['!=','']]); | 47 | + $ayr_share_list = $ayr_share_model->list(['profile_key'=>['!=',''],'project_id'=>410]); |
| 48 | foreach ($ayr_share_list as $v){ | 48 | foreach ($ayr_share_list as $v){ |
| 49 | - $time = Carbon::now()->modify('-7 days')->toDateString(); | 49 | + $time = Carbon::now()->modify('-1 days')->toDateString(); |
| 50 | //创建时间小于7天前的当前时间 | 50 | //创建时间小于7天前的当前时间 |
| 51 | if($v['created_at'] > $time){ | 51 | if($v['created_at'] > $time){ |
| 52 | continue; | 52 | continue; |
| @@ -47,7 +47,7 @@ class HtmlCollect extends Command | @@ -47,7 +47,7 @@ class HtmlCollect extends Command | ||
| 47 | 47 | ||
| 48 | public function handle() | 48 | public function handle() |
| 49 | { | 49 | { |
| 50 | - ini_set('memory_limit', '512M'); | 50 | + ini_set('memory_limit', '1024M'); |
| 51 | while (true) { | 51 | while (true) { |
| 52 | $this->start_collect(); | 52 | $this->start_collect(); |
| 53 | } | 53 | } |
| @@ -442,7 +442,12 @@ class HtmlCollect extends Command | @@ -442,7 +442,12 @@ class HtmlCollect extends Command | ||
| 442 | foreach ($source as $vs) { | 442 | foreach ($source as $vs) { |
| 443 | 443 | ||
| 444 | if ($vs['download']) { | 444 | if ($vs['download']) { |
| 445 | - $new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete']); | 445 | + if ($project_id == 1355 && in_array(substr($vs['url_complete'], -3), ['pdf', 'zip', 'rar', '.gz'])) { |
| 446 | + //项目id为1355的项目,可下载类资源要保持原名称,做特殊处理 | ||
| 447 | + $new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete'], '', '', 1); | ||
| 448 | + } else { | ||
| 449 | + $new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete']); | ||
| 450 | + } | ||
| 446 | if ($new_source) { | 451 | if ($new_source) { |
| 447 | CollectSource::insert([ | 452 | CollectSource::insert([ |
| 448 | 'project_id' => $project_id, | 453 | 'project_id' => $project_id, |
| @@ -29,6 +29,7 @@ class Kernel extends ConsoleKernel | @@ -29,6 +29,7 @@ class Kernel extends ConsoleKernel | ||
| 29 | $schedule->command('inquiry_delay')->everyMinute()->withoutOverlapping(1);//TODO::上线放开,转发询盘,每分钟执行一次 | 29 | $schedule->command('inquiry_delay')->everyMinute()->withoutOverlapping(1);//TODO::上线放开,转发询盘,每分钟执行一次 |
| 30 | $schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次 | 30 | $schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次 |
| 31 | // $schedule->command('domain_info')->dailyAt('01:20')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次 | 31 | // $schedule->command('domain_info')->dailyAt('01:20')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次 |
| 32 | + $schedule->command('share_user')->dailyAt('01:20')->withoutOverlapping(1);// 每天凌晨1点执行一次 | ||
| 32 | $schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息 | 33 | $schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息 |
| 33 | $schedule->command('update_seo_tdk_crontab')->dailyAt('20:00')->withoutOverlapping(1); //更新上线项目TDK | 34 | $schedule->command('update_seo_tdk_crontab')->dailyAt('20:00')->withoutOverlapping(1); //更新上线项目TDK |
| 34 | $schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次 | 35 | $schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次 |
| @@ -64,18 +64,13 @@ class AyrShareController extends BaseController | @@ -64,18 +64,13 @@ class AyrShareController extends BaseController | ||
| 64 | $str = json_encode($share_info['activeSocialAccounts']); | 64 | $str = json_encode($share_info['activeSocialAccounts']); |
| 65 | if($str != $info['bind_platforms']){ | 65 | if($str != $info['bind_platforms']){ |
| 66 | $ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str],$this->param['id']); | 66 | $ayrShareLogic->ayr_share_edit(['bind_platforms'=>$str],$this->param['id']); |
| 67 | - $res = true; | ||
| 68 | - }else{ | ||
| 69 | - $res = false; | ||
| 70 | } | 67 | } |
| 71 | }else{ | 68 | }else{ |
| 72 | if(!empty($info['bind_platforms'])){ | 69 | if(!empty($info['bind_platforms'])){ |
| 73 | $ayrShareLogic->ayr_share_edit(['bind_platforms'=>''],$this->param['id']); | 70 | $ayrShareLogic->ayr_share_edit(['bind_platforms'=>''],$this->param['id']); |
| 74 | - return true; | ||
| 75 | } | 71 | } |
| 76 | - $res = false; | ||
| 77 | } | 72 | } |
| 78 | - $this->response('success',Code::SUCCESS,['is_true'=>$res]); | 73 | + $this->response('success',Code::SUCCESS,$share_info['activeSocialAccounts'] ?? []); |
| 79 | } | 74 | } |
| 80 | /** | 75 | /** |
| 81 | * @name :(创建ayr_share账户)create_account | 76 | * @name :(创建ayr_share账户)create_account |
| @@ -13,6 +13,7 @@ use App\Http\Logic\Aside\BaseLogic; | @@ -13,6 +13,7 @@ use App\Http\Logic\Aside\BaseLogic; | ||
| 13 | use App\Models\CustomModule\CustomModule; | 13 | use App\Models\CustomModule\CustomModule; |
| 14 | use App\Models\CustomModule\CustomModuleCategory; | 14 | use App\Models\CustomModule\CustomModuleCategory; |
| 15 | use App\Models\CustomModule\CustomModuleContent; | 15 | use App\Models\CustomModule\CustomModuleContent; |
| 16 | +use App\Models\RouteMap\RouteMap; | ||
| 16 | use App\Services\ProjectServer; | 17 | use App\Services\ProjectServer; |
| 17 | use Illuminate\Support\Facades\DB; | 18 | use Illuminate\Support\Facades\DB; |
| 18 | 19 | ||
| @@ -84,9 +85,16 @@ class CustomModuleLogic extends BaseLogic | @@ -84,9 +85,16 @@ class CustomModuleLogic extends BaseLogic | ||
| 84 | * @time :2023/12/5 9:39 | 85 | * @time :2023/12/5 9:39 |
| 85 | */ | 86 | */ |
| 86 | public function moduleAdd(){ | 87 | public function moduleAdd(){ |
| 87 | - $rs = (new CustomModule())->add($this->param); | ||
| 88 | - if($rs === false){ | ||
| 89 | - $this->fail('系统错误,请联系管理员'); | 88 | + $id = (new CustomModule())->addReturnId($this->param); |
| 89 | + if($id){ | ||
| 90 | + //同时创建对应route的分类 | ||
| 91 | + $customModuleCateModel = new CustomModuleCategory(); | ||
| 92 | + $data = [ | ||
| 93 | + 'name'=>$this->param['route'], | ||
| 94 | + 'module_id'=>$id, | ||
| 95 | + 'route'=>RouteMap::setRoute($this->param['route'],RouteMap::SOURCE_MODULE_CATE,$id,$this->param['project_id']) | ||
| 96 | + ]; | ||
| 97 | + $customModuleCateModel->add($data); | ||
| 90 | } | 98 | } |
| 91 | return $this->success(); | 99 | return $this->success(); |
| 92 | } | 100 | } |
| @@ -68,6 +68,9 @@ class CustomTemplateLogic extends BaseLogic | @@ -68,6 +68,9 @@ class CustomTemplateLogic extends BaseLogic | ||
| 68 | if(($this->project['deploy_build']['is_search'] == 0) && ($this->param['url'] == 'search')){ | 68 | if(($this->project['deploy_build']['is_search'] == 0) && ($this->param['url'] == 'search')){ |
| 69 | $this->fail('请先开启搜索页可视化'); | 69 | $this->fail('请先开启搜索页可视化'); |
| 70 | } | 70 | } |
| 71 | + if(($this->project['deploy_build']['is_keyword'] == 0) && ($this->param['url'] == 'keyword')){ | ||
| 72 | + $this->fail('请先开启聚合页可视化'); | ||
| 73 | + } | ||
| 71 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 74 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 72 | $id = $this->param['id']; | 75 | $id = $this->param['id']; |
| 73 | $is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0 | 76 | $is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0 |
| @@ -316,7 +316,7 @@ class TranslateLogic extends BaseLogic | @@ -316,7 +316,7 @@ class TranslateLogic extends BaseLogic | ||
| 316 | if(strtolower($route) == 'all'){ | 316 | if(strtolower($route) == 'all'){ |
| 317 | return $this->success($data); | 317 | return $this->success($data); |
| 318 | } | 318 | } |
| 319 | - if($route == 'index'){ | 319 | + if($route == 'index' || $route == '/'){ |
| 320 | $data['source'] = 1; | 320 | $data['source'] = 1; |
| 321 | return $this->success($data); | 321 | return $this->success($data); |
| 322 | } | 322 | } |
-
请 注册 或 登录 后发表评论