teamAchievementExtra(); } // 延时结算,站内脚本 public function actionDelay() { $mall_list = Mall::getEnableMallList(true); foreach ($mall_list as $mall) { $where['status'] = 0; $where['mall_id'] = $mall['id']; $agentDelayLogList = AgentDelayLog::find()->select('id,created_at,day_num,source_table_id,mall_id,order_no')->where($where)->orderBy('id asc'); $nowTime = time(); foreach ($agentDelayLogList->asArray()->batch(1000) as $item) { foreach($item as $v) { if($nowTime > $v['created_at'] + $v['day_num'] * 86400){ $data['source_table_ids'] = $v['source_table_id']; $data['mall_id'] = $v['mall_id']; $data['order_no'] = $v['order_no']; (new \addons\Agent\common\logic\reward\DelayUnfrozen())->handle($data); } } } } } }