|
@@ -170,6 +170,10 @@ class GdtAdReport extends Command
|
|
|
if(!$user_action_set_id || !$token) {
|
|
|
$data['result_msg'] = $this->error_msg;
|
|
|
DB::table('wechat_advertise_gdt_report_record')->insert($data);
|
|
|
+ DB::connection('api_mysql')->table('distribution_channel_weixin_report_orders')->where('order_id',$item['id'])->update([
|
|
|
+ 'report_status'=>5,
|
|
|
+ 'updated_at'=>date('Y-m-d H:i:s')
|
|
|
+ ]);
|
|
|
continue;
|
|
|
};
|
|
|
$result = $this->request($client, $user_action_set_id, $action_time, $action_type, $item['appid'], $item['openid'], $item['price']*100, $product_name, $product_id,$token,$report_type);
|
|
@@ -179,7 +183,7 @@ class GdtAdReport extends Command
|
|
|
try{
|
|
|
DB::table('wechat_advertise_gdt_report_record')->insert($data);
|
|
|
if($data['result_status'] == 'SUCCESS'){
|
|
|
- DB::connection('api_mysql')->table('distribution_channel_weixin_spread_orders')->where('order_id',$item['id'])->update([
|
|
|
+ DB::connection('api_mysql')->table('distribution_channel_weixin_report_orders')->where('order_id',$item['id'])->update([
|
|
|
'report_status'=>1,
|
|
|
'updated_at'=>date('Y-m-d H:i:s')
|
|
|
]);
|
|
@@ -195,7 +199,7 @@ class GdtAdReport extends Command
|
|
|
DB::table('wechat_advertise_gdt_report_record')->insert($data);
|
|
|
try{
|
|
|
if($data['result_status'] == 'SUCCESS'){
|
|
|
- DB::connection('api_mysql')->table('distribution_channel_weixin_spread_orders')->where('order_id',$item['id'])->update([
|
|
|
+ DB::connection('api_mysql')->table('distribution_channel_weixin_report_orders')->where('order_id',$item['id'])->update([
|
|
|
'report_status'=>1,
|
|
|
'updated_at'=>date('Y-m-d H:i:s')
|
|
|
]);
|
|
@@ -211,9 +215,11 @@ class GdtAdReport extends Command
|
|
|
if (date('H:i:s') < '02:00:00') {
|
|
|
$start = date('Y-m-d H:i:s', time() - 3 * 3600);
|
|
|
}
|
|
|
- $result = DB::connection('api_mysql')->table('distribution_channel_weixin_spread_orders')
|
|
|
+ $result = DB::connection('api_mysql')->table('distribution_channel_weixin_report_orders')
|
|
|
->where('report_status', 0)
|
|
|
->where('created_at', '>=', $start)
|
|
|
+ ->where('type','WEB')
|
|
|
+ ->where('action_type','ALL')
|
|
|
->select('order_id', 'appid', 'openid', 'price', 'report_status', 'created_at','report_type')
|
|
|
->get();
|
|
|
if ($result) {
|
|
@@ -225,7 +231,7 @@ class GdtAdReport extends Command
|
|
|
->count();
|
|
|
if ($report_info) {
|
|
|
try {
|
|
|
- DB::connection('api_mysql')->table('distribution_channel_weixin_spread_orders')->where('order_id', $item->order_id)->update([
|
|
|
+ DB::connection('api_mysql')->table('distribution_channel_weixin_report_orders')->where('order_id', $item->order_id)->update([
|
|
|
'report_status' => 1,
|
|
|
'updated_at' => date('Y-m-d H:i:s')
|
|
|
]);
|