Express.php 742 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @author: xaboy<365615158@qq.com>
  4. * @day: 2017/11/11
  5. */
  6. namespace app\admin\model\system;
  7. use crmeb\traits\ModelTrait;
  8. use crmeb\basic\BaseModel;
  9. /**
  10. * Class Express
  11. * @package app\admin\model\system
  12. */
  13. class Express extends BaseModel
  14. {
  15. /**
  16. * 数据表主键
  17. * @var string
  18. */
  19. protected $pk = 'id';
  20. /**
  21. * 模型名称
  22. * @var string
  23. */
  24. protected $name = 'express';
  25. use ModelTrait;
  26. public static function systemPage($params)
  27. {
  28. $model = new self;
  29. if ($params['keyword'] !== '') $model = $model->where('name|code', 'LIKE', "%$params[keyword]%");
  30. $model = $model->order('sort DESC,id DESC');
  31. return self::page($model, $params);
  32. }
  33. }