Переглянути джерело

Merge branch 'kuaiyingyong' into kuaiyingyong_push

Wang Chen 4 роки тому
батько
коміт
a99c48e255

+ 71 - 73
app/Http/Controllers/QuickApp/Book/ChapterController.php

@@ -30,8 +30,8 @@ class ChapterController extends BaseController
 
 
     public function getCatalog(Request $request, $bid)
     public function getCatalog(Request $request, $bid)
     {
     {
-        $bid = BookService::decodeBidStatic($bid);
-        $lists = ChapterService::getChapterLists($bid);
+        $bid       = BookService::decodeBidStatic($bid);
+        $lists     = ChapterService::getChapterLists($bid);
         $book_info = BookConfigService::getBookById($bid);
         $book_info = BookConfigService::getBookById($bid);
         if (!$book_info) {
         if (!$book_info) {
             return response()->error('PARAM_ERROR');
             return response()->error('PARAM_ERROR');
@@ -42,14 +42,14 @@ class ChapterController extends BaseController
 
 
     public function getCatalogPerPage(Request $request, $bid)
     public function getCatalogPerPage(Request $request, $bid)
     {
     {
-        $bid = BookService::decodeBidStatic($bid);
+        $bid       = BookService::decodeBidStatic($bid);
         $book_info = BookConfigService::getBookById($bid);
         $book_info = BookConfigService::getBookById($bid);
         if (!$book_info) {
         if (!$book_info) {
             return response()->error('PARAM_ERROR');
             return response()->error('PARAM_ERROR');
         }
         }
         $page_size = $request->input('page_size', 15);
         $page_size = $request->input('page_size', 15);
         if ($page_size >= 100) $page_size = 100;
         if ($page_size >= 100) $page_size = 100;
-        $res = ChapterService::getChapterListsPage($bid, $page_size);
+        $res   = ChapterService::getChapterListsPage($bid, $page_size);
         $lists = $this->getChapterCatalog($bid, $res, $book_info);
         $lists = $this->getChapterCatalog($bid, $res, $book_info);
         return response()->pagination(new ChapterListTransformer, $lists);
         return response()->pagination(new ChapterListTransformer, $lists);
     }
     }
@@ -58,16 +58,16 @@ class ChapterController extends BaseController
     {
     {
         switch ($book_info->charge_type) {
         switch ($book_info->charge_type) {
             case 'BOOK':
             case 'BOOK':
-                $price = $this->getPrice($book_info);
+                $price          = $this->getPrice($book_info);
                 $is_need_charge = $this->isBookNeedCharge($bid, $price);
                 $is_need_charge = $this->isBookNeedCharge($bid, $price);
                 foreach ($chapters as $v) {
                 foreach ($chapters as $v) {
                     $v->is_need_charge = $v->is_vip ? $is_need_charge : false;
                     $v->is_need_charge = $v->is_vip ? $is_need_charge : false;
-                    $v->price = $price;
+                    $v->price          = $price;
                 }
                 }
                 break;
                 break;
             default:
             default:
                 foreach ($chapters as $v) {
                 foreach ($chapters as $v) {
-                    $v->price = $v->is_vip ? $this->getPrice($book_info, $v->size) : 0;
+                    $v->price          = $v->is_vip ? $this->getPrice($book_info, $v->size) : 0;
                     $v->is_need_charge = $v->is_vip ? $this->isChapterNeedCharge($bid, $v->id, $v->price) : false;
                     $v->is_need_charge = $v->is_vip ? $this->isChapterNeedCharge($bid, $v->id, $v->price) : false;
                 }
                 }
                 break;
                 break;
@@ -78,9 +78,9 @@ class ChapterController extends BaseController
     public function index(Request $request, $bid, $cid)
     public function index(Request $request, $bid, $cid)
     {
     {
         $oldbid = $bid;
         $oldbid = $bid;
-        $bid = BookService::decodeBidStatic($bid);
+        $bid    = BookService::decodeBidStatic($bid);
         //获取图书信息
         //获取图书信息
-        $book_info  = BookConfigService::getBookById($bid);
+        $book_info = BookConfigService::getBookById($bid);
         if (empty($book_info))
         if (empty($book_info))
             return response()->error('QAPP_SYS_ERROR');
             return response()->error('QAPP_SYS_ERROR');
         $this->book_info = $book_info;
         $this->book_info = $book_info;
@@ -96,7 +96,7 @@ class ChapterController extends BaseController
             dispatch($job)->onConnection('rabbitmq')->onQueue('user_rentention_queue');
             dispatch($job)->onConnection('rabbitmq')->onQueue('user_rentention_queue');
         }
         }
 
 
-        if ($chapter->is_vip == 0 && $chapter->sequence > 1) {
+        if ($chapter->is_vip == 0) {
             ReadRecordService::addReadRecord([
             ReadRecordService::addReadRecord([
                 'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
                 'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
                 'cid' => $cid, 'chapter_name' => $chapter->name
                 'cid' => $cid, 'chapter_name' => $chapter->name
@@ -117,21 +117,21 @@ class ChapterController extends BaseController
         //未付费 要提醒
         //未付费 要提醒
         $user_info = $this->user_info;
         $user_info = $this->user_info;
         //未付费 余额不足
         //未付费 余额不足
-        $fee = $this->getPrice($book_info, $chapter->size);
+        $fee  = $this->getPrice($book_info, $chapter->size);
         $data = [
         $data = [
-            'book_id' => $oldbid,
-            'book_name' => $book_info->book_name,
-            'chapter_name' => $chapter->name,
-            'chapter_id' => $cid,
-            'pay_type' => $book_info->charge_type,
-            'fee' => $fee,
-            'user_balance' => $user_info->balance,
-            'product_id' => $book_info->product_id,
-            'uid' => $this->uid,
+            'book_id'                 => $oldbid,
+            'book_name'               => $book_info->book_name,
+            'chapter_name'            => $chapter->name,
+            'chapter_id'              => $cid,
+            'pay_type'                => $book_info->charge_type,
+            'fee'                     => $fee,
+            'user_balance'            => $user_info->balance,
+            'product_id'              => $book_info->product_id,
+            'uid'                     => $this->uid,
             'distribution_channel_id' => $this->distribution_channel_id,
             'distribution_channel_id' => $this->distribution_channel_id,
-            'is_discount' => 0,
-            'discount_fee' => '',
-            'discount' => ''
+            'is_discount'             => 0,
+            'discount_fee'            => '',
+            'discount'                => ''
 
 
         ];
         ];
 
 
@@ -165,12 +165,11 @@ class ChapterController extends BaseController
     }
     }
 
 
 
 
-
     public function pay(Request $request, $bid, $cid)
     public function pay(Request $request, $bid, $cid)
     {
     {
-        $remind = (int) $request->input('remind');
-        $oldbid = $bid;
-        $bid = BookService::decodeBidStatic($bid);
+        $remind    = (int)$request->input('remind');
+        $oldbid    = $bid;
+        $bid       = BookService::decodeBidStatic($bid);
         $book_info = BookConfigService::getBookById($bid);;
         $book_info = BookConfigService::getBookById($bid);;
         if (empty($book_info)) response()->error('QAPP_SYS_ERROR');
         if (empty($book_info)) response()->error('QAPP_SYS_ERROR');
 
 
@@ -197,19 +196,19 @@ class ChapterController extends BaseController
             $fee = $this->getPrice($book_info, $chapter->size);
             $fee = $this->getPrice($book_info, $chapter->size);
 
 
             $data = [
             $data = [
-                'book_id' => $oldbid,
-                'book_name' => $book_info->book_name,
-                'chapter_name' => $chapter->name,
-                'chapter_id' => $cid,
-                'pay_type' => $book_info->charge_type,
-                'fee' => $fee,
-                'user_balance' => $this->user_info['balance'],
-                'product_id' => $book_info->product_id,
-                'uid' => $this->uid,
+                'book_id'                 => $oldbid,
+                'book_name'               => $book_info->book_name,
+                'chapter_name'            => $chapter->name,
+                'chapter_id'              => $cid,
+                'pay_type'                => $book_info->charge_type,
+                'fee'                     => $fee,
+                'user_balance'            => $this->user_info['balance'],
+                'product_id'              => $book_info->product_id,
+                'uid'                     => $this->uid,
                 'distribution_channel_id' => $this->distribution_channel_id,
                 'distribution_channel_id' => $this->distribution_channel_id,
-                'is_discount' => 0,
-                'discount_fee' => '',
-                'discount' => ''
+                'is_discount'             => 0,
+                'discount_fee'            => '',
+                'discount'                => ''
             ];
             ];
             if ($book_info->charge_type == 'BOOK') {
             if ($book_info->charge_type == 'BOOK') {
                 return response()->error('QAPP_BOOK_INSUFFICIENT_BALANCE', $data);
                 return response()->error('QAPP_BOOK_INSUFFICIENT_BALANCE', $data);
@@ -222,7 +221,6 @@ class ChapterController extends BaseController
     }
     }
 
 
 
 
-
     /**
     /**
      * 余额支付
      * 余额支付
      * @param $book_info
      * @param $book_info
@@ -233,7 +231,7 @@ class ChapterController extends BaseController
     protected function balancePay($book_info, $chapter_id, $chapter_size, $chapter_name, $is_remind)
     protected function balancePay($book_info, $chapter_id, $chapter_size, $chapter_name, $is_remind)
     {
     {
         $fee = $this->getPrice($book_info, $chapter_size);
         $fee = $this->getPrice($book_info, $chapter_size);
-        if ((int) $this->user_info['balance'] >= $fee) {
+        if ((int)$this->user_info['balance'] >= $fee) {
             if ($this->bookOrderOrChapterOrder($book_info, $chapter_id, $fee, $chapter_name, $is_remind)) {
             if ($this->bookOrderOrChapterOrder($book_info, $chapter_id, $fee, $chapter_name, $is_remind)) {
                 return true;
                 return true;
             }
             }
@@ -256,12 +254,12 @@ class ChapterController extends BaseController
         if (!$chapter_content) return false;
         if (!$chapter_content) return false;
         $chapter->content = trim(str_replace($chapter_content->name, '', $chapter_content->content));
         $chapter->content = trim(str_replace($chapter_content->name, '', $chapter_content->content));
         //统计点击率
         //统计点击率
-        $key = 'book_click_num_bid_' . $bid;
+        $key   = 'book_click_num_bid_' . $bid;
         $field = date('Y-m-d');
         $field = date('Y-m-d');
-        $old = Redis::hget($key, $field);
-        if (!$old)  $old = 0;
+        $old   = Redis::hget($key, $field);
+        if (!$old) $old = 0;
         Redis::hset($key, $field, $old + 1);
         Redis::hset($key, $field, $old + 1);
-        $force_add_desk_type = $this->addDesktopType($bid, $chapter->sequence);
+        $force_add_desk_type          = $this->addDesktopType($bid, $chapter->sequence);
         $chapter->force_add_desk_type = $force_add_desk_type;
         $chapter->force_add_desk_type = $force_add_desk_type;
         //统计
         //统计
         $this->stats();
         $this->stats();
@@ -279,26 +277,26 @@ class ChapterController extends BaseController
     {
     {
         if ($book_info['charge_type'] == 'BOOK') {
         if ($book_info['charge_type'] == 'BOOK') {
             $data = [
             $data = [
-                'uid' => $this->uid,
-                'fee' => $fee,
-                'u' => $this->send_order_id,
+                'uid'                     => $this->uid,
+                'fee'                     => $fee,
+                'u'                       => $this->send_order_id,
                 'distribution_channel_id' => $this->distribution_channel_id,
                 'distribution_channel_id' => $this->distribution_channel_id,
-                'bid' => $book_info->bid,
-                'book_name' => $book_info->book_name,
-                'send_order_id' => $this->send_order_id,
+                'bid'                     => $book_info->bid,
+                'book_name'               => $book_info->book_name,
+                'send_order_id'           => $this->send_order_id,
             ];
             ];
             return BookOrderService::addOrderRecodeAndDecrUserBalance($data, $this->uid);
             return BookOrderService::addOrderRecodeAndDecrUserBalance($data, $this->uid);
         } else {
         } else {
             $data = [
             $data = [
-                'uid' => $this->uid,
-                'fee' => $fee,
-                'cid' => $chapter_id,
-                'bid' => $book_info->bid,
+                'uid'                     => $this->uid,
+                'fee'                     => $fee,
+                'cid'                     => $chapter_id,
+                'bid'                     => $book_info->bid,
                 'distribution_channel_id' => $this->distribution_channel_id,
                 'distribution_channel_id' => $this->distribution_channel_id,
-                'book_name' => $book_info->book_name,
-                'chapter_name' => $chapter_name,
-                'send_order_id' => $this->send_order_id,
-                'is_remind' => $is_remind
+                'book_name'               => $book_info->book_name,
+                'chapter_name'            => $chapter_name,
+                'send_order_id'           => $this->send_order_id,
+                'is_remind'               => $is_remind
             ];
             ];
             if ($is_remind) {
             if ($is_remind) {
                 $this->addOrderRemind($book_info->bid);
                 $this->addOrderRemind($book_info->bid);
@@ -308,7 +306,7 @@ class ChapterController extends BaseController
     }
     }
 
 
 
 
-    protected  function  addOrderRemind($bid)
+    protected function addOrderRemind($bid)
     {
     {
         if (ChapterReminderService::checkIsNoReminder($this->uid, $bid)) {
         if (ChapterReminderService::checkIsNoReminder($this->uid, $bid)) {
             return true;
             return true;
@@ -317,6 +315,7 @@ class ChapterController extends BaseController
             return true;
             return true;
         }
         }
     }
     }
+
     /**
     /**
      * 是否订购提醒
      * 是否订购提醒
      * @param $chapter_id
      * @param $chapter_id
@@ -333,7 +332,7 @@ class ChapterController extends BaseController
      * @param $uid
      * @param $uid
      * @return bool
      * @return bool
      */
      */
-    protected  function getSubscribe()
+    protected function getSubscribe()
     {
     {
         $res = ForceSubscribeService::forceSubscribeUsersByUid(['uid' => $this->uid]);
         $res = ForceSubscribeService::forceSubscribeUsersByUid(['uid' => $this->uid]);
         if ($res) return true;
         if ($res) return true;
@@ -363,7 +362,7 @@ class ChapterController extends BaseController
         //章节订购记录
         //章节订购记录
         $chapterOrder = new ChapterOrderService();
         $chapterOrder = new ChapterOrderService();
 
 
-        if ($chapterOrder->checkIsOrdered($uid, $bid, $chapter_id))  return true;
+        if ($chapterOrder->checkIsOrdered($uid, $bid, $chapter_id)) return true;
 
 
         return false;
         return false;
     }
     }
@@ -383,7 +382,7 @@ class ChapterController extends BaseController
                 return 1399;
                 return 1399;
             } else {
             } else {
                 $this->is_first_book_order = 1;
                 $this->is_first_book_order = 1;
-                return  899;
+                return 899;
             }
             }
         } else {
         } else {
             $fee = BookService::getPrice($book_info, $this->distribution_channel_id, $chapter_size);
             $fee = BookService::getPrice($book_info, $this->distribution_channel_id, $chapter_size);
@@ -392,7 +391,6 @@ class ChapterController extends BaseController
     }
     }
 
 
 
 
-
     /**
     /**
      * 用户添加标签
      * 用户添加标签
      * @param $book_info
      * @param $book_info
@@ -402,14 +400,14 @@ class ChapterController extends BaseController
         if (!UserDeepReadTagService::isAddTag($this->uid, $book_info->bid)) {
         if (!UserDeepReadTagService::isAddTag($this->uid, $book_info->bid)) {
             try {
             try {
                 UserDeepReadTagService::addTag([
                 UserDeepReadTagService::addTag([
-                    'uid' => $this->uid,
-                    'bid' => $book_info->bid,
-                    'book_name' => $book_info->book_name,
-                    'category_id' => $book_info->category_id,
-                    'category_name' => $book_info->category_name,
-                    'sex_preference' => $book_info->channel_name ? $book_info->channel_name : '',
+                    'uid'                     => $this->uid,
+                    'bid'                     => $book_info->bid,
+                    'book_name'               => $book_info->book_name,
+                    'category_id'             => $book_info->category_id,
+                    'category_name'           => $book_info->category_name,
+                    'sex_preference'          => $book_info->channel_name ? $book_info->channel_name : '',
                     'distribution_channel_id' => $this->distribution_channel_id ? $this->distribution_channel_id : '0',
                     'distribution_channel_id' => $this->distribution_channel_id ? $this->distribution_channel_id : '0',
-                    'send_order_id' => $this->send_order_id,
+                    'send_order_id'           => $this->send_order_id,
                 ]);
                 ]);
             } catch (\Exception  $e) {
             } catch (\Exception  $e) {
             }
             }
@@ -467,10 +465,10 @@ class ChapterController extends BaseController
     private function addDesktopType($bid, $sequence)
     private function addDesktopType($bid, $sequence)
     {
     {
         $force_add_desk_type = 0;
         $force_add_desk_type = 0;
-        $send_order_id = ReadRecordService::getSendOrderId($this->uid);
+        $send_order_id       = ReadRecordService::getSendOrderId($this->uid);
         if (!$send_order_id) return $force_add_desk_type;
         if (!$send_order_id) return $force_add_desk_type;
         $send_order_info = SendOrderService::getById($send_order_id);
         $send_order_info = SendOrderService::getById($send_order_id);
-        if (!$send_order_info)  return $force_add_desk_type;
+        if (!$send_order_info) return $force_add_desk_type;
         if ($send_order_info->book_id == $bid) {
         if ($send_order_info->book_id == $bid) {
             if ($send_order_info->force_add_desk_type == 1 && $send_order_info->force_add_desk_seq) {
             if ($send_order_info->force_add_desk_type == 1 && $send_order_info->force_add_desk_seq) {
                 if ($sequence >= $send_order_info->force_add_desk_seq) {
                 if ($sequence >= $send_order_info->force_add_desk_seq) {

+ 3 - 24
app/Http/Controllers/QuickApp/User/ReadRecordController.php

@@ -65,8 +65,7 @@ class ReadRecordController extends BaseController
     public function index(Request $request)
     public function index(Request $request)
     {
     {
         $user = $this->user_info;
         $user = $this->user_info;
-        $is_check_from_db = (time() - strtotime($user->created_at) > 5 * 30 * SysConsts::ONE_DAY_SECONDS);
-        $res = ReadRecordService::getReadRecord($this->uid, $is_check_from_db);
+        $res = ReadRecordService::getReadRecord($this->uid);
         if ($res) {
         if ($res) {
             $id_arr = [];
             $id_arr = [];
             foreach ($res as $key => $value) {
             foreach ($res as $key => $value) {
@@ -79,39 +78,19 @@ class ReadRecordController extends BaseController
                 $value['last_chapter'] = 0;
                 $value['last_chapter'] = 0;
                 foreach ($book as  $val) {
                 foreach ($book as  $val) {
                     if ($value['bid'] == $val->bid) {
                     if ($value['bid'] == $val->bid) {
+                        $value['book_name'] = $val->book_name;
                         $value['cover'] = $val->cover;
                         $value['cover'] = $val->cover;
                         $value['last_chapter'] = $val->last_chapter;
                         $value['last_chapter'] = $val->last_chapter;
                         break;
                         break;
                     }
                     }
                 }
                 }
             }
             }
-
-            $shelf = UserShelfBooksService::getUserShelfBooksListByUid($this->uid);
-            foreach ($res as &$v) {
-                $v['is_on_user_shelf'] = 0;
-                foreach ($shelf as $val) {
-                    if ($v['bid'] == $val->bid) {
-                        $v['is_on_user_shelf'] = 1;
-                        break;
-                    }
-                }
-            }
         }
         }
         usort($res, function ($a, $b) {
         usort($res, function ($a, $b) {
             if ($a['time'] >= $b['time']) return -1;
             if ($a['time'] >= $b['time']) return -1;
             return 1;
             return 1;
         });
         });
-        $res = json_encode($res);
-        $res = json_decode($res);
-        foreach ($res as $key => &$each) {
-            $rec = ShareUsersService::getUnlocked($this->uid, $each->bid);
-            if ($rec) {
-                $each->is_advertise_sub = 1;
-            } else {
-                $each->is_advertise_sub = 0;
-            }
-        }
-        return response()->collection(new ReadRecordTransformer(), $res);
+        return response()->collection(new ReadRecordTransformer(),  array_to_object($res));
     }
     }
 
 
 
 

+ 2 - 4
app/Http/Controllers/QuickApp/User/Transformers/ReadRecordTransformer.php

@@ -9,15 +9,13 @@ class ReadRecordTransformer
     public function transform($res)
     public function transform($res)
     {
     {
         return [
         return [
-            'bid' => Hashids::encode($res->bid),
+            'book_id' => Hashids::encode($res->bid),
             'cid' => $res->cid,
             'cid' => $res->cid,
             'book_name' => $res->book_name,
             'book_name' => $res->book_name,
             'chapter_name' => $res->chapter_name,
             'chapter_name' => $res->chapter_name,
             'time' => $res->time,
             'time' => $res->time,
             'cover' => $res->cover,
             'cover' => $res->cover,
-            'last_chapter' => $res->last_chapter,
-            'is_on_user_shelf' => $res->is_on_user_shelf,
-            'is_advertise_sub' => isset($res->is_advertise_sub) ? $res->is_advertise_sub : 0
+            'last_chapter' => $res->last_chapter
         ];
         ];
     }
     }
 }
 }

+ 12 - 13
app/Http/Controllers/QuickApp/User/UserShelfBooksController.php

@@ -22,16 +22,16 @@ class UserShelfBooksController extends BaseController
         }
         }
         $record = ReadRecordService::getReadRecord($this->uid);
         $record = ReadRecordService::getReadRecord($this->uid);
         foreach ($res as &$v) {
         foreach ($res as &$v) {
-            $bid = $v['bid'];
-            $last_cid = $v['last_cid'];
-            $last_chapter = ChapterService::getChapterNameByID($last_cid, $bid);
+            $bid               = $v['bid'];
+            $last_cid          = $v['last_cid'];
+            $last_chapter      = ChapterService::getChapterNameByID($last_cid, $bid);
             $v['last_chapter'] = "最后章节:{$last_chapter['name']}";
             $v['last_chapter'] = "最后章节:{$last_chapter['name']}";
             foreach ($record as $val) {
             foreach ($record as $val) {
                 if ($v['bid'] == $val['bid']) {
                 if ($v['bid'] == $val['bid']) {
-                    $v['updated_at'] = $val['time'];
-                    $recent_reading_cid = $val['cid'];
-                    $v['recent_cid'] = $recent_reading_cid;
-                    $recent_reading_chapter = ChapterService::getChapterNameById($recent_reading_cid, $bid);
+                    $v['updated_at']             = $val['time'];
+                    $recent_reading_cid          = $val['cid'];
+                    $v['recent_cid']             = $recent_reading_cid;
+                    $recent_reading_chapter      = ChapterService::getChapterNameById($recent_reading_cid, $bid);
                     $v['recent_reading_chapter'] = "最近阅读:{$recent_reading_chapter['name']}";
                     $v['recent_reading_chapter'] = "最近阅读:{$recent_reading_chapter['name']}";
                     break;
                     break;
                 }
                 }
@@ -66,11 +66,10 @@ class UserShelfBooksController extends BaseController
             return response()->error('LACK_PARAM');
             return response()->error('LACK_PARAM');
         }
         }
 
 
-        $param['uid'] = $this->uid;
-        $param['bid'] = Hashids::decode($param['bid'])[0];
+        $param['uid']                     = $this->uid;
+        $param['bid']                     = Hashids::decode($param['bid'])[0];
         $param['distribution_channel_id'] = $this->distribution_channel_id;
         $param['distribution_channel_id'] = $this->distribution_channel_id;
-        $res = null;
-        $res = UserShelfBooksService::create($param);
+        $res                              = UserShelfBooksService::create($param);
         try {
         try {
         } catch (\Exception $e) {
         } catch (\Exception $e) {
             return response()->error('QAPP_PARAM_ERROR');
             return response()->error('QAPP_PARAM_ERROR');
@@ -108,7 +107,7 @@ class UserShelfBooksController extends BaseController
         if (empty($bid)) return response()->error('LACK_PARAM');
         if (empty($bid)) return response()->error('LACK_PARAM');
         $param['uid'] = $this->uid;
         $param['uid'] = $this->uid;
         $param['bid'] = Hashids::decode($bid)[0];
         $param['bid'] = Hashids::decode($bid)[0];
-        $res = UserShelfBooksService::del($this->uid, $param['bid']);
+        $res          = UserShelfBooksService::del($this->uid, $param['bid']);
         if ($res) {
         if ($res) {
             return response()->success();
             return response()->success();
         }
         }
@@ -138,7 +137,7 @@ class UserShelfBooksController extends BaseController
      *               is_on:0
      *               is_on:0
      *           }
      *           }
      */
      */
-    public function  isOnshelf(Request $request)
+    public function isOnshelf(Request $request)
     {
     {
         $bid = $request->input('bid');
         $bid = $request->input('bid');
         if (!$bid) return response()->error('LACK_PARAM');
         if (!$bid) return response()->error('LACK_PARAM');