作者 lyh

gx脚本

... ... @@ -31,7 +31,7 @@ class ImportCustomModule extends Command
*
* @var string
*/
protected $description = 'import_custom_module';
protected $description = '特殊项目导入扩展模块及扩展数据';
/**
* @remark :导入
... ...
... ... @@ -33,7 +33,7 @@ class CountAll extends Command
*
* @var string
*/
protected $description = '升级项目统计';
protected $description = '所有项目统计';
public function handle(){
$projectModel = new Project();
... ...
... ... @@ -27,7 +27,7 @@ class CountDate extends Command
*
* @var string
*/
protected $description = '时间统计记录';
protected $description = '按时间统计所有项目记录';
/**
* @name :(定时执行生成昨日数据统计)handle
... ...
... ... @@ -35,7 +35,7 @@ class CountProject extends Command
*
* @var string
*/
protected $description = '升级项目统计';
protected $description = '按项目统计日记录';
public function handle(){
$project_id = $this->argument('project_id');
... ...
... ... @@ -25,7 +25,7 @@ class InquiryDelay extends Command
*
* @var string
*/
protected $description = '延时询盘转发';
protected $description = '延时询盘转发(暂时弃用)';
/**
* @remark :延时询盘转发
... ...
... ... @@ -36,7 +36,7 @@ class MonthAllCount extends Command
*
* @var string
*/
protected $description = '升级项目统计-月统计';
protected $description = '项目统计-月统计';
public function handle(){
$projectModel = new Project();
... ...
... ... @@ -32,7 +32,7 @@ class SendProduct extends Command
*
* @var string
*/
protected $description = '根据发布时间发布产品';
protected $description = '自动发布--根据发布时间发布产品';
/**
* @remark :发布
... ...
... ... @@ -30,7 +30,7 @@ class CountAllProject extends Command
*
* @var string
*/
protected $description = '统计所有项目设置';
protected $description = '统计所有项目设置(4.0-5.0-6.0)';
public function handle(){
... ...
... ... @@ -28,7 +28,7 @@ class countProject extends Command
*
* @var string
*/
protected $description = '项目数据统计生成文件';
protected $description = '项目数据统计生成文件(测试脚本)';
public function handle(){
$start = '2023-10';
... ...
... ... @@ -7,7 +7,7 @@
* @time :2024/4/17 10:05
*/
namespace App\Console\Commands\Sync;
namespace App\Console\Commands\SyncFilesImage;
use App\Models\File\ErrorFile;
use Illuminate\Console\Command;
... ...
... ... @@ -7,7 +7,7 @@
* @time :2024/9/11 10:39
*/
namespace App\Console\Commands\Sync;
namespace App\Console\Commands\SyncFilesImage;
use App\Models\File\Image;
use App\Models\File\ImageSetting;
... ...
... ... @@ -7,7 +7,7 @@
* @time :2024/8/14 14:23
*/
namespace App\Console\Commands\Sync;
namespace App\Console\Commands\SyncFilesImage;
use App\Models\File\ErrorFile;
use App\Models\File\File;
... ...
<?php
/**
* @remark :
* @name :UpdateBuildConfiguration.php
* @author :lyh
* @method :post
* @time :2024/12/11 11:30
*/
namespace App\Console\Commands\Test;
use App\Models\Product\Detail;
use App\Models\Product\Product;
use App\Models\Project\DeployBuild;
use App\Models\Project\Project;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class UpdateBuildConfiguration extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'update_build_configuration';
/**
* The console command description.
*
* @var string
*/
protected $description = '更新部署表中-产品-博客-新闻-是否开启可视化';
/**
* @remark :执行脚本
* @name :handle
* @author :lyh
* @method :post
* @time :2024/12/11 11:49
*/
public function handle(){
//查询当前的所有项目都开启可视化
$buildModel = new DeployBuild();
$lists = $buildModel->list();
foreach ($lists as $k => $v){
$v['configuration']['is_product'] = $v['configuration']['is_news'] = $v['configuration']['is_blogs'] = $v['configuration']['is_module'] = 1;
$buildModel->edit(['configuration'=>json_encode($v['configuration'],true)],['id'=>$v['id']]);
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
}
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
}
/**
* @remark :清洗产品新描述数据
* @name :handles
* @author :lyh
* @method :post
* @time :2024/12/11 14:33
*/
public function handles(){
$projectModel = new Project();
$list = $projectModel->list(['delete_status'=>0]);
foreach ($list as $k => $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
$this->getProduct();
DB::disconnect('custom_mysql');
}
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
}
/**
* @remark :清洗产品新描述
* @name :getProduct
* @author :lyh
* @method :post
* @time :2024/12/11 14:40
*/
public function getProduct(){
$productModel = new Product();
$lists = $productModel->list();
$detailModel = new Detail();
foreach ($lists as $k => $v){
echo date('Y-m-d H:i:s') . '产品id:'.$v['id'] . PHP_EOL;
$data = [
'product_id'=>$v['id'],
'column_id'=>1,
'text_type'=>1,
'title'=>'',
'sort'=>1,
'content'=>$v['describe']
];
$detailModel->add($data);
}
}
}
... ...