Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
4 个修改的文件
包含
81 行增加
和
1 行删除
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :GenerateVideo.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/2/26 11:47 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Console\Commands\KeywordInVideo; | ||
| 11 | + | ||
| 12 | +use Illuminate\Console\Command; | ||
| 13 | + | ||
| 14 | +class GenerateVideo extends Command | ||
| 15 | +{ | ||
| 16 | + /** | ||
| 17 | + * The name and signature of the console command. | ||
| 18 | + * | ||
| 19 | + * @var string | ||
| 20 | + */ | ||
| 21 | + protected $signature = 'generate_video'; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * The console command description. | ||
| 25 | + * | ||
| 26 | + * @var string | ||
| 27 | + */ | ||
| 28 | + protected $description = '根据关键词生成视频'; | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * Create a new command instance. | ||
| 32 | + * | ||
| 33 | + * @return void | ||
| 34 | + */ | ||
| 35 | + public function __construct() | ||
| 36 | + { | ||
| 37 | + parent::__construct(); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public function handle() | ||
| 41 | + { | ||
| 42 | + | ||
| 43 | + } | ||
| 44 | +} |
| @@ -16,6 +16,19 @@ use App\Models\Com\PromotionKeyword; | @@ -16,6 +16,19 @@ use App\Models\Com\PromotionKeyword; | ||
| 16 | class KeywordController extends BaseController | 16 | class KeywordController extends BaseController |
| 17 | { | 17 | { |
| 18 | /** | 18 | /** |
| 19 | + * @remark :任务列表 | ||
| 20 | + * @name :lists | ||
| 21 | + * @author :lyh | ||
| 22 | + * @method :post | ||
| 23 | + * @time :2024/2/26 11:36 | ||
| 24 | + */ | ||
| 25 | + public function lists(){ | ||
| 26 | + $keywordModel = new PromotionKeyword(); | ||
| 27 | + $lists = $keywordModel->lists($this->map,$this->page,$this->row); | ||
| 28 | + $this->response('success',Code::SUCCESS,$lists); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /** | ||
| 19 | * @remark :创建关键字任务池子 | 32 | * @remark :创建关键字任务池子 |
| 20 | * @name :saveKeyword | 33 | * @name :saveKeyword |
| 21 | * @author :lyh | 34 | * @author :lyh |
| @@ -37,4 +50,25 @@ class KeywordController extends BaseController | @@ -37,4 +50,25 @@ class KeywordController extends BaseController | ||
| 37 | } | 50 | } |
| 38 | $this->response('success'); | 51 | $this->response('success'); |
| 39 | } | 52 | } |
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * @remark :修改项目 | ||
| 56 | + * @name :editSort | ||
| 57 | + * @author :lyh | ||
| 58 | + * @method :post | ||
| 59 | + * @time :2024/2/26 11:35 | ||
| 60 | + */ | ||
| 61 | + public function edit(){ | ||
| 62 | + $this->request->validate([ | ||
| 63 | + 'id'=>'required' | ||
| 64 | + ], [ | ||
| 65 | + 'id.required' => '主键标识不为空', | ||
| 66 | + ]); | ||
| 67 | + $keywordModel = new PromotionKeyword(); | ||
| 68 | + $rs = $keywordModel->edit(['sort'=>$this->param['sort']],['id'=>$this->param['id']]); | ||
| 69 | + if($rs === false){ | ||
| 70 | + $this->response('编辑失败',Code::SYSTEM_ERROR); | ||
| 71 | + } | ||
| 72 | + $this->response('success'); | ||
| 73 | + } | ||
| 40 | } | 74 | } |
| @@ -147,7 +147,7 @@ class CountLogic extends BaseLogic | @@ -147,7 +147,7 @@ class CountLogic extends BaseLogic | ||
| 147 | public function referrer_count(){ | 147 | public function referrer_count(){ |
| 148 | $customerVisitModel = new Visit(); | 148 | $customerVisitModel = new Visit(); |
| 149 | $data = $customerVisitModel->select('referrer_url', DB::raw('COUNT(*) as count')) | 149 | $data = $customerVisitModel->select('referrer_url', DB::raw('COUNT(*) as count')) |
| 150 | - ->groupBy('referrer_url')->where(['domain'=>$this->user['domain']]) | 150 | + ->groupBy('referrer_url')->where(['domain'=>trim(str_replace('https://','',$this->user['domain']),'/')]); |
| 151 | ->orderByDesc('count')->limit(9)->get()->toArray(); | 151 | ->orderByDesc('count')->limit(9)->get()->toArray(); |
| 152 | $total = $customerVisitModel->count(); | 152 | $total = $customerVisitModel->count(); |
| 153 | if(!empty($data)){ | 153 | if(!empty($data)){ |
| @@ -330,7 +330,9 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -330,7 +330,9 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 330 | * 生成视频的项目 | 330 | * 生成视频的项目 |
| 331 | */ | 331 | */ |
| 332 | Route::prefix('promotion_keyword')->group(function () { | 332 | Route::prefix('promotion_keyword')->group(function () { |
| 333 | + Route::any('/', [Aside\Com\KeywordController::class, 'lists'])->name('promotion_keyword_lists'); | ||
| 333 | Route::any('/createKeywordTask', [Aside\Com\KeywordController::class, 'createKeywordTask'])->name('promotion_keyword_createKeywordTask'); | 334 | Route::any('/createKeywordTask', [Aside\Com\KeywordController::class, 'createKeywordTask'])->name('promotion_keyword_createKeywordTask'); |
| 335 | + Route::any('/edit', [Aside\Com\KeywordController::class, 'edit'])->name('promotion_keyword_edit'); | ||
| 334 | }); | 336 | }); |
| 335 | 337 | ||
| 336 | // 公共主题模版 | 338 | // 公共主题模版 |
-
请 注册 或 登录 后发表评论