|
@@ -583,13 +583,28 @@ class ChapterController extends BaseController
|
|
|
* @param $chapter_size
|
|
|
* @return float
|
|
|
*/
|
|
|
- protected function getPrice($book_info, $chapter_size = 0)
|
|
|
+ /*protected function getPrice_($book_info, $chapter_size = 0)
|
|
|
{
|
|
|
if ($book_info->charge_type == 'BOOK')
|
|
|
return $book_info->price * 100;
|
|
|
return ceil($chapter_size / 100);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
+ private function getPrice($book_info, $chapter_size=0)
|
|
|
+ {
|
|
|
+ if ($book_info->charge_type == 'BOOK') {
|
|
|
+ if(BookOrderService::isHasBookOrder($this->uid)){
|
|
|
+ $this->is_first_book_order = 0;
|
|
|
+ return 1399;
|
|
|
+ }else{
|
|
|
+ $this->is_first_book_order = 1;
|
|
|
+ return 899;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $fee = BookService::getPrice($book_info,$this->distribution_channel_id,$chapter_size);
|
|
|
+ return $fee;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|