修改时不翻译
This commit is contained in:
@@ -3,10 +3,15 @@
|
||||
namespace app\console\service;
|
||||
|
||||
use app\console\model\VehicleNewAlbumModel;
|
||||
use app\console\model\VehicleNewAlbumTranslationModel;
|
||||
use app\console\model\VehicleNewAskedModel;
|
||||
use app\console\model\VehicleNewAskedTranslationModel;
|
||||
use app\console\model\VehicleNewContentModel;
|
||||
use app\console\model\VehicleNewContentTranslationModel;
|
||||
use app\console\model\VehicleNewModel;
|
||||
use app\console\model\VehicleNewTraitModel;
|
||||
use app\console\model\VehicleNewTraitTranslationModel;
|
||||
use app\console\model\VehicleNewTranslationModel;
|
||||
use app\mzl\common\services\BaseService;
|
||||
use app\mzl\modules\translation\service\TranslationService;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
@@ -265,10 +270,17 @@ class VehicleNewService extends BaseService
|
||||
}
|
||||
|
||||
// 异步翻译并写入 hs_vehicle_data_translation 表
|
||||
(new TranslationService())->queueTranslations(
|
||||
'vehicleNew',
|
||||
$id,
|
||||
$sourceLocale,
|
||||
// (new TranslationService())->queueTranslations(
|
||||
// 'vehicleNew',
|
||||
// $id,
|
||||
// $sourceLocale,
|
||||
// $sourceFields
|
||||
// );
|
||||
VehicleNewTranslationModel::updateOrCreate(
|
||||
[
|
||||
'vehicle_id' => $id,
|
||||
'locale' => $sourceLocale,
|
||||
],
|
||||
$sourceFields
|
||||
);
|
||||
|
||||
@@ -292,10 +304,17 @@ class VehicleNewService extends BaseService
|
||||
$askedId = $asked_res->id;
|
||||
$askedsId[] = $askedId;
|
||||
}
|
||||
(new TranslationService())->queueTranslations(
|
||||
'vehicleNewAsked',
|
||||
$askedId,
|
||||
$sourceLocale,
|
||||
// (new TranslationService())->queueTranslations(
|
||||
// 'vehicleNewAsked',
|
||||
// $askedId,
|
||||
// $sourceLocale,
|
||||
// $askedsourceFields
|
||||
// );
|
||||
VehicleNewAskedTranslationModel::updateOrCreate(
|
||||
[
|
||||
'asked_id' => $askedId,
|
||||
'locale' => $sourceLocale,
|
||||
],
|
||||
$askedsourceFields
|
||||
);
|
||||
}
|
||||
@@ -321,10 +340,17 @@ class VehicleNewService extends BaseService
|
||||
$traitId = $trait_res->id;
|
||||
$traitsId[] = $traitId;
|
||||
}
|
||||
(new TranslationService())->queueTranslations(
|
||||
'vehicleNewTrait',
|
||||
$traitId,
|
||||
$sourceLocale,
|
||||
// (new TranslationService())->queueTranslations(
|
||||
// 'vehicleNewTrait',
|
||||
// $traitId,
|
||||
// $sourceLocale,
|
||||
// $traitsourceFields
|
||||
// );
|
||||
VehicleNewTraitTranslationModel::updateOrCreate(
|
||||
[
|
||||
'trait_id' => $traitId,
|
||||
'locale' => $sourceLocale,
|
||||
],
|
||||
$traitsourceFields
|
||||
);
|
||||
}
|
||||
@@ -357,10 +383,17 @@ class VehicleNewService extends BaseService
|
||||
$albumsId[] = $albumId;
|
||||
}
|
||||
|
||||
(new TranslationService())->queueTranslations(
|
||||
'vehicleNewAlbum',
|
||||
$albumId,
|
||||
$sourceLocale,
|
||||
// (new TranslationService())->queueTranslations(
|
||||
// 'vehicleNewAlbum',
|
||||
// $albumId,
|
||||
// $sourceLocale,
|
||||
// $albumsourceFields
|
||||
// );
|
||||
VehicleNewAlbumTranslationModel::updateOrCreate(
|
||||
[
|
||||
'album_id' => $albumId,
|
||||
'locale' => $sourceLocale,
|
||||
],
|
||||
$albumsourceFields
|
||||
);
|
||||
}
|
||||
@@ -393,10 +426,17 @@ class VehicleNewService extends BaseService
|
||||
$contentsId[] = $contentId;
|
||||
}
|
||||
|
||||
(new TranslationService())->queueTranslations(
|
||||
'vehicleNewContent',
|
||||
$contentId,
|
||||
$sourceLocale,
|
||||
// (new TranslationService())->queueTranslations(
|
||||
// 'vehicleNewContent',
|
||||
// $contentId,
|
||||
// $sourceLocale,
|
||||
// $contentsourceFields
|
||||
// );
|
||||
VehicleNewContentTranslationModel::updateOrCreate(
|
||||
[
|
||||
'content_id' => $contentId,
|
||||
'locale' => $sourceLocale,
|
||||
],
|
||||
$contentsourceFields
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user