|
@@ -97,15 +97,33 @@ class ChapterController extends BaseController
|
|
|
}
|
|
|
|
|
|
if ($chapter->is_vip == 0) {
|
|
|
- ReadRecordService::addReadRecord([
|
|
|
- 'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
|
|
|
- 'cid' => $cid, 'chapter_name' => $chapter->name
|
|
|
+ if ($chapter->sequence > 1) {
|
|
|
+ ReadRecordService::addReadRecord([
|
|
|
+ 'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
|
|
|
+ 'cid' => $cid, 'chapter_name' => $chapter->name
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+ ReadRecordService::addReadLog($this->uid, [
|
|
|
+ 'distribution_channel_id' => $this->distribution_channel_id,
|
|
|
+ 'bid' => $bid,
|
|
|
+ 'cid' => $chapter->id,
|
|
|
+ 'uid' => $this->uid,
|
|
|
+ 'send_order_id' => $this->send_order_id,
|
|
|
+ 'sequence' => $chapter->sequence,
|
|
|
]);
|
|
|
return response()->item(new ChapterTransformer, $this->getChapter($bid, $cid, $chapter));
|
|
|
}
|
|
|
|
|
|
//已经付费 或者 书籍是否限免
|
|
|
if ($this->getOrderRecord($bid, $cid) || BookConfigService::judgeBookIsFree($bid)) {
|
|
|
+ ReadRecordService::addReadLog($this->uid, [
|
|
|
+ 'distribution_channel_id' => $this->distribution_channel_id,
|
|
|
+ 'bid' => $bid,
|
|
|
+ 'cid' => $chapter->id,
|
|
|
+ 'uid' => $this->uid,
|
|
|
+ 'send_order_id' => $this->send_order_id,
|
|
|
+ 'sequence' => $chapter->sequence,
|
|
|
+ ]);
|
|
|
ReadRecordService::addReadRecord([
|
|
|
'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
|
|
|
'cid' => $cid, 'chapter_name' => $chapter->name
|
|
@@ -147,6 +165,14 @@ class ChapterController extends BaseController
|
|
|
//付费 不提醒
|
|
|
if ($this->balancePay($book_info, $cid, $chapter->size, $chapter->name, 0)) {
|
|
|
UserTaskService::addUserTaskQueue($this->uid, BaseTask::read, UserTaskService::judge_trigger);
|
|
|
+ ReadRecordService::addReadLog($this->uid, [
|
|
|
+ 'distribution_channel_id' => $this->distribution_channel_id,
|
|
|
+ 'bid' => $bid,
|
|
|
+ 'cid' => $chapter->id,
|
|
|
+ 'uid' => $this->uid,
|
|
|
+ 'send_order_id' => $this->send_order_id,
|
|
|
+ 'sequence' => $chapter->sequence,
|
|
|
+ ]);
|
|
|
ReadRecordService::addReadRecord([
|
|
|
'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
|
|
|
'cid' => $cid, 'chapter_name' => $chapter->name
|