作者 赵彬吉
正在显示 55 个修改的文件 包含 1184 行增加150 行删除
... ... @@ -16,6 +16,7 @@ use App\Models\Product\Keyword;
use App\Models\Product\Product;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
... ... @@ -87,7 +88,10 @@ class VideoTask extends Command
continue;
}
ProjectServer::useProject($task_project->project_id);
$keyword = $this->getProjectKeyword($task_project->num);
if(!empty($task_project->keywords)){
$task_project->keywords = explode(',',trim(',',$task_project->keywords));
}
$keyword = $this->getProjectKeyword($task_project->number,$task_project->keywords);
// 已经没有需要生成视频的关键词
if (!$keyword) {
$task_project->status = KeywordVideoTask::STATUS_CLOSE;
... ... @@ -95,13 +99,7 @@ class VideoTask extends Command
continue;
}
$logo_bg = $this->getImage($domainInfo);
$num = $task_project->num;
foreach ($keyword as $val) {
if($sub_task_num == 0){
$task_project->num = $num;
$task_project->save();
break;
}
$log = KeywordVideoTaskLog::where(['project_id' => $task_project->project_id, 'keyword_id' => $val->id])->first();
if ($log){
continue;
... ... @@ -120,19 +118,13 @@ class VideoTask extends Command
'created_at' => date('Y-m-d H:i:s'),
];
$rs = KeywordVideoTaskLog::insert($array);
if($rs){
$num--;
if($rs && ($sub_task_num > 0)){
$sub_task_num--;
}
}
}
if($sub_task_num != 0){
$task_project->num = $num;
if($num == 0){
$task_project->status = KeywordVideoTask::STATUS_CLOSE;
}
$task_project->save();
}
$task_project->status = KeywordVideoTask::STATUS_CLOSE;
$task_project->save();
}
return true;
}
... ... @@ -182,18 +174,27 @@ class VideoTask extends Command
* @param $number
* @return mixed
*/
public function getProjectKeyword($number)
public function getProjectKeyword($number,$keywords = [])
{
$keyword_arr_id = Keyword::where('video', null)->where('route', 'not like', '%-tag')->whereNotNull('keyword_content')->pluck('id')->toArray();
if(!empty($keywords)){
$keyword_id = Keyword::where('video', null)->whereIn("title", $keywords)
->where('route', 'not like', '%-tag')->whereNotNull('keyword_content')->pluck('id')->toArray();
if(count($keyword_id) == 0){
$keyword_arr_id = Keyword::where('video', null)->where('route', 'not like', '%-tag')
->whereNotNull('keyword_content')->orderBy('id','asc')->limit($number)->pluck('id')->toArray();
}else{
$keyword_arr_id = Keyword::where('video', null)->whereNotIn("title", $keywords)->where('route', 'not like', '%-tag')
->whereNotNull('keyword_content')->orderBy('id','asc')->limit($number - count($keyword_id))->pluck('id')->toArray();
$keyword_arr_id = array_merge($keyword_id,$keyword_arr_id);
}
}else{
$keyword_arr_id = Keyword::where('video', null)->where('route', 'not like', '%-tag')
->whereNotNull('keyword_content')->orderBy('id','asc')->limit($number)->pluck('id')->toArray();
}
if(count($keyword_arr_id) == 0){
return [];
}
if(count($keyword_arr_id) <= $number){
$keyword_id = array_rand($keyword_arr_id, count($keyword_arr_id));
}else{
$keyword_id = array_rand($keyword_arr_id, $number);
}
$keyword = Keyword::whereIn("id", $keyword_id)->get();
$keyword = Keyword::whereIn("id", $keyword_arr_id)->get();
return $keyword;
}
... ...
... ... @@ -446,6 +446,8 @@ class SyncProject extends Command
ProjectServer::createDatabase($project);
//创建表
ProjectServer::initTable();
//初始数据
ProjectServer::saveInitParam($project_id);
}
/**
... ...
... ... @@ -9,14 +9,13 @@
namespace App\Console\Commands\Suppliers;
use App\Models\Com\Purchaser;
use App\Models\Product\Keyword;
use App\Models\Project\DeployBuild;
use App\Models\Project\Project;
use App\Models\Purchaser\Purchaser;
use App\Models\Purchaser\PurchaserInfo;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class RecommendedSuppliers extends Command
{
... ... @@ -54,25 +53,25 @@ class RecommendedSuppliers extends Command
$project_list = $projectModel->list(['is_supplier'=>1]);//TODO::已开启推荐供应商
foreach ($project_list as $k => $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['project_id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
ProjectServer::useProject($v['project_id']);
$info = Keyword::inRandomOrder()->first();
if(empty($info)){
continue;
}
$keywordInfo = $this->getPurchaser($info['title']);
$keywordInfo = $this->getPurchaser($info->title,$v['project_id']);
if($keywordInfo !== false){
continue;
}
echo date('Y-m-d H:i:s') . '开始:'.$v['project_id'] . PHP_EOL;
$this->savePurchaser($v['id'],$info['title']);
$this->savePurchaser($v['project_id'],$info->title);
DB::disconnect('custom_mysql');
}
return true;
}
public function getPurchaser($keyword){
public function getPurchaser($keyword,$project_id){
$purchaserModel = new Purchaser();
return $purchaserModel->read(['keyword'=>$keyword]);
return $purchaserModel->read(['keyword'=>$keyword,'project_id'=>$project_id]);
}
/**
... ... @@ -83,7 +82,7 @@ class RecommendedSuppliers extends Command
* @time :2024/3/5 11:38
*/
public function savePurchaser($project_id,$keyword,$row = 10){
$url = 'https://admin.hagro.cn/api/company_list';
$url = 'https://fob.ai.cc/api/company_list';
$data = [
'prod_desc'=>$keyword,
'total'=>$row ?? 10,
... ... @@ -97,7 +96,9 @@ class RecommendedSuppliers extends Command
'total'=>$this->param['row'] ?? 10,
];
$res = http_post($url,json_encode($param));
if(!empty($res) && $res['code'] == 200){
echo date('Y-m-d H:i:s') . json_encode($res) . PHP_EOL;
if(!empty($res) && $res['code'] == 200 && !empty($res['data'])){
//保存多条数据
$saveData = [
'project_id'=>$project_id,
'keyword'=>$keyword,
... ... @@ -105,7 +106,31 @@ class RecommendedSuppliers extends Command
];
$purchaserModel = new Purchaser();
$purchaserModel->add($saveData);
$this->savePurchaserInfo($project_id,$keyword,$res['data']);
}
return true;
}
/**
* @remark :保存供应商详情
* @name :savePurchaserInfo
* @author :lyh
* @method :post
* @time :2024/5/29 16:38
*/
public function savePurchaserInfo($project_id,$keyword,$data){
$param = [];
foreach ($data as $k =>$v){
$v['project_id'] = $project_id;
$v['keyword'] = $keyword;
$v['email'] = json_encode($v['email'],JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
$v['mobile'] = json_encode($v['mobile'],JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
$v['social_media'] = json_encode($v['social_media'],JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
$v['created_at'] = date('Y-m-d H:i:s');
$v['updated_at'] = $v['created_at'];
$param[] = $v;
}
$purchaserInfoModel = new PurchaserInfo();
return $purchaserInfoModel->insert($param);
}
}
... ...
... ... @@ -33,11 +33,16 @@ class SyncFile extends Command
$errorFileModel = new ErrorFile();
$lists = $errorFileModel->list(['status'=>0]);//未同步成功的图片及文件
foreach ($lists as $k => $v){
$code = $this->synchronizationFile($v['path']);
if(strpos($v['path'], '/181/') !== false ){
$code = $this->synchronizationFiles($v['path']);
}else{
$code = $this->synchronizationFile($v['path']);
}
if((int)$code == 200){
echo date('Y-m-d H:i:s') . '编辑的path为:'. $v['path'] .',主键id:'. $v['id'] . PHP_EOL;
$errorFileModel->edit(['status'=>1],['id'=>$v['id']]);
}
}
echo date('Y-m-d H:i:s') . '编辑的end为:' . PHP_EOL;
return true;
... ... @@ -57,4 +62,13 @@ class SyncFile extends Command
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
return shell_exec($cmd);
}
public function synchronizationFiles($path_name){
//同步到大文件
$file_path = config('filesystems.disks.s3')['cdn'].$path_name;
$directoryPath = pathinfo($path_name, PATHINFO_DIRNAME);
$cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$directoryPath.'" https://v6-file.globalso.com/upload.php';
return shell_exec($cmd);
}
}
... ...
<?php
/**
* @remark :
* @name :PopularTemplateLabel.php
* @author :lyh
* @method :post
* @time :2024/6/3 17:00
*/
namespace App\Console\Commands\TemplateLabel;
use App\Models\Template\Template;
use App\Models\Template\TemplateLabel as TemplateLabelModel;
use App\Models\Template\TemplateModule;
use Illuminate\Console\Command;
class PopularTemplateLabel extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'popular_template_label';
/**
* The console command description.
*
* @var string
*/
protected $description = '设置热门label';
/**
* @remark :执行脚本
* @name :handle
* @author :lyh
* @method :post
* @time :2024/6/3 17:01
*/
public function handle(){
$this->setTemplate();
$this->setTemplateModule();
return true;
}
/**
* @remark :公共模块热门模块
* @name :setTemplate
* @author :lyh
* @method :post
* @time :2024/6/3 15:56
*/
public function setTemplate(){
$templateModel = new Template();
$info = $templateModel->list(['test_model'=>0,'number'=>['<>',0]],'number',['id'],'desc',50);
if(empty($info)){
return true;
}else{
//清除当前所有最新标签
$labelModel = new TemplateLabelModel();
$labelModel->del(['name'=>'热门','type'=>1]);
$data = [];
foreach ($info as $v){
$data[] = [
'name'=>'热门',
'type'=>1,
'template_id'=>$v['id'],
'manager_id'=>0,
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s')
];
}
//设置为最新
$labelModel->insert($data);
}
return true;
}
/**
* @remark :左侧模块
* @name :templateModule
* @author :lyh
* @method :post
* @time :2024/6/3 15:54
*/
public function setTemplateModule(){
$templateModuleModel = new TemplateModule();
$moduleInfo = $templateModuleModel->list(['test_model'=>0,'number'=>['<>',0]],'id',['id']);
if(empty($moduleInfo)){
return true;
}else{
//清除当前所有最新标签
$labelModel = new TemplateLabelModel();
$labelModel->del(['name'=>'热门','type'=>2]);
$moduleData = [];
foreach ($moduleInfo as $k => $v){
$moduleData[] = [
'name'=>'热门',
'type'=>2,
'template_id'=>$v['id'],
'manager_id'=>0,
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s')
];
}
//设置为最新
$labelModel->insert($moduleData);
}
return true;
}
}
... ...
<?php
/**
* @remark :
* @name :TemplateLabel.php
* @author :lyh
* @method :post
* @time :2024/6/3 11:33
*/
namespace App\Console\Commands\TemplateLabel;
use App\Models\Template\Template;
use App\Models\Template\TemplateModule;
use Illuminate\Console\Command;
use App\Models\Template\TemplateLabel as TemplateLabelModel;
class TemplateLabel extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'template_label';
/**
* The console command description.
*
* @var string
*/
protected $description = '设置label';
/**
* @remark :执行脚本
* @name :handle
* @author :lyh
* @method :post
* @time :2024/6/3 11:35
*/
public function handle(){
//获取最近7天模版的记录
$start_time = now()->subDays(90)->startOfDay()->toDateString();
$end_time = now()->startOfDay()->toDateString();
$this->setTemplateModule($start_time,$end_time);
$this->setTemplate($start_time,$end_time);
return true;
}
/**
* @remark :公共模块
* @name :setTemplate
* @author :lyh
* @method :post
* @time :2024/6/3 15:56
*/
public function setTemplate($start_time,$end_time){
$templateModel = new Template();
$info = $templateModel->list(['created_at'=>['between',[$start_time,$end_time]],'test_model'=>0],'id',['id']);
if(empty($info)){
return true;
}else{
//清除当前所有最新标签
$labelModel = new TemplateLabelModel();
$labelModel->del(['name'=>'最新','type'=>1]);
$data = [];
foreach ($info as $k => $v){
$data[] = [
'name'=>'最新',
'type'=>1,
'template_id'=>$v['id'],
'manager_id'=>0,
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s')
];
}
//设置为最新
$labelModel->insert($data);
}
return true;
}
/**
* @remark :左侧模块
* @name :templateModule
* @author :lyh
* @method :post
* @time :2024/6/3 15:54
*/
public function setTemplateModule($start_time,$end_time){
$templateModuleModel = new TemplateModule();
$moduleInfo = $templateModuleModel->list(['created_at'=>['between',[$start_time,$end_time]],'test_model'=>0],'id',['id']);
if(empty($moduleInfo)){
return true;
}else{
//清除当前所有最新标签
$labelModel = new TemplateLabelModel();
$labelModel->del(['name'=>'最新','type'=>2]);
$moduleData = [];
foreach ($moduleInfo as $k => $v){
$moduleData[] = [
'name'=>'最新',
'type'=>2,
'template_id'=>$v['id'],
'manager_id'=>0,
'created_at'=>date('Y-m-d H:i:s'),
'updated_at'=>date('Y-m-d H:i:s')
];
}
//设置为最新
$labelModel->insert($moduleData);
}
return true;
}
}
... ...
... ... @@ -8,12 +8,18 @@
namespace App\Console\Commands\Test;
use App\Models\Com\KeywordVideoTask;
use App\Models\File\File;
use App\Models\File\File as FileModel;
use App\Models\File\Image;
use App\Models\File\Image as ImageModel;
use App\Models\Product\Keyword;
use App\Models\Project\Project;
use App\Services\AmazonS3Service;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class Demo extends Command
... ... @@ -33,25 +39,25 @@ class Demo extends Command
protected $description = 'demo';
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$this->param['project_id'] = 181;
$imageModel = new ImageModel();
//获取当前项目的所有图片
$imageList = $imageModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos','size']);
if(!empty($imageList)){
$amazonS3Service = new AmazonS3Service();
foreach ($imageList as $k => $v){
$amazonS3Service->syncImageFiles(getImageUrl($v['path']));
$imageModel->edit(['is_cos'=>0],['id'=>$v['id']]);
}
}
// /**
// * Execute the job.
// *
// * @return void
// */
// public function handle()
// {
// $this->param['project_id'] = 181;
// $imageModel = new ImageModel();
// //获取当前项目的所有图片
// $imageList = $imageModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos','size']);
// if(!empty($imageList)){
// $amazonS3Service = new AmazonS3Service();
// foreach ($imageList as $k => $v){
// $amazonS3Service->syncImageFiles(getImageUrl($v['path']));
// $imageModel->edit(['is_cos'=>0],['id'=>$v['id']]);
// }
// }
//
// $fileModel = new FileModel();
// $fileList = $fileModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos','name']);
// if(!empty($fileList)){
... ... @@ -63,7 +69,73 @@ class Demo extends Command
// gc_collect_cycles();
// }
// }
// return true;
// }
public function handle(){
$keywordVideoModel = new KeywordVideoTask();
$project_id_arr = $keywordVideoModel::where('id','>',0)->pluck('project_id')->toArray();
$projectModel = new Project();
$list = $projectModel->list(['type'=>['!=',0],'delete_status'=>0,'id'=>['in',$project_id_arr]]);
$data = [];
foreach ($list as $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
$this->saveKeyword();
DB::disconnect('custom_mysql');
}
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
}
/**
* @remark :关键字有视频的改为1
* @name :getProductKeywordInfo
* @author :lyh
* @method :post
* @time :2024/5/31 9:54
*/
public function saveKeyword(){
$keywordModel = new Keyword();
$rs = $keywordModel->edit(['is_video_keyword'=>0],['video'=>'']);
echo date('Y-m-d H:i:s') . 'end'.$rs . PHP_EOL;
return true;
}
// public function handle(){
// //切换数据库配置
// ProjectServer::useProject(1862);
// return $this->initTable(1380,1862);
// }
//
// public function initTable($project_id, $news_project_id)
// {
// config(['database.connections.custom_tmp_mysql_copy.database' => 'gl_data_' . $project_id]);
// $database_name = DB::connection('custom_tmp_mysql_copy')->getDatabaseName();
// $tables = Schema::connection('custom_tmp_mysql_copy')->getAllTables();
// $tables = array_column($tables, 'Tables_in_' . $database_name);
// foreach ($tables as $table) {
// $has_table = Schema::connection('custom_mysql')->hasTable($table);
// if (!$has_table) {
// $sql = DB::connection('custom_tmp_mysql_copy')->select("SHOW CREATE TABLE {$table}");
// DB::connection('custom_mysql')->statement(array_values((array)$sql[0])[0]); // 修正此处的sql语句获取方式
// }
//
// if ($table == 'gl_customer_visit' || $table == 'gl_customer_visit_item' || $table == 'gl_inquiry_other' || $table == 'gl_inquiry_form_data' || $table == 'gl_inquiry_form') {
// continue;
// }
// DB::connection('custom_mysql')->table($table)->truncate(); // 清空目标表数据
// DB::connection('custom_mysql')->table($table)->insertUsing(
// [], // 列名数组,留空表示插入所有列
// function ($query) use ($table, $project_id) {
// $name = 'gl_data_' . $project_id . '.' . $table;
// $query->select('*')->from("{$name}");
// }
// );
//
// if (Schema::connection('custom_mysql')->hasColumn($table, 'project_id')) {
// DB::connection('custom_mysql')->table($table)->update(['project_id' => $news_project_id]);
// }
// }
// return true;
// }
}
... ...
... ... @@ -50,7 +50,7 @@ class UpdateProductCategory extends Command
public function handle(){
//获取所有项目
$projectModel = new Project();
$list = $projectModel->list(['id'=>['in',[621]]],'id',['id']);
$list = $projectModel->list(['id'=>['in',[1077]]],'id',['id']);
echo date('Y-m-d H:i:s') . ' start: ' . json_encode($list) . PHP_EOL;
try {
foreach ($list as $v) {
... ...
... ... @@ -20,6 +20,7 @@ use App\Models\RouteMap\RouteMap;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
/**
* @remark :更新所有项目的路由
... ... @@ -53,7 +54,7 @@ class UpdateRoute extends Command
*/
public function handle(){
$projectModel = new Project();
$list = $projectModel->list(['id'=>688]);
$list = $projectModel->list(['id'=>['in',[358,951]]]);
$data = [];
foreach ($list as $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
... ... @@ -119,14 +120,80 @@ class UpdateRoute extends Command
// $keywordModel->edit(['route'=>$route],['id'=>$v['id']]);
// }
}else{
echo date('Y-m-d H:i:s') . 'route :'.$v['id'] . PHP_EOL;
$route = Translate::tran($v['title'], 'en');
echo date('Y-m-d H:i:s') . 'route :'.$route . PHP_EOL;
$route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $v['project_id']);
$keywordModel->edit(['route'=>$route],['id'=>$v['id']]);
if(!empty($route)){
echo date('Y-m-d H:i:s') . $route . PHP_EOL;
$route = $this->setRoute($route, RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $v['project_id']);
$keywordModel->edit(['route'=>$route],['id'=>$v['id']]);
}
}
// echo date('Y-m-d H:i:s') . 'end :' . PHP_EOL;
echo date('Y-m-d H:i:s') . 'end :' . PHP_EOL;
}
}
}
/**
* @param $title
* @param $source
* @param $source_id
* @param int $project_id
* @return bool
* @throws \Exception
* @author zbj
* @date 2023/4/17
*/
public static function setRoute($title, $source, $source_id, $project_id = 0){
$route = self::generateRoute($title, $source, $source_id, $project_id);
if(!$route){
throw new \Exception('路由生成失败');
}
try {
$route_map = RouteMap::where('project_id', $project_id)->where('source_id', $source_id)->where('source', $source)->first();
if(!$route_map){
$route_map = new RouteMap();
$route_map->source = $source;
$route_map->source_id = $source_id;
$route_map->project_id = $project_id;
}
$route_map->route = $route;
$route_map->save();
}catch (\Exception $e){
throw new \Exception('路由映射失败');
}
return $route;
}
/**
* 生成路由标识
* @param $title
* @param $source
* @param $source_id
* @param $project_id
* @return string
* @author zbj
* @date 2023/4/17
*/
public static function generateRoute($title, $source, $source_id, $project_id){
$i=1;
$sign = generateRoute($title);
$length = strlen($sign);
if($length > 100){
$sign = trim(mb_substr($sign, 0, 100, 'UTF-8'),'-');
}
$info = RouteMap::where(['project_id' => $project_id, 'source' => $source, 'source_id'=>$source_id])->first();
$suffix = '';
if(empty($info)){
if($source == 'product'){
$suffix = '-product';
}
}
$route = $sign.$suffix;
while(RouteMap::isExist($route, $source_id, $project_id)){
$route = $sign .'-'.$i.$suffix;
$i++;
}
return $route;
}
/**
... ... @@ -278,4 +345,55 @@ class UpdateRoute extends Command
RouteMap::setRoute($v['route'],'product_keyword',$v['id'],569);
}
}
public function copyTable()
{
$sourceTable = 'gl_route_map';
$destinationTable = 'gl_route_map_copy';
if (!Schema::connection('custom_mysql')->hasTable($sourceTable)) {
$this->error("Source table {$sourceTable} does not exist.");
return false;
}
if (Schema::connection('custom_mysql')->hasTable($destinationTable)) {
Schema::connection('custom_mysql')->dropIfExists($destinationTable);
}
$columns = DB::connection('custom_mysql')->select(DB::raw("SHOW COLUMNS FROM {$sourceTable}"));
$columnsDefinition = collect($columns)->map(function($column) {
$columnDefinition = $column->Field . ' ' . $column->Type .
($column->Null === 'NO' ? ' NOT NULL' : '') .
($column->Default !== null ? " DEFAULT '" . $column->Default . "'" : '') .
($column->Extra ? ' ' . $column->Extra : '');
return $columnDefinition;
})->implode(', ');
// Add PRIMARY KEY to the id column
$primaryKey = collect($columns)->firstWhere('Field', 'id') ? 'PRIMARY KEY (id)' : '';
$columnsDefinition = $columnsDefinition . ($primaryKey ? ', ' . $primaryKey : '');
DB::connection('custom_mysql')->statement("CREATE TABLE {$destinationTable} ({$columnsDefinition})");
DB::connection('custom_mysql')->statement("INSERT INTO {$destinationTable} SELECT * FROM {$sourceTable}");
$this->info("Table {$sourceTable} has been copied to {$destinationTable} successfully.");
}
/**
* @remark :routeMap去重
* @name :routeMapDeduplication
* @author :lyh
* @method :post
* @time :2024/5/28 11:31
*/
public function routeMapDeduplication(){
$routeMapModel = new RouteMap();
$lists = $routeMapModel->list(['source'=>'product_keyword'],'id',['id'],'asc');
foreach ($lists as $v){
echo date('Y-m-d H:i:s') . '关键字id:'.$v['id'] . PHP_EOL;
//查询当前数据详情
$info = $routeMapModel->read(['id'=>$v['id']],['id','source_id']);
if($info !== false){
//删除其他一样的数据
$routeMapModel->del(['id'=>['!=',$info['id']],'source'=>'product_keyword','source_id'=>$info['source_id']]);
}
}
return true;
}
}
... ...
... ... @@ -15,6 +15,9 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
// 每日更新最新模块
// $schedule->command('template_label')->dailyAt('01:00')->withoutOverlapping(1);//最新模块
// $schedule->command('popular_template_label')->dailyAt('01:30')->withoutOverlapping(1);//热门模块
// $schedule->command('inspire')->hourly();
$schedule->command('remain_day')->dailyAt('09:00')->withoutOverlapping(1); // 项目剩余服务时长
$schedule->command('rank_data_task')->everyMinute()->withoutOverlapping(1); // 排名数据更新任务
... ... @@ -39,7 +42,7 @@ class Kernel extends ConsoleKernel
$schedule->command('forward_count')->monthlyOn(1,'01:00')->withoutOverlapping(1);//没月月初1号执行月统计转发询盘记录
$schedule->command('inquiry_delay')->everyMinute()->withoutOverlapping(1);//TODO::上线放开,转发询盘,每分钟执行一次
$schedule->command('inquiry_count')->dailyAt('01:00')->withoutOverlapping(1); // 询盘统计数据,每天凌晨执行一次
$schedule->command('domain_info')->dailyAt('01:20')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次
// $schedule->command('domain_info')->dailyAt('01:20')->withoutOverlapping(1);// 更新域名|证书结束时间,每天凌晨1点执行一次
$schedule->command('last_inquiry')->dailyAt('04:00')->withoutOverlapping(1);// 最近一次询盘信息
$schedule->command('update_seo_tdk_crontab')->dailyAt('20:00')->withoutOverlapping(1); //更新上线项目TDK
$schedule->command('sync_manager')->dailyAt('01:00')->withoutOverlapping(1); //TODO::手机号码同步 每天执行一次
... ...
... ... @@ -100,6 +100,7 @@ class NoticeController extends BaseController
$keyword->video = $video;
$keyword->embed_code = $embed_code;
$keyword->video_thumb = $thumb;
$keyword->is_video_keyword = 1;
$keyword->save();
DB::disconnect('custom_mysql');
return 200;
... ...
... ... @@ -4,6 +4,7 @@ namespace App\Http\Controllers\Api;
use App\Exceptions\InquiryFilterException;
use App\Models\Mail\Mail;
use App\Models\Project\DeployBuild;
use App\Models\Project\Project;
use App\Models\User\User;
use App\Models\Visit\SyncSubmitTask;
... ... @@ -124,4 +125,36 @@ class SelfSiteController extends BaseController
return $this->success([]);
}
/**
* 自建站上传验证文件接口
* @param Request $request
* @return false|string
* @author Akun
* @date 2024/05/28 11:47
*/
public function selfSiteVerify(Request $request)
{
$token = $request->header('token');//token
$pid = $request->header('pid');//项目id
$file_name = $request->input('file_name');//验证文件名称
$type = $request->input('type');//验证文件类型,1主站,2小语种站
if (empty($token) || empty($pid)) {
return $this->error('token无效', 401);
}
//判断token是否有效
$project_model = new Project();
$project_info = $project_model->read(['id' => $pid, 'site_token' => $token]);
if (!$project_info) {
return $this->error('token无效', 401);
}
$model = new DeployBuild();
$data = $type == 1 ? ['main_verify_file' => $file_name] : ['amp_verify_file' => $file_name];
$model->edit($data, ['project_id' => $pid]);
return $this->success([]);
}
}
... ...
... ... @@ -37,10 +37,12 @@ class V6UpdateLogController extends BaseController
*/
public function save(V6UpdateLogLogic $logic){
$this->request->validate([
'title' => 'required',
'version_id' => 'required',
'remark' => 'required',
'updated_date' => 'required',
], [
'title.required' => 'title不能为空',
'version_id.required' => '版本号version_id不能为空',
'remark.required' => '更新内容不能为空',
'updated_date.required' => '更新时间不能为空',
... ...
... ... @@ -9,6 +9,7 @@ use App\Http\Logic\Aside\Project\ProjectLogic;
use App\Models\Ai\AiPrefix;
use App\Models\ASide\APublicModel;
use App\Models\Channel\Channel;
use App\Models\Com\KeywordVideoTask;
use App\Models\Domain\DomainInfo;
use App\Models\Manage\ManageHr;
use App\Models\Project\DeployOptimize;
... ... @@ -194,6 +195,7 @@ class OptimizeController extends BaseController
'gl_project_deploy_optimize.design_mid AS design_mid',
'gl_project_deploy_optimize.start_date AS start_date',
'gl_project_deploy_optimize.backlink AS backlink',
'gl_project_deploy_optimize.ai_video AS ai_video',
'gl_domain_info.amp_status AS amp_status',
'gl_domain_info.domain AS domain',
];
... ... @@ -329,6 +331,9 @@ class OptimizeController extends BaseController
'project_id.required' => 'project_id不能为空',
]);
$projectModel = new Project();
if($this->param['robots'] != $projectModel::STATUS_ONE){
$this->response('robots只能开启不能关闭',Code::SYSTEM_ERROR);
}
$rs = $projectModel->edit(['robots'=>$this->param['robots']],['id'=>$this->param['project_id']]);
if($rs === false){
$this->response('执行错误,请联系开发人员',Code::SYSTEM_ERROR);
... ... @@ -390,4 +395,30 @@ class OptimizeController extends BaseController
$optimizeModel->edit(['backlink'=>$this->param['backlink']],['project_id'=>$this->param['project_id']]);
$this->response('success');
}
/**
* @remark :开启视频模块
* @name :setAiVideo
* @author :lyh
* @method :post
* @time :2024/5/30 10:30
*/
public function setAiVideo(){
$this->request->validate([
'project_id'=>'required',
'status'=>'required',
],[
'project_id.required' => 'project_id不能为空',
'status.required' => '状态不能为空',
]);
$keywordVideoModel = new KeywordVideoTask();
$info = $keywordVideoModel->read(['project_id'=>$this->param['project_id']]);
if($info === false){
$this->response('请先创建视频任务,才能开启',Code::SYSTEM_ERROR);
}
$keywordVideoModel->edit(['status'=>$this->param['status']],['project_id'=>$this->param['project_id']]);
$optimizeModel = new DeployOptimize();
$optimizeModel->edit(['ai_video'=>$this->param['status']],['project_id'=>$this->param['project_id']]);
$this->response('success');
}
}
... ...
... ... @@ -18,6 +18,7 @@ use App\Models\Channel\Channel;
use App\Models\Channel\User;
use App\Models\Channel\Zone;
use App\Models\Com\City;
use App\Models\Com\UpdateLog;
use App\Models\Devops\ServerConfig;
use App\Models\Domain\DomainInfo;
use App\Models\HomeCount\Count;
... ... @@ -366,6 +367,8 @@ class ProjectController extends BaseController
$item['article_num'] = ($data['blog'] ?? 0) + ($data['news'] ?? 0);
$item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN);
$item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]);
$item['collect_time'] = $item['is_upgrade'] ? UpdateLog::getProjectUpdate($item['id']) : '';
return $item;
}
... ...
<?php
/**
* Created by PhpStorm.
* User: zhl
* Date: 2024/5/28
* Time: 14:25
*/
namespace App\Http\Controllers\Aside\Task;
use App\Enums\Common\Code;
use App\Http\Controllers\Aside\BaseController;
use App\Models\Com\Notify;
use App\Models\Project\Project;
use App\Models\WebSetting\WebLanguage;
use Illuminate\Http\Request;
/**
* 自动任务信息
* Class AutoTaskController
* @package App\Http\Controllers\Aside\Task
*/
class AutoTaskController extends BaseController
{
/**
* 页面生成任务
* @param Request $request
* @return \Illuminate\Http\JsonResponse
*/
public function createHtmlTask(Request $request)
{
// 接收信息
$project_id = intval($request->input('project_id'));
$status = intval($request->input('status'));
$route = intval($request->input('route'));
$type = intval($request->input('type'));
$row = intval($request->input('row', 20));
// 所有参数都有初始化数据, 无数据验证
// 查询初始数据
$where = compact('project_id', 'route', 'type');
$where = array_filter($where);
if ($status)
$where['status'] = $status - 1;
$result = Notify::select(['id','project_id', 'type', 'data', 'status', 'route', 'num', 'updated_at', 'created_at'])
->where('id', '>', 84000) // 查询有效数据
->where('server_id', '<>', 9) // 过滤测试环境数据
->where('server_id', '>', 0) // 过滤测试环境数据
->where($where)
->orderBy('id', 'desc')
->paginate($row);
// 数据中需要处理项目信息
$project_ids = $result->pluck('project_id')->toArray();
$projects = Project::whereIN('id', $project_ids)->pluck('title', 'id')->toArray();
// 数据中需要处理的语种信息
$language = WebLanguage::pluck('chinese', 'id')->toArray();
// 数据中需要映射的参数信息
$type = Notify::typeMap();
$route = Notify::routeMap();
$status = Notify::statusMap();
// 转数组操作, 如果是对象, 添加字段会报错
$result = $result->toArray();
foreach ($result['list'] as &$val) {
// 解析data信息, 以后数据库尽量不要存需要处理的JSON信息, 拆分成指定字段
$data = json_decode($val['data'], true);
$val['language'] = [];
// 小语种 并且 有语种信息, 将语种转换成中文
if ($val['type'] == Notify::TYPE_MINOR && FALSE == empty($data['language'])) {
foreach ($data['language'] as $v) {
$val['language'][] = $language[$v];
}
}
// 映射信息 以及解析信息
$val['type'] = $type[$val['type']];
$val['route'] = $route[$val['route']];
$val['status'] = $status[$val['status']];
$val['project_title'] = $projects[$val['project_id']] ?? '';
$val['domain'] = $data['domain'] ?? '';
$val['url'] = FALSE == empty($data['url']) ? $data['url'] : [];
}
return $this->response('success', Code::SUCCESS, $result);
}
/**
* 页面生成任务参数
* @return \Illuminate\Http\JsonResponse
*/
public function createHtmlTaskParam()
{
$status = Notify::statusMap();
$status_new = [];
foreach ($status as $key=>$val) {
$status_new[$key+1] = $val;
}
$result = [
'status' => $status_new,
'type' => Notify::typeMap(),
'route' => Notify::routeMap()
];
return $this->response('success', Code::SUCCESS, $result);
}
}
\ No newline at end of file
... ...
... ... @@ -25,17 +25,14 @@ class ATemplateController extends BaseController
* @method :post
* @time :2023/6/28 16:34
*/
public function lists(ATemplateLogic $aTemplateLogic,TemplateLabel $templateLabel){
if(isset($this->map['label_name']) && !empty($this->map['label_name'])){
$id_arr = $templateLabel->formatQuery(['name'=>['like','%'.$this->map['label_name'].'%']])->pluck('template_id')->toArray();
$this->map['id'] = ['in',$id_arr];
unset($this->map['label_name']);
}
public function lists(ATemplateLogic $aTemplateLogic){
$templateLabel = new TemplateLabel();
$this->searchLabelName($templateLabel);
$filed = ['id','name','image','url','status','sort','deleted_status','test_model','created_at','project_id'];
$lists = $aTemplateLogic->aTemplateList($this->map,$this->page,$this->row,$this->order,$filed);
if(!empty($lists) && !empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
$v['label'] = $templateLabel->list(['template_id'=>$v['id']],'id',['id','name'],'desc',5);
$v['label'] = $templateLabel->list(['template_id'=>$v['id'],'type'=>1],'id',['id','name'],'desc',5);
$v['image_link'] = getImageUrl($v['image']);
$lists['list'][$k] = $v;
}
... ... @@ -44,6 +41,22 @@ class ATemplateController extends BaseController
}
/**
* @remark :搜索label
* @name :searchLabelName
* @author :lyh
* @method :post
* @time :2024/6/3 11:11
*/
public function searchLabelName($templateLabel){
if(isset($this->map['label_name']) && !empty($this->map['label_name'])){
$id_arr = $templateLabel->formatQuery(['name'=>['like','%'.$this->map['label_name'].'%'],'type'=>1])->pluck('template_id')->toArray();
$this->map['id'] = ['in',$id_arr];
unset($this->map['label_name']);
}
return true;
}
/**
* @remark :获取选择的模版
* @name :getTemplateInfo
* @author :lyh
... ...
... ... @@ -8,6 +8,8 @@ use App\Http\Logic\Aside\Template\ATemplateLogic;
use App\Http\Logic\Aside\Template\ATemplateModuleLogic;
use App\Http\Requests\Aside\Template\ATemplateModuleRequest;
use App\Models\Project\Project;
use App\Models\Template\TemplateLabel;
use App\Models\Template\TemplateModule;
/**
* @remark :左侧模块管理
... ... @@ -24,12 +26,38 @@ class ATemplateModuleController extends BaseController
* @method :post
* @time :2023/6/28 16:54
*/
public function lists(ATemplateModuleLogic $ATemplateModuleLogic){
$lists = $ATemplateModuleLogic->aTemplateModuleLists($this->map,$this->page,$this->row,$this->order);
public function lists(TemplateModule $templateModule){
$templateLabel = new TemplateLabel();
$this->map['deleted_status'] = 0;
$this->searchLabelName($templateLabel);
$lists = $templateModule->lists($this->map,$this->page,$this->row,$this->order);
if(!empty($lists) && !empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
$v['label'] = $templateLabel->list(['template_id'=>$v['id'],'type'=>2],'id',['id','name'],'desc',5);
$lists['list'][$k] = $v;
}
}
$this->response('success',Code::SUCCESS,$lists);
}
/**
* @remark :搜索label
* @name :searchLabelName
* @author :lyh
* @method :post
* @time :2024/6/3 11:11
*/
public function searchLabelName($templateLabel){
if(isset($this->map['label_name']) && !empty($this->map['label_name'])){
$id_arr = $templateLabel->formatQuery(['name'=>['like','%'.$this->map['label_name'].'%'],'type'=>2])->pluck('template_id')->toArray();
$this->map['id'] = ['in',$id_arr];
unset($this->map['label_name']);
}
return true;
}
/**
* @remark :左侧模块保存
* @name :save
* @author :lyh
... ...
... ... @@ -34,8 +34,10 @@ class TemplateLabelController extends BaseController
public function getUserLists(TemplateLabel $templateLabel){
$this->request->validate([
'template_id'=>'required',
'type'=>'required',
],[
'template_id.required' => '模版id不能为空',
'type.required' => '模版类型不能为空不能为空',
]);
$data = $templateLabel->list($this->map);
$this->response('success',Code::SUCCESS,$data);
... ...
... ... @@ -6,10 +6,7 @@ use App\Enums\Common\Code;
use App\Helper\Arr;
use App\Helper\Common;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Aside\Project\ProjectLogic;
use App\Http\Logic\Bside\User\UserLogic;
use App\Jobs\PurchaserJob;
use App\Models\Com\Purchaser;
use App\Models\CustomModule\CustomModule;
use App\Models\Project\DeployBuild;
use App\Models\Project\Project;
... ... @@ -18,7 +15,6 @@ use App\Models\User\ProjectMenu as ProjectMenuModel;
use App\Models\User\ProjectRole as ProjectRoleModel;
use App\Models\User\User;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Hash;
/***
* 当前为公共类
... ...
... ... @@ -96,6 +96,7 @@ class FileManageController extends BaseController
$cosService = new CosService();
$cosService->uploadFile($file,$path,$fileName);
$data['project_id'] = $this->user['project_id'];
$data['en_name'] = $fileName;
$data['path'] = $path.'/'.$fileName;
$rs = $fileManage->add($data);
if ($rs === false) {
... ... @@ -113,14 +114,16 @@ class FileManageController extends BaseController
*/
public function getOnlyFilename($name,$project_id = 0){
$nameArr = explode('.',$name);
$enName = generateRoute(Translate::tran($nameArr[0], 'en'));
$suffix = array_pop($nameArr) ?? 'txt';
$nameStr = implode('-', $nameArr);
$enName = generateRoute(Translate::tran($nameStr, 'en'));
$fileName = $enName;
$i=1;
while($this->onlyName($enName.'.'.$nameArr[1],$project_id)){
while($this->onlyName($enName.'.'.$suffix,$project_id)){
$enName = $fileName .'-'.$i;
$i++;
}
return $enName.'.'.$nameArr[1];
return $enName.'.'.$suffix;
}
/**
... ... @@ -154,7 +157,7 @@ class FileManageController extends BaseController
if(!in_array($extension, explode(',', $this->upload_config['allow_file_type']))){
$this->fail('不允许上传的文件类型');
}
$hash = hash_file('md5', $file->getPathname());
$hash = hash_file('sha256', $file->getPathname());
$info = FileManage::where('hash', $hash)->first();
if($info){
$this->fail('文件已上传,文件名称.'.$info['name']);
... ...
... ... @@ -201,4 +201,26 @@ class KeywordController extends BaseController
}
$this->response('success');
}
/**
* @remark :批量操作关键字是否展示视频
* @name :batchKeywordIsVideo
* @author :lyh
* @method :post
* @time :2024/5/30 14:29
*/
public function batchKeywordIsVideo(){
$this->request->validate([
'title'=>['required','array', 'max:500']
],[
'title.required' => 'title不能为空',
'title.array' => 'title为数组',
'title.max' => '批量操作不能超过500条数据'
]);
$keywordModel = new Keyword();
foreach ($this->param['title'] as $v){
$keywordModel->edit(['is_video_keyword'=>$this->param['is_video_keyword']],['title'=>$v]);
}
$this->response('success');
}
}
... ...
... ... @@ -55,12 +55,12 @@ class ProductController extends BaseController
if(!empty($lists)){
$lists = $lists->toArray();
$cate_data = $this->getCategoryList();//分类
$key_data = $this->getKeywordsList();//关键字
$key_data = $this->keywordNameLists($lists['list']);//关键字
$template_id = $this->getTemplateId(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL);//获取模版id
$userModel = new User();
foreach ($lists['list'] as $k=>$v){
$v['url'] = $this->user['domain'] . getRouteMap(RouteMap::SOURCE_PRODUCT,$v['id']);;
$v['category_id_text'] = $this->categoryName($v['category_id'],$cate_data);
$v['category_id_text'] = $this->categoryName($v['id'],$cate_data);
$v['keyword_id_text'] = $this->keywordName($v['keyword_id'],$key_data);
$v['created_uid_text'] = $userModel->getName($v['created_uid']);
$v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL,$template_id,$v['id']);
... ... @@ -72,6 +72,30 @@ class ProductController extends BaseController
}
/**
* @remark :获取当前页的所有关键字名称
* @name :keywordNameLists
* @author :lyh
* @method :post
* @time :2024/6/3 14:24
*/
public function keywordNameLists($lists){
$keywordId = [];
foreach ($lists as $v){
$keywordId = array_merge($keywordId,$v['keyword_id']);
}
$keywordId = array_values(array_unique($keywordId));
$keywordModel = new Keyword();
$data = [];
$cateList = $keywordModel->list(['id' => ['in',$keywordId]], ['id', 'title']);
if (!empty($cateList)) {
foreach ($cateList as $value) {
$data[$value['id']] = $value['title'];
}
}
return $data;
}
/**
* @remark :不分页产品列表
* @name :productNoPage
* @author :lyh
... ... @@ -220,7 +244,9 @@ class ProductController extends BaseController
* @method :post
* @time :2023/9/14 13:58
*/
public function categoryName($category_id,$data){
public function categoryName($product_id,$data){
$cateRelatedModel = new CategoryRelated();
$category_id = $cateRelatedModel->where('product_id',$product_id)->pluck('cate_id')->toArray();
$category_name = '';
if(!empty($category_id) && !empty($data)){
foreach ($category_id as $v){
... ...
... ... @@ -11,7 +11,7 @@ namespace App\Http\Controllers\Bside\Suppliers;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Models\Com\Purchaser;
use App\Models\Purchaser\Purchaser;
/**
* @remark :推荐采购商
... ... @@ -38,11 +38,13 @@ class SuppliersController extends BaseController
$lists = $purchaserModel->list($this->map);
if(!empty($lists)){
foreach ($lists as $v){
$resultData = json_decode($v['data']);
foreach ($resultData as $value){
$value = (array)$value;
$value['keyword'] = $v['keyword'];
$data[] = $value;
if(!empty($v['data'])){
$resultData = json_decode($v['data'],true);
foreach ($resultData as $value){
$value = (array)$value;
$value['keyword'] = $v['keyword'];
$data[] = $value;
}
}
}
}
... ...
<?php
/**
* @remark :
* @name :TemplateLabelController.php
* @author :lyh
* @method :post
* @time :2024/5/16 9:51
*/
namespace App\Http\Controllers\Bside\Template;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\BTemplate\BTemplateLabelLogic;
use App\Models\Template\TemplateLabel;
/**
* @remark :
* @name :TemplateLabelController
* @author :lyh
* @method :post
* @time :2024/5/16 9:51
*/
class BTemplateLabelController extends BaseController
{
/**
* @remark :获取模版的标签
* @name :lists
* @author :lyh
* @method :post
* @time :2024/5/16 10:15
*/
public function getUserLists(TemplateLabel $templateLabel){
$this->request->validate([
'template_id'=>'required',
'type'=>'required',
],[
'template_id.required' => '模版id不能为空',
'type.required' => '模版类型不能为空不能为空',
]);
$data = $templateLabel->list($this->map);
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :保存标签
* @name :save
* @author :lyh
* @method :post
* @time :2024/5/16 9:53
*/
public function save(BTemplateLabelLogic $labelLogic){
$this->request->validate([
'name'=>'required | max:200',
'type'=>'required',
'template_id'=>'required',
],[
'name.required' => '标签名称不能为空',
'type.required' => '模版类型不能为空不能为空',
'template_id.required' => '模版ID不能为空不能为空',
]);
$data = $labelLogic->saveLabel();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :删除数据
* @name :del
* @author :lyh
* @method :post
* @time :2024/5/16 10:08
*/
public function del(BTemplateLabelLogic $labelLogic){
$this->request->validate([
'id'=>'required',
],[
'id.required' => '主键不能为空',
]);
$data = $labelLogic->delLabel();
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -7,6 +7,7 @@ use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\BTemplate\BTemplateModuleLogic;
use App\Http\Logic\Bside\BTemplate\BTemplateModuleProjectLogic;
use App\Models\Template\BModuleProject;
use App\Models\Template\TemplateLabel;
/**
* @remark :左侧模块管理
... ... @@ -62,4 +63,21 @@ class BTemplateModuleController extends BaseController
$list = $BTemplateModuleLogic->ModuleType($this->map);
$this->response('success',Code::SUCCESS,$list);
}
/**
* @remark :设置数量
* @name :setModuleNumber
* @author :lyh
* @method :post
* @time :2024/6/3 16:50
*/
public function setModuleNumber(){
$this->request->validate([
'id'=>'required',
],[
'id.required' => 'id不能为空',
]);
$this->model->where('id', $this->param['id'])->increment('number');
$this->response('success');
}
}
... ...
... ... @@ -110,7 +110,7 @@ class FileController
* @time :2023/6/17 16:32
*/
public function single(&$files){
$hash = hash_file('md5', $files->getPathname());
$hash = hash_file('sha256', $files->getPathname());
$name = $files->getClientOriginalName();
//查看文件是否存在
$fileModel = new File();
... ... @@ -195,7 +195,7 @@ class FileController
*/
public function api_upload_single(&$files)
{
$hash = hash_file('md5', $files->getPathname());
$hash = hash_file('sha256', $files->getPathname());
$name = $files->getFilename();
//查看文件是否存在
$fileModel = new File();
... ... @@ -277,7 +277,7 @@ class FileController
foreach ($files as $file) {
$fileModel = new File();
$name = $file->getClientOriginalName();
$hash = hash_file('md5', $file->getPathname());
$hash = hash_file('sha256', $file->getPathname());
$param = ['hash'=>$hash,'refer'=>$this->param['refer'] ?? 0,'is_cos'=>(($this->upload_location == 0) ? 1 : 0)];
if(isset($this->cache['project_id']) && !empty($this->cache['project_id'])){
$param['project_id'] = $this->cache['project_id'];
... ... @@ -347,7 +347,7 @@ class FileController
// 设置响应头
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . $info['name'] . '"');
header('Content-Disposition: attachment; filename="' . !empty($info['name']) ? $info['name'] : '未命名'.basename($info['path']) . '"');
// 下载文件
readfile($fileUrl);
}
... ...
... ... @@ -184,7 +184,7 @@ class ImageController extends Controller
* @time :2023/6/17 16:30
*/
public function single(&$files){
$hash = hash_file('md5', $files->getPathname());
$hash = hash_file('sha256', $files->getPathname());
$name = $files->getClientOriginalName();
//查看文件是否存在
$imageModel = new ImageModel();
... ... @@ -326,7 +326,7 @@ class ImageController extends Controller
$data = [];
foreach ($files as $file) {
$imageModel = new ImageModel();
$hash = hash_file('md5', $file->getPathname());
$hash = hash_file('sha256', $file->getPathname());
$name = $file->getClientOriginalName();
//查看图片是否已上传
$param = ['hash'=>$hash,'refer'=>$this->param['refer'] ?? 0,'is_cos'=>(($this->upload_location == 0) ? 1 : 0)];
... ...
... ... @@ -267,6 +267,7 @@ class DomainInfoLogic extends BaseLogic
$this->fail('请切换服务器,生成站点不能使用测试服务器');
}
if($project_info['serve_id'] == ServerConfig::SELF_SITE_ID){
$this->model->edit(['amp_status' => $this->param['amp_status'] ?? 0,],['id'=>$this->param['id']]);
$this->fail('自建站服务器无法生成站点');
}
//域名是否都已经解析
... ...
... ... @@ -100,17 +100,7 @@ class ProjectLogic extends BaseLogic
$info['deploy_build']['other_project']= json_decode($info['deploy_build']['other_project']);
}
//升级项目采集完成时间
$collect_time = '';
if($info['is_upgrade'] == 1){
$collect_un_count = UpdateLog::where('project_id',$id)->where('collect_status',0)->count();
if($collect_un_count > 0){
$collect_time = '采集中';
}else{
$collect_info = UpdateLog::where('project_id',$id)->orderBy('updated_at','desc')->first();
$collect_time = $collect_info->updated_at->format('Y-m-d H:i:s');
}
}
$info['collect_time'] = $collect_time;
$info['collect_time'] = $info['is_upgrade'] ? UpdateLog::getProjectUpdate($id) : '';
return $this->success($info);
}
... ... @@ -186,9 +176,6 @@ class ProjectLogic extends BaseLogic
* @time :2023/8/30 12:14
*/
public function saveProject($param){
if($param['type'] == Project::TYPE_ONE){
$param['serve_id'] = 9;
}
if((($param['type'] == Project::TYPE_TWO) || ($param['type'] == Project::TYPE_THREE)) && empty($param['uptime'])){
$param['uptime'] = date('Y-m-d H:i:s');
}
... ... @@ -274,8 +261,6 @@ class ProjectLogic extends BaseLogic
protected function saveProjectDeployBuild($deploy_build){
$deployBuildModel = new DeployBuild();
$deploy_build['configuration'] = Arr::a2s(!empty($deploy_build['configuration']) ? $deploy_build['configuration'] : []);
$deploy_build['main_verify_file'] = $deploy_build['main_verify_file'] ?? '';
$deploy_build['amp_verify_file'] = $deploy_build['amp_verify_file'] ?? '';
$deployBuildModel->edit($deploy_build,['id'=>$deploy_build['id']]);
return $this->success();
}
... ...
... ... @@ -22,19 +22,6 @@ class ATemplateModuleLogic extends BaseLogic
}
/**
* @remark :左侧模块列表
* @name :aTemplateModuleLists
* @author :lyh
* @method :post
* @time :2023/6/28 18:01
*/
public function aTemplateModuleLists($map,$page,$row,$order = 'created_at',$filed = ['*']){
$map['deleted_status'] = 0;
$lists = $this->model->lists($map,$page,$row,$order,$filed);
return $this->success($lists);
}
/**
* @remark :保存左侧模块
* @name :aTemplateModuleSave
* @author :lyh
... ...
... ... @@ -60,7 +60,7 @@ class UserLogic extends BaseLogic
}
$this->param = $this->editPassword($this->param);
$rs = $this->model->edit($this->param, ['id' => $this->param['id']]);
DB::table('gl_user_edit_log')->insert(['message'=>json_encode($this->param),'user_id'=>$this->manager['id'],'project_id'=>$this->user['project_id'],'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')]);
DB::table('gl_user_edit_log')->insert(['message'=>json_encode($this->param),'user_id'=>$this->manager['id'],'project_id'=>$info['project_id'],'created_at'=>date('Y-m-d H:i:s'),'updated_at'=>date('Y-m-d H:i:s')]);
} else {
$this->param['password'] = base64_encode(md5($this->param['password']));
$rs = $this->model->add($this->param);
... ...
... ... @@ -45,9 +45,12 @@ class AyrReleaseLogic extends BaseLogic
}
$this->param['result_data'] = $res;
$this->param['platforms'] = json_encode($this->param['platforms']);
$rs = $this->model->add($this->param);
if($rs === false){
$this->fail('error');
$info = $this->model->read(['platforms'=>$this->param['platforms'],'operator_id'=>$this->param['operator_id'],'project_id'=>$this->param['project_id'],'title'=>$this->param['title']]);
if($info === false){
$rs = $this->model->add($this->param);
if($rs === false){
$this->fail('error');
}
}
return $this->success();
}
... ...
<?php
/**
* @remark :
* @name :TemplateLabelLogic.php
* @author :lyh
* @method :post
* @time :2024/5/16 9:54
*/
namespace App\Http\Logic\Bside\BTemplate;
use App\Http\Logic\Aside\BaseLogic;
use App\Models\Template\TemplateLabel;
/**
* @remark :模版标签
* @name :TemplateLabelLogic
* @author :lyh
* @method :post
* @time :2024/5/16 9:54
*/
class BTemplateLabelLogic extends BaseLogic
{
/**
* 初始化数据
*/
public function __construct()
{
parent::__construct();
$this->model = new TemplateLabel();
$this->param = $this->requestAll;
}
/**
* @remark :保存标签
* @name :saveLabel
* @author :lyh
* @method :post
* @time :2024/5/16 9:55
*/
public function saveLabel(){
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
$info = $this->model->read(['name'=>$this->param['name'],'template_id'=>$this->param['template_id'],'id'=>['!=',$id]],['id']);
if($info === false){
$this->model->edit($this->param,['id'=>$id]);
}
}else{
$info = $this->model->read(['name'=>$this->param['name'],'template_id'=>$this->param['template_id']],['id']);
if($info === false){
$this->param['manager_id'] = $this->manager['id'];
$id = $this->model->addReturnId($this->param);
}else{
$id = $info['id'];
}
}
return $this->success(['id'=>$id]);
}
/**
* @remark :删除标签
* @name :delLabel
* @author :lyh
* @method :post
* @time :2024/5/16 10:03
*/
public function delLabel(){
$rs = $this->model->del($this->param);
if($rs === false){
$this->fail('删除失败,请联系管理员');
}
return $this->success();
}
}
... ...
... ... @@ -3,6 +3,7 @@
namespace App\Http\Logic\Bside\BTemplate;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Template\TemplateLabel;
use App\Models\Template\TemplateModule;
use App\Models\Template\TemplateType;
... ... @@ -25,8 +26,13 @@ class BTemplateModuleLogic extends BaseLogic
public function ModuleList($map,$order = 'created_at',$filed = ['id','name','type','sort','status','image','test_model']){
$map['deleted_status'] = 0;
$map['status'] = 0;
$lists = $this->model->list($map,$order,$filed);
return $this->success($lists);
$list = $this->model->list($map,$order,$filed);
$templateLabel = new TemplateLabel();
foreach ($list as $k => $v){
$v['label'] = $templateLabel->list(['template_id'=>$v['id'],'type'=>2],'id',['id','name'],'desc',5);
$list[$k] = $v;
}
return $this->success($list);
}
/**
... ...
... ... @@ -9,6 +9,7 @@ use App\Models\Service\Service as ServiceSettingModel;
use App\Models\Template\BCustomTemplate;
use App\Models\Template\BTemplateCommon;
use App\Models\Template\BTemplateLog;
use App\Models\Template\BTemplateMain;
use App\Models\Template\Setting;
use App\Models\Template\BTemplate;
... ... @@ -83,6 +84,13 @@ class CustomTemplateLogic extends BaseLogic
if($this->param['url'] == $this->model::NOT_FOUND_PAGE_URL){
$this->fail('404页面已存在');
}
if($this->param['url'] == 'search'){
$bTemplateMainModel = new BTemplateMain();
$mainInfo = $bTemplateMainModel->read(['type'=>8]);
if($mainInfo !== false){
$this->param['html'] = $mainInfo['main_html'];
}
}
$this->param['project_id'] = $this->user['project_id'];
$id = $this->model->addReturnId($this->param);
$route = RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $id, $this->user['project_id']);
... ...
... ... @@ -331,6 +331,16 @@ class BlogLogic extends BaseLogic
$seo_description = substr(strip_tags($data[8]),0,200);
}
$release_at = date('Y-m-d H:i:s');
if($data[9]??''){
$release_at = date('Y-m-d H:i:s',strtotime($data[9]));
}
$sort = 10;
if($data[10]??''){
$sort = $data[10];
}
$id = $this->model->addReturnId(
[
'name' => $data[0],
... ... @@ -345,7 +355,9 @@ class BlogLogic extends BaseLogic
'operator_id' => $user_id,
'create_id' => $user_id,
'status' => Blog::STATUS_ONE,
'url' => ''
'url' => '',
'release_at' => $release_at,
'sort' => $sort
]
);
//更新路由
... ... @@ -354,7 +366,7 @@ class BlogLogic extends BaseLogic
if (!$route_map) {
$route_map = new RouteMap();
$route_map->project_id = $project_id;
$route_map->path = RouteMap::SOURCE_BLOG.'s';
$route_map->path = RouteMap::SOURCE_BLOG;
$route_map->source = RouteMap::SOURCE_BLOG;
$route_map->source_id = $id;
$route_map->route = $route;
... ...
... ... @@ -372,6 +372,16 @@ class NewsLogic extends BaseLogic
$seo_description = substr(strip_tags($data[8]),0,200);
}
$release_at = date('Y-m-d H:i:s');
if($data[9]??''){
$release_at = date('Y-m-d H:i:s',strtotime($data[9]));
}
$sort = 10;
if($data[10]??''){
$sort = $data[10];
}
$id = $this->model->addReturnId(
[
'name' => $data[0],
... ... @@ -386,7 +396,9 @@ class NewsLogic extends BaseLogic
'operator_id' => $user_id,
'create_id' => $user_id,
'status' => News::STATUS_ONE,
'url' => ''
'url' => '',
'release_at' => $release_at,
'sort' => $sort
]
);
//更新路由
... ...
... ... @@ -244,12 +244,6 @@ class CategoryLogic extends BaseLogic
$str = ','.implode(',',$category).',';
}
return $str;
// if(isset($category) && !empty($category)){
// foreach ($category as $v){
// $str .= $v.',';
// }
// }
// return !empty(trim($str,',')) ? ','.$str.',' : '';
}
/**
... ...
... ... @@ -165,10 +165,15 @@ class KeywordLogic extends BaseLogic
$ids = $this->param['ids'];
$productModel = new Product();
foreach ($ids as $id){
$product_info = $productModel->read(['keyword_id'=>['like','%,'.$id.',%']]);
if($product_info !== false){
$this->fail('当前关键词拥有产品不允许删除');
}
$replace_id = ','.$id.',';
$productModel->where('keyword_id', 'like', '%,' . $id . ',%')
->update([
'keyword_id' => DB::raw("REPLACE(keyword_id, '$replace_id' , ',')")
]);
$productModel->where('keyword_id', ',')
->update([
'keyword_id' => DB::raw("REPLACE(keyword_id, ',' , '')")
]);
$this->delRoute($id);
$this->model->del(['id'=>$id]);
}
... ...
... ... @@ -303,7 +303,7 @@ class TranslateLogic extends BaseLogic
if(strtolower($route) == 'all'){
return $this->success($data);
}
if($route == '/'){
if($route == 'index'){
$data['source'] = 1;
return $this->success($data);
}
... ...
... ... @@ -56,6 +56,10 @@ class UserLoginLogic
}
$projectModel = new Project();
$project_list = $projectModel->list(['id'=>['in',$projectArr],'delete_status'=>0],'id',['id','title']);
foreach ($project_list as $k => $v){
$v['domain'] = (new DomainInfo())->getProjectIdDomain($v['id']);
$project_list[$k] = $v;
}
return $this->success($project_list);
}
... ...
... ... @@ -25,7 +25,7 @@ class BlogRequest extends FormRequest
{
return [
'name'=>'required|max:200',
// 'remark'=>'max:500',
'seo_keywords'=>'max:1000',
'url'=>'required',
];
}
... ... @@ -36,7 +36,7 @@ class BlogRequest extends FormRequest
'name.required'=>'请填写名称',
'name.max'=>'名称超过最长长度200',
'url.required'=>'链接不能为空',
// 'remark.max'=>'描述超过最长长度500'
'seo_keywords.max'=>'seo_keywords太长,请重新编辑'
];
}
}
... ...
... ... @@ -69,10 +69,11 @@ class CopyProjectJob implements ShouldQueue
$settingTemplateModel = new Setting();
$settingData = $settingTemplateModel::where('project_id', $this->param['project_id'])->first();
if(!empty($settingData)){
$settingData = $settingData->getAttributes();
unset($settingData['id']);
$settingData['project_id'] = $project_id;
$settingTemplateModel->insert($settingData);
$data = [
'template_id' =>$settingData['template_id'],
'project_id' => $project_id
];
$settingTemplateModel->add($data);
}
//复制部署表
$buildModel = new DeployBuild();
... ...
... ... @@ -13,6 +13,8 @@ class Notify extends Base
const STATUS_INIT = 0;
const STATUS_FINISH_ROUTE = 1;
const STATUS_FINISH_PAGE = 2;
const STATUS_FINISH_SITEMAP = 3;
const STATUS_ERROR = 9;
/**
* 类型 1:主站, 2:小语种, 3:amp
... ... @@ -36,4 +38,48 @@ class Notify extends Base
const ROUTE_PRODUCT_KEYWORD = 4;
const ROUTE_NOT_TRANSLATE = 5;
const ROUTE_PRODUCT_VIDEO_KEYWORD = 6;
/**
* 类型
* @return array
*/
public static function typeMap()
{
return [
self::TYPE_MASTER => '主站',
self::TYPE_MINOR => '小语种',
self::TYPE_AMP => 'AMP',
];
}
/**
* 生成目标页面
* @return array
*/
public static function routeMap()
{
return [
self::ROUTE_ALL => '主站页面',
self::ROUTE_NEED => '更新页面',
self::ROUTE_URL => '指定路由',
self::ROUTE_PRODUCT_KEYWORD => '聚合页面',
self::ROUTE_NOT_TRANSLATE => '漏翻检查',
self::ROUTE_PRODUCT_VIDEO_KEYWORD => '视频聚合页'
];
}
/**
* 状态
* @return array
*/
public static function statusMap()
{
return [
self::STATUS_INIT => '排队中',
self::STATUS_FINISH_ROUTE => '页面生成中',
self::STATUS_FINISH_PAGE => 'sitemap生成中',
self::STATUS_FINISH_SITEMAP => '完成',
self::STATUS_ERROR => 'sitemap生成失败',
];
}
}
... ...
... ... @@ -61,4 +61,26 @@ class UpdateLog extends Model
return true;
}
/**
* 获取项目当前采集情况
* @param $project_id
* @return string
* @author Akun
* @date 2024/05/27 17:04
*/
public static function getProjectUpdate($project_id)
{
$collect_time = '';
$collect_un_count = UpdateLog::where('project_id', $project_id)->where('collect_status', 0)->count();
if ($collect_un_count > 0) {
$collect_time = '采集中';
} else {
$collect_info = UpdateLog::where('project_id', $project_id)->orderBy('updated_at', 'desc')->first();
if(!empty($collect_info)){
$collect_time = $collect_info->updated_at->format('Y-m-d H:i:s');
}
}
return $collect_time;
}
}
... ...
... ... @@ -68,6 +68,21 @@ class DomainInfo extends Base
}
/**
* @remark :根据项目id获取域名
* @name :getProjectIdDomain
* @author :lyh
* @method :post
* @time :2024/5/29 9:28
*/
public function getProjectIdDomain($project_id){
$info = $this->read(['project_id'=>$project_id],['domain']);
if($info === false){
return '';
}
return 'https://'.$info['domain'].'/';
}
/**
* @remark :301跳转扩展字段
* @name :getExtendConfigAttribute
* @author :lyh
... ...
... ... @@ -87,6 +87,7 @@ class Project extends Base
9 => '星链网站(2年版)',
11 => '俄语标准版',
12 => '俄语商务版',
14 => '俄语旗舰版',
13 => '体验版'
];
}
... ...
... ... @@ -7,7 +7,7 @@
* @time :2024/3/4 14:39
*/
namespace App\Models\Com;
namespace App\Models\Purchaser;
use App\Models\Base;
... ...
<?php
/**
* @remark :
* @name :PurchaserInfo.php
* @author :lyh
* @method :post
* @time :2024/5/29 16:57
*/
namespace App\Models\Purchaser;
use App\Models\Base;
class PurchaserInfo extends Base
{
protected $table = 'gl_purchaser_info';
}
... ...
... ... @@ -58,6 +58,7 @@ class RouteMap extends Base
}elseif(preg_match('/^[\x{0400}-\x{04FF}]+$/u', $title)){
$title = Translate::tran($title, 'en');
}
$i=1;
$sign = generateRoute($title);
$length = strlen($sign);
... ...
... ... @@ -51,7 +51,7 @@ return [
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'cdn'=>'https://v6-file.globalso.com'
'cdn'=>'https://globalso-v6.s3.us-west-2.amazonaws.com'
],
'upload' => [
... ...
... ... @@ -38,5 +38,6 @@ Route::any('getAutoToken', [\App\Http\Controllers\Api\PrivateController::class,
//自建站接口转接
Route::post('selfSiteApi', [\App\Http\Controllers\Api\SelfSiteController::class, 'selfSiteApi']);
Route::post('selfSiteNotify', [\App\Http\Controllers\Api\SelfSiteController::class, 'selfSiteNotify']);
Route::post('selfSiteVerify', [\App\Http\Controllers\Api\SelfSiteController::class, 'selfSiteVerify']);
... ...
... ... @@ -276,6 +276,7 @@ Route::middleware(['aloginauth'])->group(function () {
Route::any('/saveAiPrefix', [Aside\Optimize\OptimizeController::class, 'saveAiPrefix'])->name('admin.optimize_saveAiPrefix');//保存Ai前后缀
Route::any('/setRobots', [Aside\Optimize\OptimizeController::class, 'setRobots'])->name('admin.optimize_setRobots');//设置robots开关
Route::any('/editBacklink', [Aside\Optimize\OptimizeController::class, 'editBacklink'])->name('admin.optimize_editBacklink');//设置backlink开关
Route::any('/setAiVideo', [Aside\Optimize\OptimizeController::class, 'setAiVideo'])->name('admin.optimize_setAiVideo');//设置backlink开关
Route::any('/editTranslateStatus', [Aside\Optimize\OptimizeController::class, 'editTranslateStatus'])->name('admin.optimize_editTranslateStatus');//设置robots开关
});
//生成关键字
... ... @@ -411,6 +412,10 @@ Route::middleware(['aloginauth'])->group(function () {
Route::any('/generate_aicc_token', [Aside\Com\IndexController::class, 'generateAiCCToken'])->name('admin.generate_aicc_token');
Route::any('/getAutoToken', [Aside\Com\IndexController::class, 'getAutoToken'])->name('admin.getAutoToken');
// 生成页面任务
Route::any('/create_html_task', [Aside\Task\AutoTaskController::class, 'createHtmlTask'])->name('admin.create_html_task');
Route::any('/create_html_param', [Aside\Task\AutoTaskController::class, 'createHtmlTaskParam'])->name('admin.create_html_param');
});
//无需登录验证的路由组
... ...
... ... @@ -266,6 +266,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::post('keyword/batchAdd', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchAdd'])->name('product_keyword_batchAdd');
Route::post('keyword/batchDel', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchDel'])->name('product_keyword_batchDel');
Route::any('keyword/delete', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'delete'])->name('product_keyword_delete');
Route::any('keyword/batchKeywordIsVideo', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchKeywordIsVideo'])->name('product_keyword_batchKeywordIsVideo');
Route::any('keyword/batchKeywordFiled', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchKeywordFiled'])->name('product_keyword_batchKeywordFiled');
//产品参数
Route::get('attr', [\App\Http\Controllers\Bside\Product\AttrController::class, 'index'])->name('product_attr');
... ... @@ -368,6 +369,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::any('/', [\App\Http\Controllers\Bside\Template\BTemplateModuleController::class, 'lists'])->name('template_module_lists');
Route::any('/read', [\App\Http\Controllers\Bside\Template\BTemplateModuleController::class, 'read'])->name('template_module_read');
Route::any('/type', [\App\Http\Controllers\Bside\Template\BTemplateModuleController::class, 'getType'])->name('template_module_getType');
Route::any('/setModuleNumber', [\App\Http\Controllers\Bside\Template\BTemplateModuleController::class, 'setModuleNumber'])->name('template_module_setModuleNumber');
});
// 保存私有模块
... ... @@ -536,6 +538,12 @@ Route::middleware(['bloginauth'])->group(function () {
Route::prefix('tutorial')->group(function () {
Route::any('/', [\App\Http\Controllers\Bside\BCom\TutorialController::class, 'lists'])->name('tutorial_lists');
});
//oa教程
Route::prefix('template_label')->group(function () {
Route::any('/getUserLists', [\App\Http\Controllers\Bside\Template\BTemplateLabelController::class, 'getUserLists'])->name('template_label_getUserLists');
Route::any('/save', [\App\Http\Controllers\Bside\Template\BTemplateLabelController::class, 'save'])->name('template_label_save');
Route::any('/del', [\App\Http\Controllers\Bside\Template\BTemplateLabelController::class, 'del'])->name('template_label_del');
});
});
//无需登录验证的路由组
Route::group([], function () {
... ...