|
@@ -20,6 +20,8 @@ use App\Modules\Subscribe\Services\YearOrderService;
|
|
use App\Modules\OfficialAccount\Services\ForceSubscribeService;
|
|
use App\Modules\OfficialAccount\Services\ForceSubscribeService;
|
|
use App\Modules\Subscribe\Services\ChapterReminderService;
|
|
use App\Modules\Subscribe\Services\ChapterReminderService;
|
|
use App\Modules\User\Services\UserDeepReadTagService;
|
|
use App\Modules\User\Services\UserDeepReadTagService;
|
|
|
|
+use App\Modules\UserTask\Services\BaseTask;
|
|
|
|
+use App\Modules\UserTask\Services\UserTaskService;
|
|
|
|
|
|
class ChapterController extends BaseController
|
|
class ChapterController extends BaseController
|
|
{
|
|
{
|
|
@@ -321,7 +323,7 @@ class ChapterController extends BaseController
|
|
}
|
|
}
|
|
//付费 不提醒
|
|
//付费 不提醒
|
|
if ($this->balancePay($book_info, $cid, $chapter->size, $chapter->name, 0)) {
|
|
if ($this->balancePay($book_info, $cid, $chapter->size, $chapter->name, 0)) {
|
|
-
|
|
|
|
|
|
+ UserTaskService::addUserTaskQueue($this->uid, BaseTask::read, UserTaskService::judge_trigger);
|
|
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
|
|
@@ -596,18 +598,18 @@ class ChapterController extends BaseController
|
|
return ceil($chapter_size / 100);
|
|
return ceil($chapter_size / 100);
|
|
}*/
|
|
}*/
|
|
|
|
|
|
- private function getPrice($book_info, $chapter_size=0)
|
|
|
|
|
|
+ private function getPrice($book_info, $chapter_size = 0)
|
|
{
|
|
{
|
|
if ($book_info->charge_type == 'BOOK') {
|
|
if ($book_info->charge_type == 'BOOK') {
|
|
- if(BookOrderService::isHasBookOrder($this->uid)){
|
|
|
|
|
|
+ if (BookOrderService::isHasBookOrder($this->uid)) {
|
|
$this->is_first_book_order = 0;
|
|
$this->is_first_book_order = 0;
|
|
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);
|
|
return $fee;
|
|
return $fee;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -678,7 +680,8 @@ class ChapterController extends BaseController
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private function stats(){
|
|
|
|
|
|
+ private function stats()
|
|
|
|
+ {
|
|
//阅读器统计
|
|
//阅读器统计
|
|
WapVisitStatService::recordReaderUvAndPv($this->uid, $this->distribution_channel_id);
|
|
WapVisitStatService::recordReaderUvAndPv($this->uid, $this->distribution_channel_id);
|
|
}
|
|
}
|