作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !880
@@ -23,6 +23,7 @@ use App\Models\Product\CategoryRelated; @@ -23,6 +23,7 @@ use App\Models\Product\CategoryRelated;
23 use App\Models\Product\Extend; 23 use App\Models\Product\Extend;
24 use App\Models\Product\ExtendInfo; 24 use App\Models\Product\ExtendInfo;
25 use App\Models\Product\Keyword; 25 use App\Models\Product\Keyword;
  26 +use App\Models\Product\KeywordRelated;
26 use App\Models\Product\Product; 27 use App\Models\Product\Product;
27 use App\Models\RouteMap\RouteMap; 28 use App\Models\RouteMap\RouteMap;
28 use App\Models\Template\BCustomTemplate; 29 use App\Models\Template\BCustomTemplate;
@@ -248,7 +249,7 @@ class ProjectUpdate extends Command @@ -248,7 +249,7 @@ class ProjectUpdate extends Command
248 if ($custom_types) { 249 if ($custom_types) {
249 $custom_model = new CustomModule(); 250 $custom_model = new CustomModule();
250 foreach ($custom_types as $v_custom) { 251 foreach ($custom_types as $v_custom) {
251 - if($project_id == 1646 && $v_custom == 'downloads'){ 252 + if ($project_id == 1646 && $v_custom == 'downloads') {
252 //项目ID:1646,不再采集downloads扩展模块 253 //项目ID:1646,不再采集downloads扩展模块
253 continue; 254 continue;
254 } 255 }
@@ -395,6 +396,8 @@ class ProjectUpdate extends Command @@ -395,6 +396,8 @@ class ProjectUpdate extends Command
395 if ($six_read) { 396 if ($six_read) {
396 //关联分类 397 //关联分类
397 CategoryRelated::saveRelated($id, array_column($category_arr, 'id')); 398 CategoryRelated::saveRelated($id, array_column($category_arr, 'id'));
  399 + //关联关键词
  400 + KeywordRelated::saveRelated($id, $keyword_id);
398 //扩展字段 401 //扩展字段
399 if ($item['extend'] ?? []) { 402 if ($item['extend'] ?? []) {
400 foreach (array_reverse($item['extend']) as $ke => $ve) { 403 foreach (array_reverse($item['extend']) as $ke => $ve) {
@@ -9,6 +9,7 @@ use App\Models\Product\Category; @@ -9,6 +9,7 @@ use App\Models\Product\Category;
9 use App\Models\Product\CategoryRelated; 9 use App\Models\Product\CategoryRelated;
10 use App\Models\Product\ExtendInfo; 10 use App\Models\Product\ExtendInfo;
11 use App\Models\Product\Keyword; 11 use App\Models\Product\Keyword;
  12 +use App\Models\Product\KeywordRelated;
12 use App\Models\Product\Product; 13 use App\Models\Product\Product;
13 use App\Models\RouteMap\RouteMap; 14 use App\Models\RouteMap\RouteMap;
14 use App\Models\Template\BTemplate; 15 use App\Models\Template\BTemplate;
@@ -894,6 +895,10 @@ class ProductLogic extends BaseLogic @@ -894,6 +895,10 @@ class ProductLogic extends BaseLogic
894 if($category_arr){ 895 if($category_arr){
895 CategoryRelated::saveRelated($id, $category_arr); 896 CategoryRelated::saveRelated($id, $category_arr);
896 } 897 }
  898 + //关联关键词
  899 + if($keyword_id){
  900 + KeywordRelated::saveRelated($id, $keyword_id);
  901 + }
897 return true; 902 return true;
898 } 903 }
899 return false; 904 return false;