|
@@ -309,27 +309,6 @@ class ChapterController extends BaseController
|
|
|
];
|
|
|
|
|
|
if ($user_info['balance'] < $fee) {
|
|
|
- /*//需要提箱
|
|
|
- if ($this->isOrderRemind($bid)) {
|
|
|
-
|
|
|
- if ($book_info->charge_type == 'BOOK') {
|
|
|
- return response()->error('QAPP_BOOK_BALANCE_PAY', $data);
|
|
|
- } else
|
|
|
- if ($book_info->charge_type == 'CHAPTER') {
|
|
|
- return response()->error('QAPP_CHAPTER_INSUFFICIENT_BALANCE', $data);
|
|
|
- } else {
|
|
|
- return response()->error('QAPP_SYS_ERROR');
|
|
|
- }
|
|
|
- } else {
|
|
|
- //不需要提醒
|
|
|
- if ($book_info->charge_type == 'BOOK') {
|
|
|
- return response()->error('QAPP_BOOK_SECOND_BALANCE_PAY', $data);
|
|
|
- } elseif ($book_info->charge_type == 'CHAPTER') {
|
|
|
- return response()->error('QAPP_CHAPTER_SECOND_BALANCE_PAY', $data);
|
|
|
- } else {
|
|
|
- return response()->error('QAPP_SYS_ERROR');
|
|
|
- }
|
|
|
- }*/
|
|
|
if ($book_info->charge_type == 'BOOK') {
|
|
|
return response()->error('QAPP_BOOK_INSUFFICIENT_BALANCE', $data);
|
|
|
} elseif ($book_info->charge_type == 'CHAPTER') {
|
|
@@ -338,17 +317,6 @@ class ChapterController extends BaseController
|
|
|
return response()->error('QAPP_SYS_ERROR');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- /*if ($this->isOrderRemind($bid)) {
|
|
|
- if ($book_info->charge_type == 'BOOK') {
|
|
|
- return response()->error('QAPP_BOOK_BUY', $data);
|
|
|
- } else
|
|
|
- if ($book_info->charge_type == 'CHAPTER') {
|
|
|
- return response()->error('QAPP_CHAPTER_BUY', $data);
|
|
|
- } else {
|
|
|
- return response()->error('QAPP_SYS_ERROR');
|
|
|
- }
|
|
|
- }*/
|
|
|
//付费 不提醒
|
|
|
if ($this->balancePay($book_info, $cid, $chapter->size, $chapter->name, 0)) {
|
|
|
|
|
@@ -359,15 +327,6 @@ class ChapterController extends BaseController
|
|
|
|
|
|
return response()->item(new ChapterTransformer, $this->getChapter($bid, $cid, $chapter));
|
|
|
} else {
|
|
|
-
|
|
|
- //不需要提醒
|
|
|
- /*if ($book_info->charge_type == 'BOOK') {
|
|
|
- return response()->error('QAPP_BOOK_SECOND_BALANCE_PAY', $data);
|
|
|
- } elseif ($book_info->charge_type == 'CHAPTER') {
|
|
|
- return response()->error('QAPP_CHAPTER_SECOND_BALANCE_PAY', $data);
|
|
|
- } else {
|
|
|
- return response()->error('QAPP_SYS_ERROR');
|
|
|
- }*/
|
|
|
if ($book_info->charge_type == 'BOOK') {
|
|
|
return response()->error('QAPP_BOOK_INSUFFICIENT_BALANCE', $data);
|
|
|
} elseif ($book_info->charge_type == 'CHAPTER') {
|
|
@@ -465,15 +424,6 @@ class ChapterController extends BaseController
|
|
|
'discount_fee' => '',
|
|
|
'discount' => ''
|
|
|
];
|
|
|
- //不需要提醒
|
|
|
- /*if ($book_info->charge_type == 'BOOK') {
|
|
|
- return response()->error('QAPP_BOOK_SECOND_BALANCE_PAY', $data);
|
|
|
- } elseif ($book_info->charge_type == 'CHAPTER') {
|
|
|
- return response()->error('QAPP_CHAPTER_SECOND_BALANCE_PAY', $data);
|
|
|
- } else {
|
|
|
- return response()->error('QAPP_SYS_ERROR');
|
|
|
- }*/
|
|
|
-
|
|
|
if ($book_info->charge_type == 'BOOK') {
|
|
|
return response()->error('QAPP_BOOK_INSUFFICIENT_BALANCE', $data);
|
|
|
} elseif ($book_info->charge_type == 'CHAPTER') {
|
|
@@ -536,16 +486,15 @@ class ChapterController extends BaseController
|
|
|
*/
|
|
|
protected function bookOrderOrChapterOrder($book_info, $chapter_id, $fee, $chapter_name, $is_remind)
|
|
|
{
|
|
|
- $send_order_id = 0;
|
|
|
if ($book_info['charge_type'] == 'BOOK') {
|
|
|
$data = [
|
|
|
'uid' => $this->uid,
|
|
|
'fee' => $fee,
|
|
|
- 'u' => $send_order_id,
|
|
|
+ 'u' => $this->send_order_id,
|
|
|
'distribution_channel_id' => $this->distribution_channel_id,
|
|
|
'bid' => $book_info->bid,
|
|
|
'book_name' => $book_info->book_name,
|
|
|
- 'send_order_id' => $send_order_id,
|
|
|
+ 'send_order_id' => $this->send_order_id,
|
|
|
];
|
|
|
return BookOrderService::addOrderRecodeAndDecrUserBalance($data, $this->uid);
|
|
|
} else {
|
|
@@ -557,10 +506,9 @@ class ChapterController extends BaseController
|
|
|
'distribution_channel_id' => $this->distribution_channel_id,
|
|
|
'book_name' => $book_info->book_name,
|
|
|
'chapter_name' => $chapter_name,
|
|
|
- 'send_order_id' => $send_order_id,
|
|
|
+ 'send_order_id' => $this->send_order_id,
|
|
|
'is_remind' => $is_remind
|
|
|
];
|
|
|
- //print_r($data);
|
|
|
if ($is_remind) {
|
|
|
$this->addOrderRemind($book_info->bid);
|
|
|
}
|
|
@@ -652,7 +600,6 @@ class ChapterController extends BaseController
|
|
|
*/
|
|
|
protected function addTag($book_info)
|
|
|
{
|
|
|
- $send_order_id = 0;
|
|
|
if (!UserDeepReadTagService::isAddTag($this->uid, $book_info->bid)) {
|
|
|
try {
|
|
|
UserDeepReadTagService::addTag([
|
|
@@ -663,7 +610,7 @@ class ChapterController extends BaseController
|
|
|
'category_name' => $book_info->category_name,
|
|
|
'sex_preference' => $book_info->channel_name ? $book_info->channel_name : '',
|
|
|
'distribution_channel_id' => $this->distribution_channel_id ? $this->distribution_channel_id : '0',
|
|
|
- 'send_order_id' => $send_order_id,
|
|
|
+ 'send_order_id' => $this->send_order_id,
|
|
|
]);
|
|
|
} catch (\Exception $e) { }
|
|
|
}
|