Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
5 个修改的文件
包含
34 行增加
和
3 行删除
| @@ -165,6 +165,8 @@ class WebTraffic extends Command | @@ -165,6 +165,8 @@ class WebTraffic extends Command | ||
| 165 | try { | 165 | try { |
| 166 | $type = $this->argument('type'); | 166 | $type = $this->argument('type'); |
| 167 | 167 | ||
| 168 | + Log::channel('traffic')->info('开始运行:' . $type); | ||
| 169 | + | ||
| 168 | $this->sleep($type); | 170 | $this->sleep($type); |
| 169 | 171 | ||
| 170 | $page = 1; | 172 | $page = 1; |
| @@ -314,7 +316,7 @@ class WebTraffic extends Command | @@ -314,7 +316,7 @@ class WebTraffic extends Command | ||
| 314 | $startTime = Carbon::now()->addMonths(-9)->startOfDay()->toDateTimeString(); | 316 | $startTime = Carbon::now()->addMonths(-9)->startOfDay()->toDateTimeString(); |
| 315 | $query->where('pdo.start_date', '<', $startTime); | 317 | $query->where('pdo.start_date', '<', $startTime); |
| 316 | } | 318 | } |
| 317 | - })->select(['pdo.project_id','gl_project.main_lang_id','gl_project.id'])->forPage($page, 500)->get(); | 319 | + })->select(['pdo.project_id','gl_project.main_lang_id','gl_project.id'])->forPage($page, 500)->dd(); |
| 318 | //其他地方在引流的域名 | 320 | //其他地方在引流的域名 |
| 319 | $other = DB::connection('projects_mysql')->table('projects')->where('switch', 1)->pluck('domain')->toArray(); | 321 | $other = DB::connection('projects_mysql')->table('projects')->where('switch', 1)->pluck('domain')->toArray(); |
| 320 | $data = []; | 322 | $data = []; |
| @@ -86,6 +86,7 @@ class ProjectController extends BaseController | @@ -86,6 +86,7 @@ class ProjectController extends BaseController | ||
| 86 | 'gl_project.channel AS channel', | 86 | 'gl_project.channel AS channel', |
| 87 | 'gl_project.company AS company', | 87 | 'gl_project.company AS company', |
| 88 | 'gl_project.type AS type', | 88 | 'gl_project.type AS type', |
| 89 | + 'gl_project.uptime AS uptime', | ||
| 89 | 'gl_project.is_upgrade AS is_upgrade', | 90 | 'gl_project.is_upgrade AS is_upgrade', |
| 90 | 'gl_project.created_at AS created_at', | 91 | 'gl_project.created_at AS created_at', |
| 91 | 'gl_project.cooperate_date AS cooperate_date', | 92 | 'gl_project.cooperate_date AS cooperate_date', |
| @@ -173,4 +173,32 @@ class KeywordController extends BaseController | @@ -173,4 +173,32 @@ class KeywordController extends BaseController | ||
| 173 | $this->response('success'); | 173 | $this->response('success'); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | + /** | ||
| 177 | + * @remark :批量清除关键词相关内容 | ||
| 178 | + * @name :batchKeywordFiled | ||
| 179 | + * @author :lyh | ||
| 180 | + * @method :post | ||
| 181 | + * @time :2024/4/22 10:27 | ||
| 182 | + */ | ||
| 183 | + public function batchKeywordFiled(){ | ||
| 184 | + $param = []; | ||
| 185 | + if(isset($this->param['keyword'])){ | ||
| 186 | + $param['seo_keywords'] = null; | ||
| 187 | + } | ||
| 188 | + if(isset($this->param['description'])){ | ||
| 189 | + $param['seo_description'] = null; | ||
| 190 | + } | ||
| 191 | + if(isset($this->param['title'])){ | ||
| 192 | + $param['keyword_title'] = null; | ||
| 193 | + } | ||
| 194 | + if(isset($this->param['content'])){ | ||
| 195 | + $param['keyword_content'] = null; | ||
| 196 | + } | ||
| 197 | + $keywordModel = new Keyword(); | ||
| 198 | + $rs = $keywordModel->edit($param,['id'=>['!=',0]]); | ||
| 199 | + if($rs === false){ | ||
| 200 | + $this->fail('保存失败,请联系管理员'); | ||
| 201 | + } | ||
| 202 | + $this->response('success'); | ||
| 203 | + } | ||
| 176 | } | 204 | } |
| @@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; | @@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; | ||
| 8 | 8 | ||
| 9 | class Keyword extends Base | 9 | class Keyword extends Base |
| 10 | { | 10 | { |
| 11 | - use SoftDeletes; | 11 | +// use SoftDeletes; |
| 12 | 12 | ||
| 13 | //设置关联表名 | 13 | //设置关联表名 |
| 14 | protected $table = 'gl_product_keyword'; | 14 | protected $table = 'gl_product_keyword'; |
| @@ -258,7 +258,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -258,7 +258,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 258 | Route::post('keyword/batchAdd', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchAdd'])->name('product_keyword_batchAdd'); | 258 | Route::post('keyword/batchAdd', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchAdd'])->name('product_keyword_batchAdd'); |
| 259 | Route::post('keyword/batchDel', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchDel'])->name('product_keyword_batchDel'); | 259 | Route::post('keyword/batchDel', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchDel'])->name('product_keyword_batchDel'); |
| 260 | Route::any('keyword/delete', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'delete'])->name('product_keyword_delete'); | 260 | Route::any('keyword/delete', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'delete'])->name('product_keyword_delete'); |
| 261 | - | 261 | + Route::any('keyword/batchKeywordFiled', [\App\Http\Controllers\Bside\Product\KeywordController::class, 'batchKeywordFiled'])->name('product_keyword_batchKeywordFiled'); |
| 262 | //产品参数 | 262 | //产品参数 |
| 263 | Route::get('attr', [\App\Http\Controllers\Bside\Product\AttrController::class, 'index'])->name('product_attr'); | 263 | Route::get('attr', [\App\Http\Controllers\Bside\Product\AttrController::class, 'index'])->name('product_attr'); |
| 264 | Route::get('attr/info', [\App\Http\Controllers\Bside\Product\AttrController::class, 'info'])->name('product_attr_info'); | 264 | Route::get('attr/info', [\App\Http\Controllers\Bside\Product\AttrController::class, 'info'])->name('product_attr_info'); |
-
请 注册 或 登录 后发表评论