正在显示
1 个修改的文件
包含
20 行增加
和
18 行删除
| @@ -43,7 +43,7 @@ class Temp extends Command | @@ -43,7 +43,7 @@ class Temp extends Command | ||
| 43 | 43 | ||
| 44 | public function handle() | 44 | public function handle() |
| 45 | { | 45 | { |
| 46 | - | 46 | + $this->specialImport(); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| @@ -54,8 +54,8 @@ class Temp extends Command | @@ -54,8 +54,8 @@ class Temp extends Command | ||
| 54 | */ | 54 | */ |
| 55 | public function specialImport() | 55 | public function specialImport() |
| 56 | { | 56 | { |
| 57 | - $file_url = 'https://ecdn6.globalso.com/upload/p/3531/file/2025-06/news.csv'; | ||
| 58 | - $domain = 'www.hybio.com.cn'; | 57 | + $file_url = 'https://ecdn6.globalso.com/upload/p/3531/file/2025-07/www-cninfo-com-cn_news_v1-1.csv'; |
| 58 | + $domain = 'static.cninfo.com.cn'; | ||
| 59 | $project_id = 3531; | 59 | $project_id = 3531; |
| 60 | $is_gbk = 0; | 60 | $is_gbk = 0; |
| 61 | $file_code_type = $this->get_code_type($file_url); | 61 | $file_code_type = $this->get_code_type($file_url); |
| @@ -137,8 +137,10 @@ class Temp extends Command | @@ -137,8 +137,10 @@ class Temp extends Command | ||
| 137 | 137 | ||
| 138 | protected function importModule($project_id, $domain, $data) | 138 | protected function importModule($project_id, $domain, $data) |
| 139 | { | 139 | { |
| 140 | + $module_id = 4; | ||
| 141 | + $category_id = 3; | ||
| 140 | $model = new CustomModuleContent(); | 142 | $model = new CustomModuleContent(); |
| 141 | - $module = $model->read(['name' => $data[0]]); | 143 | + $module = $model->read(['module_id' => $module_id, 'name' => $data[0]]); |
| 142 | if (!$module) { | 144 | if (!$module) { |
| 143 | 145 | ||
| 144 | $content = ''; | 146 | $content = ''; |
| @@ -164,20 +166,20 @@ class Temp extends Command | @@ -164,20 +166,20 @@ class Temp extends Command | ||
| 164 | $content = $data[4]; | 166 | $content = $data[4]; |
| 165 | } | 167 | } |
| 166 | 168 | ||
| 167 | - $seo_title = ''; | ||
| 168 | - if ($data[6] ?? '') { | ||
| 169 | - $seo_title = substr(strip_tags($data[6]), 0, 70); | ||
| 170 | - } | 169 | + $seo_title = '巨潮资讯网'; |
| 170 | +// if ($data[6] ?? '') { | ||
| 171 | +// $seo_title = substr(strip_tags($data[6]), 0, 70); | ||
| 172 | +// } | ||
| 171 | 173 | ||
| 172 | - $seo_keywords = ''; | ||
| 173 | - if ($data[7] ?? '') { | ||
| 174 | - $seo_keywords = substr(strip_tags(str_replace('^v6sp$', ',', $data[7])), 0, 255); | ||
| 175 | - } | 174 | + $seo_keywords = '巨潮资讯网,巨潮网,巨潮资讯,上市公司公告,巨潮,信息披露,法定披露,披露,创业板,基金,债券,财务数据,网络投票,互动易'; |
| 175 | +// if ($data[7] ?? '') { | ||
| 176 | +// $seo_keywords = substr(strip_tags(str_replace('^v6sp$', ',', $data[7])), 0, 255); | ||
| 177 | +// } | ||
| 176 | 178 | ||
| 177 | - $seo_description = ''; | ||
| 178 | - if ($data[8] ?? '') { | ||
| 179 | - $seo_description = substr(strip_tags($data[8]), 0, 200); | ||
| 180 | - } | 179 | + $seo_description = '巨潮资讯网是中国证监会指定的上市公司信息披露网站,平台提供上市公司公告、公司资讯、公司互动、股东大会网络投票等内容功能,一站式服务资本市场投资者。'; |
| 180 | +// if ($data[8] ?? '') { | ||
| 181 | +// $seo_description = substr(strip_tags($data[8]), 0, 200); | ||
| 182 | +// } | ||
| 181 | 183 | ||
| 182 | $release_at = date('Y-m-d H:i:s'); | 184 | $release_at = date('Y-m-d H:i:s'); |
| 183 | if ($data[9] ?? '') { | 185 | if ($data[9] ?? '') { |
| @@ -188,8 +190,8 @@ class Temp extends Command | @@ -188,8 +190,8 @@ class Temp extends Command | ||
| 188 | $id = $model->addReturnId( | 190 | $id = $model->addReturnId( |
| 189 | [ | 191 | [ |
| 190 | 'name' => $data[0], | 192 | 'name' => $data[0], |
| 191 | - 'category_id' => ',1,', | ||
| 192 | - 'module_id' => 2, | 193 | + 'category_id' => ',' . $category_id . ',', |
| 194 | + 'module_id' => $module_id, | ||
| 193 | 'content' => $content, | 195 | 'content' => $content, |
| 194 | 'seo_title' => $seo_title, | 196 | 'seo_title' => $seo_title, |
| 195 | 'seo_keywords' => $seo_keywords, | 197 | 'seo_keywords' => $seo_keywords, |
-
请 注册 或 登录 后发表评论