作者 lyh

gx脚本

<?php
/**
* @remark :
* @name :UpgradeProjectCount.php
* @name :CountProject.php
* @author :lyh
* @method :post
* @time :2024/1/8 9:03
... ... @@ -18,7 +18,7 @@ use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use App\Models\HomeCount\Count;
class UpgradeCount extends Command
class CountAll extends Command
{
/**
... ... @@ -26,7 +26,7 @@ class UpgradeCount extends Command
*
* @var string
*/
protected $signature = 'upgrade_counts';
protected $signature = 'count_all';
/**
* The console command description.
... ... @@ -37,7 +37,7 @@ class UpgradeCount extends Command
public function handle(){
$projectModel = new Project();
$list = $projectModel->list(['is_upgrade'=>1,'delete_status'=>0]);
$list = $projectModel->list(['delete_status'=>0]);
foreach ($list as $v) {
echo date('Y-m-d H:i:s') . '项目id:'.$v['id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
... ...
<?php
/**
* @remark :
* @name :UpgradeProjectCount.php
* @name :CountProject.php
* @author :lyh
* @method :post
* @time :2024/1/8 9:03
... ... @@ -20,7 +20,7 @@ use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use App\Models\HomeCount\Count;
class UpgradeProjectCount extends Command
class CountProject extends Command
{
const STATUS_ERROR = 400;
public $error = 0;
... ... @@ -29,7 +29,7 @@ class UpgradeProjectCount extends Command
*
* @var string
*/
protected $signature = 'upgrade_count {project_id}';
protected $signature = 'count_project {project_id}';
/**
* The console command description.
... ...
<?php
/**
* @remark :
* @name :UpgradeProjectCount.php
* @name :CountProject.php
* @author :lyh
* @method :post
* @time :2024/1/8 9:03
... ... @@ -21,14 +21,14 @@ use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use App\Models\HomeCount\Count;
class UpgradeCount extends Command
class MonthAllCount extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'upgrade_month_counts';
protected $signature = 'month_all';
/**
* The console command description.
... ...
<?php
/**
* @remark :
* @name :UpgradeProjectCount.php
* @name :CountProject.php
* @author :lyh
* @method :post
* @time :2024/1/8 9:03
... ...
<?php
/**
* @remark :
* @name :UpgradeProjectCount.php
* @name :CountProject.php
* @author :lyh
* @method :post
* @time :2024/1/8 9:03
... ... @@ -21,14 +21,14 @@ use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use App\Models\HomeCount\Count;
class UpgradeProjectCount extends Command
class MonthProjectCount extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'upgrade_month_count {project_id}';
protected $signature = 'month_project {project_id}';
/**
* The console command description.
... ...
... ... @@ -9,6 +9,7 @@ use App\Http\Logic\Bside\Product\KeywordLogic;
use App\Http\Requests\Bside\Product\KeywordRequest;
use App\Models\Com\NoticeLog;
use App\Models\Product\Keyword;
use App\Models\Product\KeywordPage;
use App\Models\Product\KeywordRelated;
use App\Models\Product\Product;
use App\Models\RouteMap\RouteMap;
... ... @@ -242,6 +243,20 @@ class KeywordController extends BaseController
* @time :2024/7/2 10:14
*/
public function batchUpdateKeyword(){
$noticeLogModel = new NoticeLog();
$this->request->validate([
'text'=>'required|array',
'update_object'=>'required|array',
'update_method'=>'required'
],[
'text.required' => '文件内容不能为空',
'update_object.required' => '更新对象不为空',
'update_object.array' => '更新对象为数组',
'update_method.required' => '请求方式不为空'
]);
$keywordPageModel = new KeywordPage();
$this->param['text'] = json_encode($this->param['text']);
$this->param['update_object'] = json_encode($this->param['update_object']);
$id = $keywordPageModel->addReturnId($this->param);
$this->response('success',Code::SUCCESS,['id'=>$id]);
}
}
... ...
<?php
/**
* @remark :
* @name :KeywordPage.php
* @author :lyh
* @method :post
* @time :2024/7/2 15:26
*/
namespace App\Models\Product;
use App\Models\Base;
class KeywordPage extends Base
{
protected $table = 'gl_product_keyword_page';
//连接数据库
protected $connection = 'custom_mysql';
}
... ...
... ... @@ -271,6 +271,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/batchUpdateKeyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchUpdateKeyword'])->name('product_keyword_batchUpdateKeyword');
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');
//产品参数
... ...