1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace app\common\model;
- /**
- * 支付记录表
- * Class PayListModel
- * @package app\common\model
- */
- class PayListModel extends BaseModel
- {
- protected $table = 'pay_list';
- /**
- * 用户支付记录分页
- * @param int $page
- * @param int $pageSize
- * @param array $condition
- * @param bool $is_count
- * @param string $order
- * @return array|int|string
- */
- public function getPayListPage($page,$pageSize,$condition=[],$is_count = false,$order=''){
- $this->alias('a')
- ->field('a.*,user.user_name')
- ->join('user user','user.user_no = a.user_no','LEFT');
- if(!empty($condition)){
- $this->where($condition);
- }
- if(!empty($order)){
- $this->order($order);
- }
- if($is_count){
- return $this->count();
- }
- return $this->page($page,$pageSize)->select();
- }
- }
|