|
@@ -1093,9 +1093,12 @@ class ChapterController extends BaseController
|
|
|
*/
|
|
|
protected function getSubscribe()
|
|
|
{
|
|
|
- if($this->send_order_id &&
|
|
|
- in_array($this->distribution_channel_id,explode(',',env('INNER_CHANNEL_SUB','1'))) &&
|
|
|
- ($send_order_info = SendOrderService::getById($this->send_order_id)) &&
|
|
|
+ $send_order_info = null;
|
|
|
+ if($this->send_order_id){
|
|
|
+ $send_order_info = SendOrderService::getById($this->send_order_id);
|
|
|
+ }
|
|
|
+ if(in_array($this->distribution_channel_id,explode(',',env('INNER_CHANNEL_SUB','1'))) &&
|
|
|
+ $send_order_info &&
|
|
|
$send_order_info->promotion_type == 'EXTERNAL'
|
|
|
){
|
|
|
$subscribe_info = ForceSubscribeUserIService::subscribes($this->uid,$this->distribution_channel_id,$this->send_order_id);
|
|
@@ -1103,6 +1106,12 @@ class ChapterController extends BaseController
|
|
|
$this->need_subscribe_name = $subscribe_info['name'];
|
|
|
return $subscribe_info['is_subscribed'];
|
|
|
}
|
|
|
+
|
|
|
+ if($send_order_info &&
|
|
|
+ $send_order_info->promotion_type == 'INTERNAL' &&
|
|
|
+ strtotime($send_order_info->created_at) > 1555315200){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
$res = ForceSubscribeService::forceSubscribeUsersByUid(['uid' => $this->uid]);
|
|
|
if ($res) {
|
|
|
$this->force_subscribe_time = isset($res->created_at)?$res->created_at:null;
|