|
...
|
...
|
@@ -133,11 +133,12 @@ class LyhImportTest extends Command |
|
|
|
'product_id'=>$id
|
|
|
|
];
|
|
|
|
$faqId = $columnModel->addReturnId($detailFaq);
|
|
|
|
|
|
|
|
$faqsDetail = json_decode($val[4],true);
|
|
|
|
$faqContent = '';
|
|
|
|
if(!empty($faqsDetail) && is_array($faqContent)){
|
|
|
|
if(!empty($faqsDetail) && is_array($faqsDetail)){
|
|
|
|
foreach ($faqsDetail as $faq_Val){
|
|
|
|
$faqContent = "question:".$faq_Val['question'] . "<br />" . "answer:".$faq_Val['answer']. "<br />";
|
|
|
|
$faqContent .= "question:".$faq_Val['question'] . "<br />" . "answer:".$faq_Val['answer']. "<br />";
|
|
|
|
}
|
|
|
|
$detailFaqInfo = [
|
|
|
|
'product_id'=>$id,
|
|
...
|
...
|
@@ -146,6 +147,8 @@ class LyhImportTest extends Command |
|
|
|
'content'=>json_encode(['content'=>$faqContent])
|
|
|
|
];
|
|
|
|
$detailModel->addReturnId($detailFaqInfo);
|
|
|
|
}else{
|
|
|
|
echo date('Y-m-d H:i:s') . '产品标题:'. $val[1] . PHP_EOL .'faqs数据有问题:' . $val[4];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
...
|
...
|
|