|
@@ -19,6 +19,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
|
|
{
|
|
{
|
|
@@ -320,7 +322,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
|
|
@@ -593,18 +595,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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -675,7 +677,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);
|
|
}
|
|
}
|