$channel['id'], 'date' => $yesterStartDay, 'register_user_num' => $userRegisterNum, 'send_order_num' => $sendOrderDataNum, 'is_login_yesterday'=>UserService::judgeUserYesterdayLogin($channel['id'],$yesterStartDay,$yesterEndDay), 'whole_site_uv'=>$whole_uv, 'whole_site_pv'=>$whole_pv, 'auto_force_sub_num'=>BusinessChannelDayStatService::getAutoForceSubUserNum($channel['id'],$yesterStartDay,$yesterEndDay), 'self_force_sub_num'=>BusinessChannelDayStatService::getSelfForceSubUserNum($channel['id'],$yesterStartDay,$yesterEndDay), 'subscribe_user_num'=>BusinessChannelDayStatService::getChannelSubscribeNum($channel['id'],$yesterStartDay,$yesterEndDay), 'subscribe_amount' =>BusinessChannelDayStatService::getChannelSubscribeRecharge($channel['id'],$yesterStartDay,$yesterEndDay) ]; BusinessChannelDayStatService::createBusinessChannelDayStat($paramsA); }catch (\Exception $exception){ \Log::error($exception->getMessage()); } $yesterday_register_user_num = $userRegisterNum; $current_month_register_user_num = UserService::getChannelDayToDayTotal([$channel['id']], $current_monthStartDay, $yesterEndDay); $last_month_register_user_num = UserService::getChannelDayToDayTotal([$channel['id']], $last_monthStartDay, $current_monthStartDay); $total_register_user_num = UserService::getChannelDayToDayTotal([$channel['id']], '', $yesterEndDay); $total_send_order_num = SendOrderService::getPromotionCountByChannelId($channel['id']); $current_month_new_channel_recharge = ChannelOrdersService::getCurrentMonthNewChannelsOrdersSum($channel['id']); $current_month_channel_recharge = ChannelOrdersService::getChannelsOrdersSum($channel['id'],$current_monthStartDay); $paramsB = [ 'yesterday_register_user_num' => $yesterday_register_user_num, 'current_month_register_user_num' => $current_month_register_user_num, 'last_month_register_user_num' => $last_month_register_user_num, 'total_register_user_num' => $total_register_user_num, 'total_send_order_num' => $total_send_order_num, 'current_month_new_channels_recharge'=>$current_month_new_channel_recharge, 'current_month_channels_recharge'=>$current_month_channel_recharge, 'service_account_num' =>BusinessChannelStatService::getServiceAccountNum($channel['id']), 'last_week_login_days' =>BusinessChannelStatService::getLoginDays($channel['id'],$beginLastweek,$endLastweek), 'current_week_login_days'=>BusinessChannelStatService::getLoginDays($channel['id'],$current_week_start,$current_week_end), 'last_week_actual_send_orders'=>SendOrderService::getPeriodActualSendOrdersNum($channel['id'], $beginLastweek,$endLastweek), 'current_week_actual_send_orders'=>SendOrderService::getPeriodActualSendOrdersNum($channel['id'], $current_week_start,$current_week_end), 'yesterday_create_orders'=>SendOrderService::getDuraingPromotionCountByChannelId($channel['id'],$yesterStartDay,$yesterEndDay), 'is_login_yesterday'=>$paramsA['is_login_yesterday'], 'last_month_channels_recharge'=>BusinessChannelStatService::getLastMonthChannelRecharge($channel['id']), 'last_month_new_channel_recharge'=>BusinessChannelStatService::getLastMonthNewChannelRecharge($channel['id']), ]; //\Log::info('paramB'.json_encode($paramsB)); BusinessChannelStatService::crateUpdate($channel['id'], $paramsB); } Log::info("======每日商务渠道数据生成 【任务执行结束】=====".date("y-m-d H:i:s"."\n")); print_r("======每日商务渠道数据生成 【任务执行结束】=====".date("y-m-d H:i:s"."\n")); } }