UserApply.php 764 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\common\model;
  3. use liuniu\BaseModel;
  4. class UserApply extends BaseModel
  5. {
  6. // 表名
  7. protected $name = 'user_apply';
  8. public static function lst($where)
  9. {
  10. $model = new self;
  11. if (isset($where['cid']) && $where['cid'] > 0) $model->where('cid', $where['cid']);
  12. if (isset($where['user_id']) && $where['user_id'] > 0) $model->where('user_id', $where['user_id']);
  13. if (isset($where['status']) && $where['status'] > -2) $model->where('status', $where['status']);
  14. $data = $model->order('id desc')->page($where['page'], $where['limit'])->select();
  15. foreach ($data as &$v)
  16. {
  17. $v['info'] = Help::info($v['cid'],$v['id'],$v['user_id']);
  18. }
  19. return $data;
  20. }
  21. }