Просмотр исходного кода

Merge pull request #756 from visuddhinanda/wbw-analysis

relation 如果没有grammar 应该记录type
visuddhinanda 4 лет назад
Родитель
Сommit
e8eb3e5d0d
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      app/Console/Commands/UpgradeWbwAnalyses.php

+ 2 - 0
app/Console/Commands/UpgradeWbwAnalyses.php

@@ -124,6 +124,8 @@ class UpgradeWbwAnalyses extends Command
                                             $grm = explode('$',$word->gramma);
                                             $grm = explode('$',$word->gramma);
                                             if(count($grm)>0){
                                             if(count($grm)>0){
                                                 $newData['d1'] = $grm[count($grm)-1];
                                                 $newData['d1'] = $grm[count($grm)-1];
+                                            }else{
+                                                $newData['d1'] = $word->type;
                                             }
                                             }
                                         }
                                         }
                                         $newData['d2'] = (int)(explode('-',$rltValue->dest_id)[2]) - (int)(explode('-',$rltValue->sour_id)[2]) ;
                                         $newData['d2'] = (int)(explode('-',$rltValue->dest_id)[2]) - (int)(explode('-',$rltValue->sour_id)[2]) ;