> /www/wwwroot/logs/apiqnys.liuniukj.com/cron.log 2>&1 & public function newCommissionTask(){ echo PHP_EOL."新佣金计算任务开始".PHP_EOL; $objDEnterprise = new DEnterprise(); $objDEnterprise->setTable('qianniao_enterprise_1'); $enterpriseList = $objDEnterprise->select(['deleteStatus' => StatusCode::$standard]); if (empty($enterpriseList)){ echo '企业数据为空'.PHP_EOL; die; } foreach ($enterpriseList as $value){ if(empty($value['id'])) continue; //合伙人任务 $taskTotal = new PartnerTools($value['id']); $res = $taskTotal->runTask(); if(empty($res) || empty($res["code"])){ echo '系统错误'.PHP_EOL; }else{ echo json_encode($res,JSON_UNESCAPED_UNICODE).PHP_EOL; } //门店代理任务 $taskTotal2 = new AgentTools($value['id']); $res2 = $taskTotal2->runTaskNew(); if(empty($res2) || empty($res2["code"])){ echo '系统错误'.PHP_EOL; }else{ echo json_encode($res2,JSON_UNESCAPED_UNICODE).PHP_EOL; } } echo '新佣金计算任务结束'.PHP_EOL; } }