|
@@ -112,6 +112,14 @@ class ChapterController extends BaseController
|
|
|
}
|
|
|
|
|
|
if ($chapter->is_vip == 0) {
|
|
|
+ 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, 'sequence' => $chapter->sequence
|
|
@@ -122,15 +130,23 @@ class ChapterController extends BaseController
|
|
|
// 书籍是否限免
|
|
|
$free = BookConfigService::judgeBookIsFree($bid);
|
|
|
if ($free) {
|
|
|
+ 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, 'sequence' => $chapter->sequence
|
|
|
]);
|
|
|
- if($chapter->is_vip == 1){
|
|
|
+ if ($chapter->is_vip == 1) {
|
|
|
$fee = $this->getPrice($book_info, $chapter->size);
|
|
|
$now = date('Y-m-d');
|
|
|
- Redis::hincrby('qapp:book:free:virtual:'.$free->id,$now,$fee);
|
|
|
- Redis::sadd('qapp:free:virtual'.$now,$free->id);
|
|
|
+ Redis::hincrby('qapp:book:free:virtual:' . $free->id, $now, $fee);
|
|
|
+ Redis::sadd('qapp:free:virtual' . $now, $free->id);
|
|
|
}
|
|
|
return response()->item(new ChapterTransformer, $this->getChapter($bid, $cid, $chapter));
|
|
|
}
|
|
@@ -138,6 +154,14 @@ class ChapterController extends BaseController
|
|
|
|
|
|
//已经付费
|
|
|
if ($this->getOrderRecord($bid, $cid)) {
|
|
|
+ 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, 'sequence' => $chapter->sequence
|
|
@@ -179,6 +203,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, 'sequence' => $chapter->sequence
|