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