public static function preProcessBulkSmsRecordData($smsRecordId, $accountId) { $logs = BulkSmsLog::find()->where(['smsRecordId' => $smsRecordId, 'accountId' => $accountId])->orderBy(['createdAt' => SORT_ASC])->all(); $rows = array(); if (!empty($logs)) { foreach ($logs as $log) { $row = ['mobile' => "'" . $log->mobile, 'smsContent' => $log->smsContent, 'status' => $log->status ? '成功' : '失敗', 'createdAt' => MongodbUtil::MongoDate2String($log->createdAt, 'Y-m-d H:i:s', null)]; $rows[] = $row; unset($row); } } return $rows; }