/**
  * アップロードファイルを指定のフォルダに移動する
  *
  * @access private
  * @param mixed $fleamarket_id フリマID
  * @return void
  * @author kobayashi
  */
 private function storeImages($fleamarket_id)
 {
     $files = \Session::get_flash('admin.fleamarket.files');
     if (!$files) {
         return false;
     }
     $tmp_path = \Config::get('master.image_path.temporary_admin');
     $src_path = DOCROOT . $tmp_path;
     $store_path = \Config::get('master.image_path.store');
     $dest_path = DOCROOT . $store_path . $fleamarket_id . '/';
     \Model_Fleamarket_Image::storeUploadFile($files, $src_path, $dest_path);
     return $files;
 }
 /**
  * フリマイメージ画像情報登録・更新
  *
  * @access private
  * @param mixed $fleamarket_id フリマID
  * @return bool
  * @author ida
  */
 private function saveFleamarketImage($fleamarket_id)
 {
     $upload_files = \Session::get_flash('upload_files');
     if (!$upload_files) {
         return;
     }
     foreach ($upload_files as $file) {
         $priority = str_replace('image_', '', $file['field']);
         $fleamarket_image_data = array('priority' => $priority, 'file_name' => $file['saved_as']);
         $fleamarket_image = \Model_Fleamarket_Image::query()->where('fleamarket_id', $fleamarket_id)->where('priority', $priority)->get_one();
         if ($fleamarket_image) {
             $fleamarket_image_data['updated_user'] = $this->login_user->user_id;
         } else {
             $fleamarket_image = \Model_Fleamarket_Image::forge();
             $fleamarket_image_data['fleamarket_id'] = $fleamarket_id;
             $fleamarket_image_data['created_user'] = $this->login_user->user_id;
         }
         $fleamarket_image->set($fleamarket_image_data)->save();
     }
     $tmp_path = \Config::get('master.image_path.temporary_user');
     $src_path = DOCROOT . $tmp_path;
     $store_path = \Config::get('master.image_path.store');
     $dest_path = DOCROOT . $store_path . $fleamarket_id . '/';
     \Model_Fleamarket_Image::storeUploadFile($upload_files, $src_path, $dest_path);
 }