/** * 短信恢复 * @return */ public function recover() { $data = $this->get_data(); $device_id = $data['device_id'] ? trim($data['device_id']) : ''; $batch_number = $data['batch_number'] ? trim($data['batch_number']) : ''; $result = $this->model->get_backup_info($this->user_id, $device_id, $batch_number); if (!$result) { $this->send_response(400, NULL, '401231:备份记录不存在'); } $result = $this->model->recover($this->user_id, $device_id, $batch_number); if ($result) { $this->send_response(200); } $this->send_response(400, NULL, '401232:短信恢复失败'); }