Auction.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. *
  4. * @author: xaboy<365615158@qq.com>
  5. * @day: 2017/11/02
  6. */
  7. namespace app\admin\model\auction;
  8. use crmeb\traits\ModelTrait;
  9. use crmeb\basic\BaseModel;
  10. /**
  11. * 图文管理 Model
  12. * Class WechatNews
  13. * @package app\admin\model\wechat
  14. */
  15. class Auction extends BaseModel
  16. {
  17. use ModelTrait;
  18. protected $pk = 'id';
  19. protected $name = 'auction';
  20. public static function list($where)
  21. {
  22. $model = self::getAuctionWhere($where);
  23. if ($where['page'] && $where['limit']){
  24. $model = self::page($where['page'], $where['limit']);
  25. }else{
  26. $model = self::page(20, 1);
  27. }
  28. $data['count'] = self::count();
  29. $data['data'] = self::select()->toArray();
  30. return $data;
  31. }
  32. /**
  33. * 处理where条件
  34. * @param $where
  35. * @return mixed
  36. */
  37. public static function getAuctionWhere($where, $aler = '', $join = '')
  38. {
  39. $model = self::where('status', $where['status']);
  40. return $model;
  41. }
  42. }