|
@@ -10,6 +10,7 @@ use App\Modules\User\Services\ReadRecordService;
|
|
|
use App\Http\Controllers\QuickApp\Book\Transformers\ChapterTransformer;
|
|
|
use App\Modules\Book\Services\BookConfigService;
|
|
|
use App\Http\Controllers\QuickApp\Book\Transformers\ChapterListTransformer;
|
|
|
+use App\Jobs\UserRententionJob;
|
|
|
use App\Modules\Book\Services\BookService;
|
|
|
use App\Modules\Subscribe\Services\BookOrderService;
|
|
|
use App\Modules\Subscribe\Services\ChapterOrderService;
|
|
@@ -260,6 +261,10 @@ class ChapterController extends BaseController
|
|
|
if (!$chapter) {
|
|
|
return response()->error('QAPP_SYS_ERROR');
|
|
|
}
|
|
|
+
|
|
|
+ $job = new UserRententionJob($this->uid, now());
|
|
|
+ dispatch($job)->onConnection('rabbitmq')->onQueue('user_rentention_queue');
|
|
|
+
|
|
|
if ($chapter->is_vip == 0) {
|
|
|
ReadRecordService::addReadRecord([
|
|
|
'uid' => $this->uid, 'bid' => $bid, 'book_name' => $book_info->book_name,
|
|
@@ -437,7 +442,7 @@ class ChapterController extends BaseController
|
|
|
protected function balancePay($book_info, $chapter_id, $chapter_size, $chapter_name, $is_remind)
|
|
|
{
|
|
|
$fee = $this->getPrice($book_info, $chapter_size);
|
|
|
- if ((int)$this->user_info['balance'] >= $fee) {
|
|
|
+ if ((int) $this->user_info['balance'] >= $fee) {
|
|
|
if ($this->bookOrderOrChapterOrder($book_info, $chapter_id, $fee, $chapter_name, $is_remind)) {
|
|
|
return true;
|
|
|
}
|
|
@@ -603,7 +608,8 @@ class ChapterController extends BaseController
|
|
|
'distribution_channel_id' => $this->distribution_channel_id ? $this->distribution_channel_id : '0',
|
|
|
'send_order_id' => $this->send_order_id,
|
|
|
]);
|
|
|
- } catch (\Exception $e) { }
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|