合并分支 'develop' 到 'master'
Develop 查看合并请求 !491
正在显示
4 个修改的文件
包含
31 行增加
和
2 行删除
| @@ -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'); |
-
请 注册 或 登录 后发表评论