作者 lyh

gx

... ... @@ -83,8 +83,8 @@ class UpdateSeoTdk extends Command
$list = DB::connection('custom_mysql')->table('gl_product')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
if(!empty($list)){
foreach ($list as $v){
echo date('Y-m-d H:i:s') . ' updateProduct: ' . $v['id'] . PHP_EOL;
$v = (array)$v;
echo date('Y-m-d H:i:s') . ' updateProduct: ' . $v['id'] . PHP_EOL;
$seo_arr = json_decode($v['seo_mate'], true) ?: [];
//更新seo_title
if(!isset($seo_arr['title']) || empty($seo_arr['title'])){
... ... @@ -125,8 +125,8 @@ class UpdateSeoTdk extends Command
$list = DB::connection('custom_mysql')->table('gl_product_category')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
if(!empty($list)){
foreach ($list as $v){
echo date('Y-m-d H:i:s') . ' updateProductCate: ' . $v['id'] . PHP_EOL;
$v = (array)$v;
echo date('Y-m-d H:i:s') . ' updateProductCate: ' . $v['id'] . PHP_EOL;
$data = [];
if(empty($v['seo_title'])){
$aiCommandModel = new AiCommand();
... ... @@ -167,8 +167,8 @@ class UpdateSeoTdk extends Command
$list = DB::connection('custom_mysql')->table('gl_news')->where(['status'=>1,'project_id'=>$project_id])->get()->toArray();
if(!empty($list)){
foreach ($list as $k => $v){
echo date('Y-m-d H:i:s') . ' updateNews: ' . $v['id'] . PHP_EOL;
$v = (array)$v;
echo date('Y-m-d H:i:s') . ' updateNews: ' . $v['id'] . PHP_EOL;
$data = [];
if(empty($v['seo_title'])){
$aiCommandModel = new AiCommand();
... ...