bonus_ranklist.model.php 662 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 16/7/22
  6. * Time: 下午3:41
  7. */
  8. defined('InShopNC') or exit('Access Invalid!');
  9. class bonus_ranklistModel extends Model
  10. {
  11. public function __construct() {
  12. parent::__construct('bonus_ranklist');
  13. }
  14. public function getRanklist($cond,$field = '*',$order = '') {
  15. return $this->field($field)->where($cond)->order($order)->limit(false)->select();
  16. }
  17. public function getByListSn($list_sn) {
  18. return $this->where(array('list_sn' => $list_sn))->find();
  19. }
  20. public function edit($cond,$data)
  21. {
  22. return $this->where($cond)->update($data);
  23. }
  24. }