作者 lyh

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6

<?php
/**
* @remark :
* @name :GenerateVideo.php
* @author :lyh
* @method :post
* @time :2024/2/26 11:47
*/
namespace App\Console\Commands\KeywordInVideo;
use Illuminate\Console\Command;
class GenerateVideo extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'generate_video';
/**
* The console command description.
*
* @var string
*/
protected $description = '根据关键词生成视频';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
public function handle()
{
}
}
... ...
... ... @@ -16,6 +16,19 @@ use App\Models\Com\PromotionKeyword;
class KeywordController extends BaseController
{
/**
* @remark :任务列表
* @name :lists
* @author :lyh
* @method :post
* @time :2024/2/26 11:36
*/
public function lists(){
$keywordModel = new PromotionKeyword();
$lists = $keywordModel->lists($this->map,$this->page,$this->row);
$this->response('success',Code::SUCCESS,$lists);
}
/**
* @remark :创建关键字任务池子
* @name :saveKeyword
* @author :lyh
... ... @@ -37,4 +50,25 @@ class KeywordController extends BaseController
}
$this->response('success');
}
/**
* @remark :修改项目
* @name :editSort
* @author :lyh
* @method :post
* @time :2024/2/26 11:35
*/
public function edit(){
$this->request->validate([
'id'=>'required'
], [
'id.required' => '主键标识不为空',
]);
$keywordModel = new PromotionKeyword();
$rs = $keywordModel->edit(['sort'=>$this->param['sort']],['id'=>$this->param['id']]);
if($rs === false){
$this->response('编辑失败',Code::SYSTEM_ERROR);
}
$this->response('success');
}
}
... ...
... ... @@ -147,7 +147,7 @@ class CountLogic extends BaseLogic
public function referrer_count(){
$customerVisitModel = new Visit();
$data = $customerVisitModel->select('referrer_url', DB::raw('COUNT(*) as count'))
->groupBy('referrer_url')->where(['domain'=>$this->user['domain']])
->groupBy('referrer_url')->where(['domain'=>trim(str_replace('https://','',$this->user['domain']),'/')]);
->orderByDesc('count')->limit(9)->get()->toArray();
$total = $customerVisitModel->count();
if(!empty($data)){
... ...
... ... @@ -330,7 +330,9 @@ Route::middleware(['aloginauth'])->group(function () {
* 生成视频的项目
*/
Route::prefix('promotion_keyword')->group(function () {
Route::any('/', [Aside\Com\KeywordController::class, 'lists'])->name('promotion_keyword_lists');
Route::any('/createKeywordTask', [Aside\Com\KeywordController::class, 'createKeywordTask'])->name('promotion_keyword_createKeywordTask');
Route::any('/edit', [Aside\Com\KeywordController::class, 'edit'])->name('promotion_keyword_edit');
});
// 公共主题模版
... ...