This commit is contained in:
2025-06-20 16:05:04 +08:00
parent 6cf0831c3e
commit a136473171
3 changed files with 12 additions and 1 deletions
@@ -2,6 +2,7 @@
namespace app\console\controller;
use app\console\model\VehicleNewAttributeCategoriesTranslationModel;
use support\Request;
use support\Response;
use app\console\model\VehicleNewAttributesModel;
@@ -50,6 +51,11 @@ class VehicleNewAttributesController extends BaseController
'attribute_name' => isset($item['translation']) ? $item['translation']['attribute_name'] : '',
];
if(!empty($item['category_id'])){
$category = VehicleNewAttributeCategoriesTranslationModel::find($item['category_id']);
$result['category_name'] = $category['category_name'];
}
foreach ($item['value'] as $value) {
$valueRes['id'] = $value['id'];
$valueRes['attribute_id'] = $value['attribute_id'];