"desc"]:$order; $list = $this->field("o.id,o.user_id,o.createtime,order_no,title,o.money,paytime,content_id,ispay,user_money,system_money,o.status,type,f.user_id as fabu_user_id,f.title")->alias('o')->join('fa_content f','f.id = o.content_id','LEFT') ->where($where) ->where('ispay',1) ->paginate($limit); // ->paginate(['page'=> $offset?? 1,'list_rows' => $limit]); $result = array("total" => $list->total(), "rows" => $list->items(),"sql"=>$this->fetchSql()); return $result; } // 查询当前用户是否已经付过费 public function yungudong($where, $order, $offset, $limit,$sort,$type){ $order = empty($order)?['o.createtime'=>"desc"]:$order; $page = $offset/ $limit+1; $list = $this->field("o.id,o.user_id,o.createtime,order_no,title,o.money,paytime,content_id,u.nickname,ispay,user_money,system_money,o.status,type,f.user_id as fabu_user_id,f.title")->alias('o')->join('fa_content f','f.id = o.content_id','LEFT')->join('fa_user u','u.id = o.user_id','LEFT') ->where($where) ->where('ispay',1) ->where('type',$type) ->paginate($limit); // ->paginate(['page'=> $page?? 1,'list_rows' => $limit]); $result = array("total" => $list->total(), "rows" => $list->items(),"sql"=>$this->fetchSql()); return $result; } }