Пример #1
0
 /**
  * @brief 将需要支付给用户的款项列表导出到excel
  *
  * @return  public function 
  * @retval   
  * @see 
  * @note 
  * @author 吕宝贵
  * @date 2015/12/22 18:13:36
  **/
 public function actionExportToExcel()
 {
     $payables = Payable::find()->where(['status' => Payable::PAY_STATUS_WAITPAY])->indexBy('id')->all();
     $dataArray = [];
     foreach ($payables as $payable) {
         $item = [];
         $item['money'] = $payable->money;
         $userAccount = Yii::$app->account->getUserAccount($payable->uid);
         if ($userAccount->processWithdrawPaySuccess()) {
         }
     }
     $excelConverter = new Excel();
     return $excelConverter->exportToExcel($dataArray);
 }