Merge branch 'feature/article' into develop
# Conflicts: # app/console/service/VehicleNewSkusService.php
This commit is contained in:
@@ -3,12 +3,17 @@
|
||||
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\VehicleNewSkuAttributesModel;
|
||||
use app\console\model\VehicleNewSkusModel;
|
||||
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;
|
||||
@@ -279,10 +284,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
|
||||
);
|
||||
|
||||
@@ -306,10 +318,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
|
||||
);
|
||||
}
|
||||
@@ -335,10 +354,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
|
||||
);
|
||||
}
|
||||
@@ -371,10 +397,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
|
||||
);
|
||||
}
|
||||
@@ -407,10 +440,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