合并分支 'lyh-server' 到 'master'
gx数据 查看合并请求 !1426
正在显示
1 个修改的文件
包含
11 行增加
和
3 行删除
| @@ -53,8 +53,8 @@ class LyhImportTest extends Command | @@ -53,8 +53,8 @@ class LyhImportTest extends Command | ||
| 53 | public function handle(){ | 53 | public function handle(){ |
| 54 | ProjectServer::useProject(3283); | 54 | ProjectServer::useProject(3283); |
| 55 | echo date('Y-m-d H:i:s') . 'start' . PHP_EOL; | 55 | echo date('Y-m-d H:i:s') . 'start' . PHP_EOL; |
| 56 | - $this->importProductCategory('https://ecdn6.globalso.com/upload/p/3283/file/2025-03/zy_boss_pricelistcat_202503131025.csv','3283'); | ||
| 57 | -// $this->importProduct('https://ecdn6.globalso.com/upload/p/1/file/2025-03/zy_boss_price_copy1.csv',3283); | 56 | +// $this->importProductCategory('https://ecdn6.globalso.com/upload/p/3283/file/2025-03/zy_boss_pricelistcat_202503131025.csv','3283'); |
| 57 | + $this->importProduct('https://ecdn6.globalso.com/upload/p/3283/file/2025-03/zy_boss_price_copy1_202503121340.csv',3283); | ||
| 58 | DB::disconnect('custom_mysql'); | 58 | DB::disconnect('custom_mysql'); |
| 59 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; | 59 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; |
| 60 | } | 60 | } |
| @@ -139,6 +139,7 @@ class LyhImportTest extends Command | @@ -139,6 +139,7 @@ class LyhImportTest extends Command | ||
| 139 | $cateModel = new Category(); | 139 | $cateModel = new Category(); |
| 140 | $productModel = new Product(); | 140 | $productModel = new Product(); |
| 141 | $detailModel = new Detail(); | 141 | $detailModel = new Detail(); |
| 142 | + $columnModel = new Column(); | ||
| 142 | foreach ($line_of_text as $k => $val){ | 143 | foreach ($line_of_text as $k => $val){ |
| 143 | if($k < 2){ | 144 | if($k < 2){ |
| 144 | continue; | 145 | continue; |
| @@ -180,6 +181,13 @@ class LyhImportTest extends Command | @@ -180,6 +181,13 @@ class LyhImportTest extends Command | ||
| 180 | 'content'=>json_encode(['content'=>$val[3]]) | 181 | 'content'=>json_encode(['content'=>$val[3]]) |
| 181 | ]; | 182 | ]; |
| 182 | $detailModel->addReturnId($detail); | 183 | $detailModel->addReturnId($detail); |
| 184 | + //扩展描述设置 | ||
| 185 | + $detailFaq = [ | ||
| 186 | + 'column_name'=>'FAQs', | ||
| 187 | + 'product_id'=>$id | ||
| 188 | + ]; | ||
| 189 | + $faqId = $columnModel->addReturnId($detailFaq); | ||
| 190 | + | ||
| 183 | $faqsDetail = json_decode($val[4],true); | 191 | $faqsDetail = json_decode($val[4],true); |
| 184 | if(!empty($faqsDetail) && is_array($faqsDetail)){ | 192 | if(!empty($faqsDetail) && is_array($faqsDetail)){ |
| 185 | $faqContent = '<div>'; | 193 | $faqContent = '<div>'; |
| @@ -189,7 +197,7 @@ class LyhImportTest extends Command | @@ -189,7 +197,7 @@ class LyhImportTest extends Command | ||
| 189 | $faqContent .= '</div>'; | 197 | $faqContent .= '</div>'; |
| 190 | $detailFaqInfo = [ | 198 | $detailFaqInfo = [ |
| 191 | 'product_id'=>$id, | 199 | 'product_id'=>$id, |
| 192 | - 'column_id'=>1, | 200 | + 'column_id'=>$faqId, |
| 193 | 'text_type'=>1, | 201 | 'text_type'=>1, |
| 194 | 'content'=>json_encode(['content'=>$faqContent]) | 202 | 'content'=>json_encode(['content'=>$faqContent]) |
| 195 | ]; | 203 | ]; |
-
请 注册 或 登录 后发表评论