作者 lyh

gx脚本

1 <?php 1 <?php
2 /** 2 /**
3 * @remark : 3 * @remark :
4 - * @name :UpgradeProjectCount.php 4 + * @name :CountProject.php
5 * @author :lyh 5 * @author :lyh
6 * @method :post 6 * @method :post
7 * @time :2024/1/8 9:03 7 * @time :2024/1/8 9:03
@@ -18,7 +18,7 @@ use Illuminate\Console\Command; @@ -18,7 +18,7 @@ use Illuminate\Console\Command;
18 use Illuminate\Support\Facades\DB; 18 use Illuminate\Support\Facades\DB;
19 use App\Models\HomeCount\Count; 19 use App\Models\HomeCount\Count;
20 20
21 -class UpgradeCount extends Command 21 +class CountAll extends Command
22 { 22 {
23 23
24 /** 24 /**
@@ -26,7 +26,7 @@ class UpgradeCount extends Command @@ -26,7 +26,7 @@ class UpgradeCount extends Command
26 * 26 *
27 * @var string 27 * @var string
28 */ 28 */
29 - protected $signature = 'upgrade_counts'; 29 + protected $signature = 'count_all';
30 30
31 /** 31 /**
32 * The console command description. 32 * The console command description.
@@ -37,7 +37,7 @@ class UpgradeCount extends Command @@ -37,7 +37,7 @@ class UpgradeCount extends Command
37 37
38 public function handle(){ 38 public function handle(){
39 $projectModel = new Project(); 39 $projectModel = new Project();
40 - $list = $projectModel->list(['is_upgrade'=>1,'delete_status'=>0]); 40 + $list = $projectModel->list(['delete_status'=>0]);
41 foreach ($list as $v) { 41 foreach ($list as $v) {
42 echo date('Y-m-d H:i:s') . '项目id:'.$v['id'] . PHP_EOL; 42 echo date('Y-m-d H:i:s') . '项目id:'.$v['id'] . PHP_EOL;
43 ProjectServer::useProject($v['id']); 43 ProjectServer::useProject($v['id']);
1 <?php 1 <?php
2 /** 2 /**
3 * @remark : 3 * @remark :
4 - * @name :UpgradeProjectCount.php 4 + * @name :CountProject.php
5 * @author :lyh 5 * @author :lyh
6 * @method :post 6 * @method :post
7 * @time :2024/1/8 9:03 7 * @time :2024/1/8 9:03
@@ -20,7 +20,7 @@ use Illuminate\Console\Command; @@ -20,7 +20,7 @@ use Illuminate\Console\Command;
20 use Illuminate\Support\Facades\DB; 20 use Illuminate\Support\Facades\DB;
21 use App\Models\HomeCount\Count; 21 use App\Models\HomeCount\Count;
22 22
23 -class UpgradeProjectCount extends Command 23 +class CountProject extends Command
24 { 24 {
25 const STATUS_ERROR = 400; 25 const STATUS_ERROR = 400;
26 public $error = 0; 26 public $error = 0;
@@ -29,7 +29,7 @@ class UpgradeProjectCount extends Command @@ -29,7 +29,7 @@ class UpgradeProjectCount extends Command
29 * 29 *
30 * @var string 30 * @var string
31 */ 31 */
32 - protected $signature = 'upgrade_count {project_id}'; 32 + protected $signature = 'count_project {project_id}';
33 33
34 /** 34 /**
35 * The console command description. 35 * The console command description.
1 <?php 1 <?php
2 /** 2 /**
3 * @remark : 3 * @remark :
4 - * @name :UpgradeProjectCount.php 4 + * @name :CountProject.php
5 * @author :lyh 5 * @author :lyh
6 * @method :post 6 * @method :post
7 * @time :2024/1/8 9:03 7 * @time :2024/1/8 9:03
@@ -21,14 +21,14 @@ use Illuminate\Console\Command; @@ -21,14 +21,14 @@ use Illuminate\Console\Command;
21 use Illuminate\Support\Facades\DB; 21 use Illuminate\Support\Facades\DB;
22 use App\Models\HomeCount\Count; 22 use App\Models\HomeCount\Count;
23 23
24 -class UpgradeCount extends Command 24 +class MonthAllCount extends Command
25 { 25 {
26 /** 26 /**
27 * The name and signature of the console command. 27 * The name and signature of the console command.
28 * 28 *
29 * @var string 29 * @var string
30 */ 30 */
31 - protected $signature = 'upgrade_month_counts'; 31 + protected $signature = 'month_all';
32 32
33 /** 33 /**
34 * The console command description. 34 * The console command description.
1 <?php 1 <?php
2 /** 2 /**
3 * @remark : 3 * @remark :
4 - * @name :UpgradeProjectCount.php 4 + * @name :CountProject.php
5 * @author :lyh 5 * @author :lyh
6 * @method :post 6 * @method :post
7 * @time :2024/1/8 9:03 7 * @time :2024/1/8 9:03
1 <?php 1 <?php
2 /** 2 /**
3 * @remark : 3 * @remark :
4 - * @name :UpgradeProjectCount.php 4 + * @name :CountProject.php
5 * @author :lyh 5 * @author :lyh
6 * @method :post 6 * @method :post
7 * @time :2024/1/8 9:03 7 * @time :2024/1/8 9:03
@@ -21,14 +21,14 @@ use Illuminate\Console\Command; @@ -21,14 +21,14 @@ use Illuminate\Console\Command;
21 use Illuminate\Support\Facades\DB; 21 use Illuminate\Support\Facades\DB;
22 use App\Models\HomeCount\Count; 22 use App\Models\HomeCount\Count;
23 23
24 -class UpgradeProjectCount extends Command 24 +class MonthProjectCount extends Command
25 { 25 {
26 /** 26 /**
27 * The name and signature of the console command. 27 * The name and signature of the console command.
28 * 28 *
29 * @var string 29 * @var string
30 */ 30 */
31 - protected $signature = 'upgrade_month_count {project_id}'; 31 + protected $signature = 'month_project {project_id}';
32 32
33 /** 33 /**
34 * The console command description. 34 * The console command description.
@@ -9,6 +9,7 @@ use App\Http\Logic\Bside\Product\KeywordLogic; @@ -9,6 +9,7 @@ use App\Http\Logic\Bside\Product\KeywordLogic;
9 use App\Http\Requests\Bside\Product\KeywordRequest; 9 use App\Http\Requests\Bside\Product\KeywordRequest;
10 use App\Models\Com\NoticeLog; 10 use App\Models\Com\NoticeLog;
11 use App\Models\Product\Keyword; 11 use App\Models\Product\Keyword;
  12 +use App\Models\Product\KeywordPage;
12 use App\Models\Product\KeywordRelated; 13 use App\Models\Product\KeywordRelated;
13 use App\Models\Product\Product; 14 use App\Models\Product\Product;
14 use App\Models\RouteMap\RouteMap; 15 use App\Models\RouteMap\RouteMap;
@@ -242,6 +243,20 @@ class KeywordController extends BaseController @@ -242,6 +243,20 @@ class KeywordController extends BaseController
242 * @time :2024/7/2 10:14 243 * @time :2024/7/2 10:14
243 */ 244 */
244 public function batchUpdateKeyword(){ 245 public function batchUpdateKeyword(){
245 - $noticeLogModel = new NoticeLog(); 246 + $this->request->validate([
  247 + 'text'=>'required|array',
  248 + 'update_object'=>'required|array',
  249 + 'update_method'=>'required'
  250 + ],[
  251 + 'text.required' => '文件内容不能为空',
  252 + 'update_object.required' => '更新对象不为空',
  253 + 'update_object.array' => '更新对象为数组',
  254 + 'update_method.required' => '请求方式不为空'
  255 + ]);
  256 + $keywordPageModel = new KeywordPage();
  257 + $this->param['text'] = json_encode($this->param['text']);
  258 + $this->param['update_object'] = json_encode($this->param['update_object']);
  259 + $id = $keywordPageModel->addReturnId($this->param);
  260 + $this->response('success',Code::SUCCESS,['id'=>$id]);
246 } 261 }
247 } 262 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :KeywordPage.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2024/7/2 15:26
  8 + */
  9 +
  10 +namespace App\Models\Product;
  11 +
  12 +use App\Models\Base;
  13 +
  14 +class KeywordPage extends Base
  15 +{
  16 + protected $table = 'gl_product_keyword_page';
  17 + //连接数据库
  18 + protected $connection = 'custom_mysql';
  19 +}
@@ -271,6 +271,7 @@ Route::middleware(['bloginauth'])->group(function () { @@ -271,6 +271,7 @@ Route::middleware(['bloginauth'])->group(function () {
271 Route::post('keyword/batchAdd', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchAdd'])->name('product_keyword_batchAdd'); 271 Route::post('keyword/batchAdd', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchAdd'])->name('product_keyword_batchAdd');
272 Route::post('keyword/batchDel', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchDel'])->name('product_keyword_batchDel'); 272 Route::post('keyword/batchDel', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchDel'])->name('product_keyword_batchDel');
273 Route::any('keyword/delete', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'delete'])->name('product_keyword_delete'); 273 Route::any('keyword/delete', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'delete'])->name('product_keyword_delete');
  274 + Route::any('keyword/batchUpdateKeyword', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchUpdateKeyword'])->name('product_keyword_batchUpdateKeyword');
274 Route::any('keyword/batchKeywordIsVideo', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchKeywordIsVideo'])->name('product_keyword_batchKeywordIsVideo'); 275 Route::any('keyword/batchKeywordIsVideo', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchKeywordIsVideo'])->name('product_keyword_batchKeywordIsVideo');
275 Route::any('keyword/batchKeywordFiled', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchKeywordFiled'])->name('product_keyword_batchKeywordFiled'); 276 Route::any('keyword/batchKeywordFiled', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchKeywordFiled'])->name('product_keyword_batchKeywordFiled');
276 //产品参数 277 //产品参数