This commit is contained in:
2025-06-18 14:05:52 +08:00
parent 93ee1c3d47
commit 0955e8c9d8
28 changed files with 1483 additions and 0 deletions
@@ -2,6 +2,8 @@
namespace app\apis\controller;
use app\apis\model\VehicleNewAttributesTranslationModel;
use app\apis\model\VehicleNewAttributeValuesTranslationModel;
use support\Request;
use support\Response;
use app\apis\model\VehicleNewModel;
@@ -104,6 +106,16 @@ class VehicleNewController extends BaseController
$contentRes['content'] = isset($content['translation']) ? $content['translation']['content']:'';
$result['content'][] = $contentRes;
}
foreach ($item['sku'] as &$sku) {
foreach ($sku['skuAttributes'] as &$skuAttribute){
$attribute = VehicleNewAttributesTranslationModel::where(['attributes_id' => $skuAttribute['attribute']['id'],'locale'=>locale()])->first();
$value = VehicleNewAttributeValuesTranslationModel::where(['values_id' => $skuAttribute['value']['id'],'locale'=>locale()])->first();
$skuAttribute['attribute']['attribute_name'] = $attribute['attribute_name'] ;
$skuAttribute['value']['value_name'] = $value['value_name'];
}
$result['sku'][] = $sku;
}
return $result;
}