setTable('qianniao_enterprise_1'); $enterpriseList = $objDEnterprise->select(['deleteStatus' => StatusCode::$standard]); if ($enterpriseList === false){ echo 'sql错误'.$objDEnterprise->error(); echo PHP_EOL; die; } foreach ($enterpriseList as $value){ $objMCoupon = new MCoupon('',$value['id']); $res =$objMCoupon->grantCoupon(); if (!$res->isSuccess()){ echo '执行错误'.$res->getData(); echo PHP_EOL; die; } } echo '执行结束'.PHP_EOL; } }