|
|
|
@ -146,13 +146,13 @@ class Category extends Controller |
|
|
|
|
unset($temp2['rankimage']); |
|
|
|
|
unset($temp2['category_id']); |
|
|
|
|
|
|
|
|
|
Db::table('yoshop_category')->insertGetId($temp2); |
|
|
|
|
$thirdid = Db::table('yoshop_category')->insertGetId($temp2); |
|
|
|
|
if (!isset($value2['children']) || !$value2['children']) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
foreach ($value2['children'] as $value3) { |
|
|
|
|
$value3 = $value3->toArray(); |
|
|
|
|
$value3['parent_id'] = $secondid; |
|
|
|
|
$value3['parent_id'] = $thirdid; |
|
|
|
|
$value3['store_id'] = $new_store_id; |
|
|
|
|
$value3['create_time'] = time(); |
|
|
|
|
$value3['update_time'] = time(); |
|
|
|
@ -165,13 +165,13 @@ class Category extends Controller |
|
|
|
|
unset($temp3['rankimage']); |
|
|
|
|
unset($temp3['category_id']); |
|
|
|
|
|
|
|
|
|
Db::table('yoshop_category')->insertGetId($temp3); |
|
|
|
|
$fourthid = Db::table('yoshop_category')->insertGetId($temp3); |
|
|
|
|
if (!isset($value3['children']) || !$value3['children']) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
foreach ($value3['children'] as $value4) { |
|
|
|
|
$value4 = $value4->toArray(); |
|
|
|
|
$value4['parent_id'] = $secondid; |
|
|
|
|
$value4['parent_id'] = $fourthid; |
|
|
|
|
$value4['store_id'] = $new_store_id; |
|
|
|
|
$value4['create_time'] = time(); |
|
|
|
|
$value4['update_time'] = time(); |
|
|
|
|