正在显示
13 个修改的文件
包含
110 行增加
和
12 行删除
| @@ -31,7 +31,7 @@ class ImportCustomModule extends Command | @@ -31,7 +31,7 @@ class ImportCustomModule extends Command | ||
| 31 | * | 31 | * |
| 32 | * @var string | 32 | * @var string |
| 33 | */ | 33 | */ |
| 34 | - protected $description = 'import_custom_module'; | 34 | + protected $description = '特殊项目导入扩展模块及扩展数据'; |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | * @remark :导入 | 37 | * @remark :导入 |
| @@ -33,7 +33,7 @@ class CountAll extends Command | @@ -33,7 +33,7 @@ class CountAll extends Command | ||
| 33 | * | 33 | * |
| 34 | * @var string | 34 | * @var string |
| 35 | */ | 35 | */ |
| 36 | - protected $description = '升级项目统计'; | 36 | + protected $description = '所有项目统计'; |
| 37 | 37 | ||
| 38 | public function handle(){ | 38 | public function handle(){ |
| 39 | $projectModel = new Project(); | 39 | $projectModel = new Project(); |
| @@ -27,7 +27,7 @@ class CountDate extends Command | @@ -27,7 +27,7 @@ class CountDate extends Command | ||
| 27 | * | 27 | * |
| 28 | * @var string | 28 | * @var string |
| 29 | */ | 29 | */ |
| 30 | - protected $description = '时间统计记录'; | 30 | + protected $description = '按时间统计所有项目记录'; |
| 31 | 31 | ||
| 32 | /** | 32 | /** |
| 33 | * @name :(定时执行生成昨日数据统计)handle | 33 | * @name :(定时执行生成昨日数据统计)handle |
| @@ -35,7 +35,7 @@ class CountProject extends Command | @@ -35,7 +35,7 @@ class CountProject extends Command | ||
| 35 | * | 35 | * |
| 36 | * @var string | 36 | * @var string |
| 37 | */ | 37 | */ |
| 38 | - protected $description = '升级项目统计'; | 38 | + protected $description = '按项目统计日记录'; |
| 39 | 39 | ||
| 40 | public function handle(){ | 40 | public function handle(){ |
| 41 | $project_id = $this->argument('project_id'); | 41 | $project_id = $this->argument('project_id'); |
| @@ -25,7 +25,7 @@ class InquiryDelay extends Command | @@ -25,7 +25,7 @@ class InquiryDelay extends Command | ||
| 25 | * | 25 | * |
| 26 | * @var string | 26 | * @var string |
| 27 | */ | 27 | */ |
| 28 | - protected $description = '延时询盘转发'; | 28 | + protected $description = '延时询盘转发(暂时弃用)'; |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | * @remark :延时询盘转发 | 31 | * @remark :延时询盘转发 |
| @@ -36,7 +36,7 @@ class MonthAllCount extends Command | @@ -36,7 +36,7 @@ class MonthAllCount extends Command | ||
| 36 | * | 36 | * |
| 37 | * @var string | 37 | * @var string |
| 38 | */ | 38 | */ |
| 39 | - protected $description = '升级项目统计-月统计'; | 39 | + protected $description = '项目统计-月统计'; |
| 40 | 40 | ||
| 41 | public function handle(){ | 41 | public function handle(){ |
| 42 | $projectModel = new Project(); | 42 | $projectModel = new Project(); |
| @@ -32,7 +32,7 @@ class SendProduct extends Command | @@ -32,7 +32,7 @@ class SendProduct extends Command | ||
| 32 | * | 32 | * |
| 33 | * @var string | 33 | * @var string |
| 34 | */ | 34 | */ |
| 35 | - protected $description = '根据发布时间发布产品'; | 35 | + protected $description = '自动发布--根据发布时间发布产品'; |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| 38 | * @remark :发布 | 38 | * @remark :发布 |
| @@ -30,7 +30,7 @@ class CountAllProject extends Command | @@ -30,7 +30,7 @@ class CountAllProject extends Command | ||
| 30 | * | 30 | * |
| 31 | * @var string | 31 | * @var string |
| 32 | */ | 32 | */ |
| 33 | - protected $description = '统计所有项目设置'; | 33 | + protected $description = '统计所有项目设置(4.0-5.0-6.0)'; |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | public function handle(){ | 36 | public function handle(){ |
| @@ -28,7 +28,7 @@ class countProject extends Command | @@ -28,7 +28,7 @@ class countProject extends Command | ||
| 28 | * | 28 | * |
| 29 | * @var string | 29 | * @var string |
| 30 | */ | 30 | */ |
| 31 | - protected $description = '项目数据统计生成文件'; | 31 | + protected $description = '项目数据统计生成文件(测试脚本)'; |
| 32 | 32 | ||
| 33 | public function handle(){ | 33 | public function handle(){ |
| 34 | $start = '2023-10'; | 34 | $start = '2023-10'; |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | * @time :2024/4/17 10:05 | 7 | * @time :2024/4/17 10:05 |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | -namespace App\Console\Commands\Sync; | 10 | +namespace App\Console\Commands\SyncFilesImage; |
| 11 | 11 | ||
| 12 | use App\Models\File\ErrorFile; | 12 | use App\Models\File\ErrorFile; |
| 13 | use Illuminate\Console\Command; | 13 | use Illuminate\Console\Command; |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | * @time :2024/9/11 10:39 | 7 | * @time :2024/9/11 10:39 |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | -namespace App\Console\Commands\Sync; | 10 | +namespace App\Console\Commands\SyncFilesImage; |
| 11 | 11 | ||
| 12 | use App\Models\File\Image; | 12 | use App\Models\File\Image; |
| 13 | use App\Models\File\ImageSetting; | 13 | use App\Models\File\ImageSetting; |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | * @time :2024/8/14 14:23 | 7 | * @time :2024/8/14 14:23 |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | -namespace App\Console\Commands\Sync; | 10 | +namespace App\Console\Commands\SyncFilesImage; |
| 11 | 11 | ||
| 12 | use App\Models\File\ErrorFile; | 12 | use App\Models\File\ErrorFile; |
| 13 | use App\Models\File\File; | 13 | use App\Models\File\File; |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :UpdateBuildConfiguration.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/12/11 11:30 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Console\Commands\Test; | ||
| 11 | + | ||
| 12 | +use App\Models\Product\Detail; | ||
| 13 | +use App\Models\Product\Product; | ||
| 14 | +use App\Models\Project\DeployBuild; | ||
| 15 | +use App\Models\Project\Project; | ||
| 16 | +use App\Services\ProjectServer; | ||
| 17 | +use Illuminate\Console\Command; | ||
| 18 | +use Illuminate\Support\Facades\DB; | ||
| 19 | + | ||
| 20 | +class UpdateBuildConfiguration extends Command | ||
| 21 | +{ | ||
| 22 | + /** | ||
| 23 | + * The name and signature of the console command. | ||
| 24 | + * | ||
| 25 | + * @var string | ||
| 26 | + */ | ||
| 27 | + protected $signature = 'update_build_configuration'; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * The console command description. | ||
| 31 | + * | ||
| 32 | + * @var string | ||
| 33 | + */ | ||
| 34 | + protected $description = '更新部署表中-产品-博客-新闻-是否开启可视化'; | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * @remark :执行脚本 | ||
| 38 | + * @name :handle | ||
| 39 | + * @author :lyh | ||
| 40 | + * @method :post | ||
| 41 | + * @time :2024/12/11 11:49 | ||
| 42 | + */ | ||
| 43 | + public function handle(){ | ||
| 44 | + //查询当前的所有项目都开启可视化 | ||
| 45 | + $buildModel = new DeployBuild(); | ||
| 46 | + $lists = $buildModel->list(); | ||
| 47 | + foreach ($lists as $k => $v){ | ||
| 48 | + $v['configuration']['is_product'] = $v['configuration']['is_news'] = $v['configuration']['is_blogs'] = $v['configuration']['is_module'] = 1; | ||
| 49 | + $buildModel->edit(['configuration'=>json_encode($v['configuration'],true)],['id'=>$v['id']]); | ||
| 50 | + echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | ||
| 51 | + } | ||
| 52 | + echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * @remark :清洗产品新描述数据 | ||
| 57 | + * @name :handles | ||
| 58 | + * @author :lyh | ||
| 59 | + * @method :post | ||
| 60 | + * @time :2024/12/11 14:33 | ||
| 61 | + */ | ||
| 62 | + public function handles(){ | ||
| 63 | + $projectModel = new Project(); | ||
| 64 | + $list = $projectModel->list(['delete_status'=>0]); | ||
| 65 | + foreach ($list as $k => $v){ | ||
| 66 | + echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | ||
| 67 | + ProjectServer::useProject($v['id']); | ||
| 68 | + $this->getProduct(); | ||
| 69 | + DB::disconnect('custom_mysql'); | ||
| 70 | + } | ||
| 71 | + echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * @remark :清洗产品新描述 | ||
| 76 | + * @name :getProduct | ||
| 77 | + * @author :lyh | ||
| 78 | + * @method :post | ||
| 79 | + * @time :2024/12/11 14:40 | ||
| 80 | + */ | ||
| 81 | + public function getProduct(){ | ||
| 82 | + $productModel = new Product(); | ||
| 83 | + $lists = $productModel->list(); | ||
| 84 | + $detailModel = new Detail(); | ||
| 85 | + foreach ($lists as $k => $v){ | ||
| 86 | + echo date('Y-m-d H:i:s') . '产品id:'.$v['id'] . PHP_EOL; | ||
| 87 | + $data = [ | ||
| 88 | + 'product_id'=>$v['id'], | ||
| 89 | + 'column_id'=>1, | ||
| 90 | + 'text_type'=>1, | ||
| 91 | + 'title'=>'', | ||
| 92 | + 'sort'=>1, | ||
| 93 | + 'content'=>$v['describe'] | ||
| 94 | + ]; | ||
| 95 | + $detailModel->add($data); | ||
| 96 | + } | ||
| 97 | + } | ||
| 98 | +} |
-
请 注册 或 登录 后发表评论