Browse Source

new send order debug 2

zz 6 năm trước cách đây
mục cha
commit
473797a200
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      app/Http/Middleware/ReadOauth.php

+ 7 - 1
app/Http/Middleware/ReadOauth.php

@@ -1025,11 +1025,17 @@ class ReadOauth
         $param = $request->get('yun');
         if(!$param) return ;
         $bid = $request->get('bid');
+        $send_order_info = SendOrderService::getRedirectUrlById($param);
         if($bid){
             $bid_arr = Hashids::decode($bid);
             isset($bid_arr[0]) && $bid = $bid_arr[0];
-            is_numeric($bid) && $this->specialChannelIdStats($param,$distribution_channel_id,$uid,$bid);
         }
+
+        if(!$send_order_info) return ;
+        if($send_order_info->book_id &&  $send_order_info->book_id != $bid) return ;
+        if($send_order_info->distribution_channel_id != $distribution_channel_id) return ;
+        
+        is_numeric($bid) && $this->specialChannelIdStats($param,$distribution_channel_id,$uid,$bid);
         $key = date('Y-m-d');
         Cookie::queue('send_order_id', $param, env('U_COOKIE_EXPIRE'), null, null, false, false);
         $send_order_flag = Cookie::get('send_order_flag');