zz 6 anos atrás
pai
commit
8f2ad45f6e

+ 18 - 1
app/Http/Controllers/Wap/Web/RedirectController.php

@@ -127,7 +127,8 @@ class RedirectController extends BaseController
                 $uv = Redis::hget('send_order_uv_' . $param, $key);
                 $this->updateSendOrderTime($param, $uv);
             }
-
+            //统计
+            $this->InnerOuterWeixinStats($link->promotion_type,$param);
             //
             $redirect_path = $request->get('redirect_path');
            if($redirect_path){
@@ -183,6 +184,7 @@ class RedirectController extends BaseController
         $param['cid'] = $record_info_arr[0];
         $param['bid'] = $bid_str;
         $param['soid'] = $send_order_id;
+        $param['jump_from'] = 'yun';
         if ($cid && $cid != $record_info_arr[0]) {
             $url = env('H5_SCHEME', 'https') . '://' . _domain() . '/reader?' . http_build_query($param);
             return $url;
@@ -458,4 +460,19 @@ class RedirectController extends BaseController
         WapVisitStatService::specialChannelIdStatsMarkUser($uid,$bid,$send_order_id);
         return ;
     }
+
+    //内外部模板客服统计埋点
+    private function InnerOuterWeixinStats($promotion_type,$send_order_id){
+        $openChannel = redisEnv('OPEN_INNER_OUTER_WEIXIN_STATS');
+        if(!$openChannel || !in_array($this->distribution_channel_id,explode(',',$openChannel))) return ;
+        if($promotion_type == 'EXTERNAL'){
+            ReadRecordService::setByMultiField($this->uid,['new_outer'=>$send_order_id,'new_total'=>$send_order_id]);
+        }
+
+        if($promotion_type == 'INTERNAL'){
+            ReadRecordService::setByMultiField($this->uid,['new_inner'=>$send_order_id,'new_total'=>$send_order_id]);
+        }
+
+    }
+
 }

+ 1 - 1
app/Modules/SendOrder/Services/SendOrderService.php

@@ -274,7 +274,7 @@ class SendOrderService
      */
     static function getRedirectUrlById($id)
     {
-        return SendOrder::where('id', $id)->select('redirect_url', 'book_id', 'send_time', 'distribution_channel_id', 'name','promotion_point','force_show_qrcode')->first();
+        return SendOrder::where('id', $id)->select('redirect_url', 'book_id', 'send_time', 'distribution_channel_id', 'name','promotion_point','force_show_qrcode','promotion_type')->first();
     }
 
     /**

+ 1 - 1
app/Modules/User/Services/ReadRecordService.php

@@ -20,7 +20,7 @@ class ReadRecordService
     //阅读记录数
     const RECORD_COUNT = 50;
 
-    private static $not_uid_key = ['last_read','send_order_id','sign_count','sign_counts','sign_info','sign_day','smart_push','inner_send_order_id','gxhp','property','bind_phone_status','ua','sign_version'];
+    private static $not_uid_key = ['last_read','send_order_id','sign_count','sign_counts','sign_info','sign_day','smart_push','inner_send_order_id','gxhp','property','bind_phone_status','ua','sign_version','new_outer','new_inner','new_total'];
 
     /**
      * 获取