|
@@ -2135,8 +2135,8 @@ class OrdersController extends Controller
|
|
|
'send_time' => date("Y-m-d H:i:s"),
|
|
|
'data' => $res
|
|
|
);
|
|
|
-
|
|
|
dispatch((new SendTexts($send_data))->onConnection('rabbitmq')->delay($delay)->onQueue('send_texts_list'));
|
|
|
+ $this->weixinAdvertiseReport($item->appid,$item->openid,$order_id,$product_info->type);
|
|
|
}
|
|
|
}
|
|
|
} catch (\Exception $e) {
|
|
@@ -2529,4 +2529,18 @@ class OrdersController extends Controller
|
|
|
} catch (\Exception $e) { }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private function weixinAdvertiseReport($appid,$openid,$order_id,$price){
|
|
|
+ $weixinAdvertiseReportAppids = redisEnv('WEIXIN_ADVERTISE_REPORT_APPID','');
|
|
|
+ if($weixinAdvertiseReportAppids && in_array($appid,explode(',',$weixinAdvertiseReportAppids))){
|
|
|
+ $data = [
|
|
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
+ 'openid'=>$openid,
|
|
|
+ 'id'=>$order_id,
|
|
|
+ 'appid'=>$appid,
|
|
|
+ 'price'=>$price,
|
|
|
+ ];
|
|
|
+ Redis::RPUSH('Wechat:WeixinAdReport',json_encode($data));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|