UpdateController.php
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* @remark :
* @name :UpdateController.php
* @author :lyh
* @method :post
* @time :2023/8/19 9:08
*/
namespace App\Http\Controllers\Bside\BCom;
use App\Http\Controllers\Bside\BaseController;
use App\Models\Product\Product;
/**
* @remark :b端网站更新相关
* @name :UpdateController
* @author :lyh
* @method :post
* @time :2023/8/19 9:08
*/
class UpdateController extends BaseController
{
/**
* @remark :一键更新所有tdk
* @name :updateSeoTdk
* @author :lyh
* @method :post
* @time :2023/8/19 9:25
*/
public function updateSeoTdk(){
}
/**
* @remark :更新产品tdk
* @name :updateProduct
* @author :lyh
* @method :post
* @time :2023/8/19 9:25
*/
public function updateProduct(){
$productModel = new Product();
$list = $productModel->list(['status'=>Product::STATUS_ON,'project_id'=>$this->user['project_id'],'deleted_at'=>null]);
foreach ($list as $k => $v){
if(!empty($v['seo_mate'])){
$seo_arr = json_decode($v['seo_mate']);
//更新seo_title
if(!isset($seo_arr['title']) || empty($seo_arr['title'])){
}
//更新seo_keyword
if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){
}
//更新seo_keyword
if(!isset($seo_arr['keyword']) || empty($seo_arr['keyword'])){
}
}
}
}
}