|
|
|
@ -100,9 +100,11 @@ class Category extends Controller |
|
|
|
|
$value['create_time'] = time(); |
|
|
|
|
$value['update_time'] = time(); |
|
|
|
|
$value['image_id'] = $value['image_id'] ? $this->copyImage($value['image_id'], $new_store_id) : 0; |
|
|
|
|
$value['rank_image_id'] = $value['rank_image_id'] ? $this->copyImage($value['rank_image_id'], $new_store_id) : 0; |
|
|
|
|
$temp = $value; |
|
|
|
|
unset($temp['children']); |
|
|
|
|
unset($temp['image']); |
|
|
|
|
unset($temp['rankimage']); |
|
|
|
|
unset($temp['category_id']); |
|
|
|
|
|
|
|
|
|
$firstid = Db::table('yoshop_category')->insertGetId($temp); |
|
|
|
@ -116,9 +118,11 @@ class Category extends Controller |
|
|
|
|
$value1['create_time'] = time(); |
|
|
|
|
$value1['update_time'] = time(); |
|
|
|
|
$value1['image_id'] = $value1['image_id'] ? $this->copyImage($value1['image_id'], $new_store_id) : 0; |
|
|
|
|
$value1['rank_image_id'] = $value1['rank_image_id'] ? $this->copyImage($value1['rank_image_id'], $new_store_id) : 0; |
|
|
|
|
$temp1 = $value1; |
|
|
|
|
unset($temp1['children']); |
|
|
|
|
unset($temp1['image']); |
|
|
|
|
unset($temp1['rankimage']); |
|
|
|
|
unset($temp1['category_id']); |
|
|
|
|
|
|
|
|
|
$secondid = Db::table('yoshop_category')->insertGetId($temp1); |
|
|
|
@ -132,9 +136,11 @@ class Category extends Controller |
|
|
|
|
$value2['create_time'] = time(); |
|
|
|
|
$value2['update_time'] = time(); |
|
|
|
|
$value2['image_id'] = $value2['image_id'] ? $this->copyImage($value2['image_id'], $new_store_id) : 0; |
|
|
|
|
$value2['rank_image_id'] = $value2['rank_image_id'] ? $this->copyImage($value2['rank_image_id'], $new_store_id) : 0; |
|
|
|
|
$temp2 = $value2; |
|
|
|
|
unset($temp2['children']); |
|
|
|
|
unset($temp2['image']); |
|
|
|
|
unset($temp2['rankimage']); |
|
|
|
|
unset($temp2['category_id']); |
|
|
|
|
|
|
|
|
|
Db::table('yoshop_category')->insertGetId($temp2); |
|
|
|
@ -148,9 +154,11 @@ class Category extends Controller |
|
|
|
|
$value3['create_time'] = time(); |
|
|
|
|
$value3['update_time'] = time(); |
|
|
|
|
$value3['image_id'] = $value3['image_id'] ? $this->copyImage($value3['image_id'], $new_store_id) : 0; |
|
|
|
|
$value3['rank_image_id'] = $value3['rank_image_id'] ? $this->copyImage($value3['rank_image_id'], $new_store_id) : 0; |
|
|
|
|
$temp3 = $value3; |
|
|
|
|
unset($temp3['children']); |
|
|
|
|
unset($temp3['image']); |
|
|
|
|
unset($temp3['rankimage']); |
|
|
|
|
unset($temp3['category_id']); |
|
|
|
|
|
|
|
|
|
Db::table('yoshop_category')->insertGetId($temp3); |
|
|
|
|