HttpRequestRecord.php 838 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/8/18
  6. * Time: 上午10:46
  7. * 手机端和PC端楼盘相关共用部分
  8. */
  9. namespace common\fm;
  10. use Yii;
  11. use yii\base\BaseObject;
  12. use common\models\HttpRecord;
  13. class HttpRequestRecord extends BaseObject implements \yii\queue\JobInterface
  14. {
  15. public $equipment;
  16. public $referer;
  17. public $self_url;
  18. public $agent;
  19. public $ip;
  20. public function execute($queue)
  21. {
  22. $model = new \common\models\HttpRecord();
  23. // $server = new \common\api\HttpServer();
  24. $model->ip = $this->ip;
  25. $model->referer = $this->referer;
  26. $model->self_url = $this->self_url;
  27. $model->agent = $this->agent;
  28. $model->equipment = $this->equipment;
  29. $model->save();
  30. // $model->Add(['equipment'=>$this->equipment]);
  31. }
  32. }