作者 Your Name
... ... @@ -165,6 +165,8 @@ class WebTraffic extends Command
try {
$type = $this->argument('type');
Log::channel('traffic')->info('开始运行:' . $type);
$this->sleep($type);
$page = 1;
... ... @@ -314,7 +316,7 @@ class WebTraffic extends Command
$startTime = Carbon::now()->addMonths(-9)->startOfDay()->toDateTimeString();
$query->where('pdo.start_date', '<', $startTime);
}
})->select(['pdo.project_id','gl_project.main_lang_id','gl_project.id'])->forPage($page, 500)->get();
})->select(['pdo.project_id','gl_project.main_lang_id','gl_project.id'])->forPage($page, 500)->dd();
//其他地方在引流的域名
$other = DB::connection('projects_mysql')->table('projects')->where('switch', 1)->pluck('domain')->toArray();
$data = [];
... ...
... ... @@ -86,6 +86,7 @@ class ProjectController extends BaseController
'gl_project.channel AS channel',
'gl_project.company AS company',
'gl_project.type AS type',
'gl_project.uptime AS uptime',
'gl_project.is_upgrade AS is_upgrade',
'gl_project.created_at AS created_at',
'gl_project.cooperate_date AS cooperate_date',
... ...
... ... @@ -173,4 +173,32 @@ class KeywordController extends BaseController
$this->response('success');
}
/**
* @remark :批量清除关键词相关内容
* @name :batchKeywordFiled
* @author :lyh
* @method :post
* @time :2024/4/22 10:27
*/
public function batchKeywordFiled(){
$param = [];
if(isset($this->param['keyword'])){
$param['seo_keywords'] = null;
}
if(isset($this->param['description'])){
$param['seo_description'] = null;
}
if(isset($this->param['title'])){
$param['keyword_title'] = null;
}
if(isset($this->param['content'])){
$param['keyword_content'] = null;
}
$keywordModel = new Keyword();
$rs = $keywordModel->edit($param,['id'=>['!=',0]]);
if($rs === false){
$this->fail('保存失败,请联系管理员');
}
$this->response('success');
}
}
... ...
... ... @@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
class Keyword extends Base
{
use SoftDeletes;
// use SoftDeletes;
//设置关联表名
protected $table = 'gl_product_keyword';
... ...
... ... @@ -258,7 +258,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/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');
Route::get('attr/info', [\App\Http\Controllers\Bside\Product\AttrController::class, 'info'])->name('product_attr_info');
... ...